
Animations
Hey all, just curious, how do you guys animate models (3ds). I know of the animations in 1 file, but when you animate and export with Poser, you get e.g. 30 lose 3ds files... Is that a good way as well to do it in openGL? (makes it kindof like animating 2d sprites
)

At the lowest level, animation is the same in 2D or in 3D. Different images/models are rendered on screen to produce animation.
However in 3D, you can choose not to store all the vertex info for every frame and instead choose to store info of keyframes/bones with vertices linked to them/or a combination of both. However, in the end, the CPU still has to calculate the the vertices to be drawn by interpolating the inbetween frames b4 it sends the data down to the gfx card.
As for your case, you could try to compile the frame data into a text file. Or if you have access to any program which can export to .ase, you can export frame by frame information into 1 file which you can read into your program.
However in 3D, you can choose not to store all the vertex info for every frame and instead choose to store info of keyframes/bones with vertices linked to them/or a combination of both. However, in the end, the CPU still has to calculate the the vertices to be drawn by interpolating the inbetween frames b4 it sends the data down to the gfx card.
As for your case, you could try to compile the frame data into a text file. Or if you have access to any program which can export to .ase, you can export frame by frame information into 1 file which you can read into your program.
Eh GamerSg, you look to know a lot of things about animations. Do you know (others can post [:D]) some file formats and tools that can easily be used for bone''s animations ?
There''s lot''s of tools out there for doing 3D animation, bones etc.. here''s a couple of ideas for you..
There both ideas iv''e had to use in the past on the various projects iv''e been contracted to do and they both work well.
Idea 1
------
Poser as you so rightly point out saves several seperate 3DS models, the way i solved this was as follows..
I downloaded a script for 3D Studio max which took each mesh and combined them into a single keyframed model, problem is i can''t remember where i dloaded it from (Could have been www.maxscripts.com) this then gave me a single 3DS animated/keyframed mesh.
I then dounloaded the 3DSFSDK (3D Studio File SDK) i belive from autodesks site, this has pre made classes which allow you to dissect your 3DS file and load the data into the appropritae bits of your code etc, it also allows you to make 3DS files from code to and comes with quite a few bits of eaxmple code, if you can''t find a copy easily i belive the file SDK is included in the ''Little 3D Engine'' (http://little3d.free.fr/) written by a french programmer by the name of Jean-Chritophe Lecomte.
Using this file library i was able to extract the keyframes, vertex data etc into custom buffers and so on then use my code to interpolate them as needed.
Idea 2
------
One of my all time fave tools is a wonderfull little program called 3D Exploration available from
(http://www.us.righthemisphere.com/3dexploration/)
If you do any kind of work AT ALL with 3d objects this tool is an absolute must...
Create your 3DS meshes using what ever tools you use, poser, 3dmax etc..
Then use 3D exploration to write your C++ code for you.. yes you heard me right, 3D exploration will create an entire VC++ project for you including resources, code, project files headers and so on.
The method i used was to get it to build a set of functions for drawing the data, i created a seperate function for every frame generated from poser and then just called them as needed, ''drawfig01()'' ''drawfig02()'' and so on.... the best part about this method is that all data is compiled into your EXE, no external files for nasty hacker types to steal and mess about with.
At the end of the day though programming is about figuring out the best way to do what you need to do depending on the task you have and the tools you have access to, these ideas have worked for me in the past, but as is always there''s always more than one way to do everything...
Have fun
Shawty/DS (Digital Solutions UK can be contaced at shawty_ds@yahoo.com)
There both ideas iv''e had to use in the past on the various projects iv''e been contracted to do and they both work well.
Idea 1
------
Poser as you so rightly point out saves several seperate 3DS models, the way i solved this was as follows..
I downloaded a script for 3D Studio max which took each mesh and combined them into a single keyframed model, problem is i can''t remember where i dloaded it from (Could have been www.maxscripts.com) this then gave me a single 3DS animated/keyframed mesh.
I then dounloaded the 3DSFSDK (3D Studio File SDK) i belive from autodesks site, this has pre made classes which allow you to dissect your 3DS file and load the data into the appropritae bits of your code etc, it also allows you to make 3DS files from code to and comes with quite a few bits of eaxmple code, if you can''t find a copy easily i belive the file SDK is included in the ''Little 3D Engine'' (http://little3d.free.fr/) written by a french programmer by the name of Jean-Chritophe Lecomte.
Using this file library i was able to extract the keyframes, vertex data etc into custom buffers and so on then use my code to interpolate them as needed.
Idea 2
------
One of my all time fave tools is a wonderfull little program called 3D Exploration available from
(http://www.us.righthemisphere.com/3dexploration/)
If you do any kind of work AT ALL with 3d objects this tool is an absolute must...
Create your 3DS meshes using what ever tools you use, poser, 3dmax etc..
Then use 3D exploration to write your C++ code for you.. yes you heard me right, 3D exploration will create an entire VC++ project for you including resources, code, project files headers and so on.
The method i used was to get it to build a set of functions for drawing the data, i created a seperate function for every frame generated from poser and then just called them as needed, ''drawfig01()'' ''drawfig02()'' and so on.... the best part about this method is that all data is compiled into your EXE, no external files for nasty hacker types to steal and mess about with.
At the end of the day though programming is about figuring out the best way to do what you need to do depending on the task you have and the tools you have access to, these ideas have worked for me in the past, but as is always there''s always more than one way to do everything...
Have fun
Shawty/DS (Digital Solutions UK can be contaced at shawty_ds@yahoo.com)
This is the Sound of ### # # ### # # ### # ## # # # # # # # # # #### #### ### # # # # ### # # # # # # # # # #### # # # # ##### # ##Still Code Crazy, Best and only way to be!!
Did you check your 3D Exploration tool still exists ?
Looks like it was so good it has been bougth and then there''s nothing left than a product to buy... Maybe it is good, but I can''t afford it...
Idea 1 to explore...
Looks like it was so good it has been bougth and then there''s nothing left than a product to buy... Maybe it is good, but I can''t afford it...
Idea 1 to explore...

quote:
Original post by MV
Eh GamerSg, you look to know a lot of things about animations. Do you know (others can post [:D]) some file formats and tools that can easily be used for bone''s animations ?
Nope, currently i don''t use bones animation and rely on precomputed frame by frame animation. The method i use saves CPU cycles and can increase framerates but also takes up alot of RAM. The method works fine for low polygon models with short animations. However it can really take up alot of RAM when used with higher polygon models and large animations.
The solution is skeletal animation and with most ppl having 1ghz coms or faster, it shouldnt cost much to do skeletal animation. The problem is i got no idea how i can retrieve Bone data, Bone Keyframes, Vertices-Bone link data from .3ds files.
I would appreciate if someone could point to a tutorial which shows how to extract this data.
Also another thing which i wonder about is that since bones are purely rotational, all the new vertices would have to be calculated using sin/cos for every frame? With about 4-5 animated models using about 1k vertices each, it would result in 5k sin/cos being used per frame.Isn''t that alot of computational power? Would it not slow down the application? Or is there a less expensive way to do it.
If your after pure bone animated mesh have you thought of trying the freeware C++ lib system called ''Cally 3D'' search for it in google you should find the site...
3D exploration hasn''t been bought up it''s been improved and is now marketed under a different name still available as a whole different package available from right hemisphere, i still use my old version that i bought eons ago though, it works perfectly well for what i use it for.
3D exploration hasn''t been bought up it''s been improved and is now marketed under a different name still available as a whole different package available from right hemisphere, i still use my old version that i bought eons ago though, it works perfectly well for what i use it for.
This is the Sound of ### # # ### # # ### # ## # # # # # # # # # #### #### ### # # # # ### # # # # # # # # # #### # # # # ##### # ##Still Code Crazy, Best and only way to be!!
What is the drawback with creating the body-whatever-parts in 3ds and animating them using opengl?
Example, in one animation of a figure walking I broke the body down to: head, neck, chest, upper left arm, left forearm, upper right arm, right forearm, midsection, upper left leg, upper right leg, left calf, right calf, right foot, left foot.
Each one of these were seperate 3ds files.
Then joined them all and wrote my own bones method, and pre-build a bunch of animations like human.walk(), human.run()... etc.
Is there a drawback to using this kind of system?
Example, in one animation of a figure walking I broke the body down to: head, neck, chest, upper left arm, left forearm, upper right arm, right forearm, midsection, upper left leg, upper right leg, left calf, right calf, right foot, left foot.
Each one of these were seperate 3ds files.
Then joined them all and wrote my own bones method, and pre-build a bunch of animations like human.walk(), human.run()... etc.
Is there a drawback to using this kind of system?
quote:
Original post by tresspassor
What is the drawback with creating the body-whatever-parts in 3ds and animating them using opengl?
Example, in one animation of a figure walking I broke the body down to: head, neck, chest, upper left arm, left forearm, upper right arm, right forearm, midsection, upper left leg, upper right leg, left calf, right calf, right foot, left foot.
Each one of these were seperate 3ds files.
Then joined them all and wrote my own bones method, and pre-build a bunch of animations like human.walk(), human.run()... etc.
Is there a drawback to using this kind of system?
Firstly it is tedious, secondly, they wont appear as 1 mesh when they move or rotate. When u bend you character, there will be a hole near his spine, something like FF7 characters. Bones make use of 1 mesh and therefore, you don''t see these problems when using bones.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement