Link to home
Start Free TrialLog in
Avatar of kipl20
kipl20

asked on

how do i animate an md2 model with opengl, using simple keyframe animation?

hi, i would like to know how to animate an md2 model using opengl and C++.
i have loaded the md2 file in and can get it to display fine. but i dont know where to go from here?

i think i need to make keyframes out of the model but how do i do that?

i am a newbie and this is confusing to me, so go easy on me and try to explain it as easily as u can lol

thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of ikework
ikework
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hey kipl20

any luck so far?
Avatar of kipl20
kipl20

ASKER

hi, no luck as of yet, i have code to load the models in etc, but i fall down at the stage of actually setting up the model to animate.

i have set up an array to access the md2 model, where would i go from here, how would i access the first keyframe and move to the second etc?

any ideas,

thanks in advance
did you have a look at the document i posted above? can you show us the code?
Avatar of kipl20

ASKER

hi yes i did have a look but i didn't really understand, i am completely new to this and find it extremely difficult and confusing.

i have included code below, i can get the Md2 to appear on rendering so there is no problem loading the model, i just dont know how to go about setting up the key frames etc

thanks
here is where declare my model
CGModel							*myModel[4];
 
and here is where i set up an array to access the model
 
for (int i=0; i<4; i++){
		myModel[i] = new CGModel();
		//importGSF("Assets\\Models\\beast.gsf", myModel);
		importMD2("Assets\\Models\\Beast.md2", myModel[i],i+1);

Open in new window

>> hi yes i did have a look but i didn't really understand

Did you download the source code and look at it? Its doing excactly that.
If you still need help, can you ask a specific question, about what you dont understand?

ike
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hey man

following is the best place to learn about your problem.
http://www.videotutorialsrock.com/opengl_tutorial/animation/video.php