Skip to main content
gamedev.net
🔒 Locked

Anim8or

Started by Brobanx Nov 30, 2001 at 6:23 PM 7 replies 450+ views
Original Post
Brobanx
Brobanx
I read NeHe''s tutorials on how to load .ms3d files (im actually using directX but i had no idea how the files were made), and i was very impressed. In that tutorial he said he would soon make a tutorial on loading Anim8or files... so i DLed Anim8or and it is far more powerful than milkshape, and 100% freeware too! I figured since the tutorial wasn''t around, i could look at the .an8 files to see how anim8or files are stored so i could use them in my game. I looked at some .an8 files (in Notepad) though, and I have alot of confusion as to how it stores the vertices and such. I''m not sure if I could figure this one out on my own. Has anyone else here looked into loading Anim8or files into their games? If not, does anyone have an idea as to when NeHe''s anim8or loading tutorial might be released?
scaught
scaught
If you look at this page on the Anim8or site, you can see there is a way to export anim8or objects as C files - and if that''s not sufficient, you could always parse that output at runtime yourself.
ATronic
ATronic
I just grabbed a copy myself and looked at an an8 file of a cube I made. They use custom information. They used, in this case, a common way to build a cube. The origin and lengths. For example, the cube starts out at (0, 0, 0) and has length (1, 1, 1) you will get a 1x1x1 cube extending along each axis, moving away from the screen, to the right, and up. You can use this data to construct the vertex information you want. Such as, one vertex can be found like so.

(xOrigin+xLength, yOrigin, zOrigin)

That would get you the closest lower right vertex. Or to get the farthest right top vertex you would do this.

(xOrigin+xLength, yOrigin+yLength, zOrigin+zLength)

Let me look at some other shapes and get back to you.


Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
ATronic
ATronic
Back, it seems they made all objects to use only required data. Such as for a sphere, all you really need is the centerpoint and radius. They do similar things for all shapes. I reccommend you research how to calculate vertex info from these limited specs or, if you want to be logical about it, save it in another format you can read. Seeing as it can export 3ds files, getting a converter from it to your favorite format should be no trouble at all.

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
Brobanx
Brobanx
Using the "export to .c" option is really bad for the game I''m making, I''ll need to load dozens of models from the files themselves, I cannot add a .c file to my project for every model I want. Also, the export to c does not include bones and animation which I will also need.

As for the objects, if I use the "convert to mesh" function in anim8or on each object, it will give me a list of vertices that I can use very easily instead of different functions for spheres / cubes and the like.

It''s just when I was looking at the file, I knew which were vertices and tex coords and such, but I was unsure what each number meant. In the list of "faces" (indices into the vertices and texcoord info), there were 4 sets of 2 values, I figured that 3 of them were indices to texcoords, 3 of them indices into the vertices, but I have no idea what the others were, or they might have been quads instead of triangles even.

In the file, I need to understand what each number inside the "mesh" represents, I can''t find any documentation about it''s file format, and exporting to a .c file doesn''t cut it.

I''m thinking I COULD export to 3ds, then to .x, but I want to avoid .x files because I have never been able to get them working properly. The best solution for me would be to load the .an8 files themselves, if I could just "interpret" the different numbers.
ATronic
ATronic
If you are loading several models, anim8or is not the best way to go as far as a file format. I would have to suggest ANYTHING binary over that. Much faster and more compact. I reccommend making a converter from anim8tor to your own custom bin format. You''ll have the same info, more compact, faster read times.

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
Brobanx
Brobanx
Yes, that''s a very good idea. I could convert the .an8 files into my own binary form that uses meshes and bones / joints as required. But I''d still need to know what all the numbers and such of the .an8 file mean before i can convert it. If only there were some technical specs that said how the file is formed, because I can''t figure out what every value represents.
ATronic
ATronic
E-mail the creator(s) of anim8or. They will most likely tell you since it encourages the programs use...

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
Minion
Minion
Anim8or is a good choice for a freeware modeler, but there are much better ones in my opinion. You can try Blender. It is very powerful, but the interface takes a while to learn. My personal favorite is OpenFX which is available from http://www.openfx.org. Also trueSpace 3 I believe is freeware now.

Mark C. Ulrich
gamemaker2107@yahoo.com
ICQ: 9630367

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.