Skip to main content
gamedev.net
🔒 Locked

.MD2 animation frames Question

Started by ByteMe95 2 replies 400+ views
Original Post
ByteMe95
ByteMe95
I got my md2 loader to wokr and am trying to get it to animate. I''m taking a tris.md2 file I KNOW has animation, but it doesnt work. I go through all the frames and read in the vertices for each frame and when I render I render one vertex buffer per frame, but the frame never changes!! I took this model from the Nehe Game turoial where I saw this model animated, BUT in the nehe tutorial it looks like i only uses the glCommands to render it and that''s how it gets animation. I''m using DX for this so I cant use the glcommands (I dont think). But WHY do all the frames have the saem vertex data???? What''s the point of having all those frames?? ByteMe95::~ByteMe95() Cerebrum Software
ByteMe95::~ByteMe95()My S(h)ite
3dModelMan
3dModelMan
I have an MD2 class (for DX) on my website.

The chances are you are mis-referencing something in the vertex data.

Cheers

Matt



ByteMe95
ByteMe95
quote:
Either your model doesn''t actually have animation, or (more likely) you''ve written buggy code that''s rendering the same frame over and over again. Try printing out some vertex coordinates and checking to see if they are in fact different. Even better, try following along in the debugger.

If you expect people to fix your bugs, you really need to provide more information about your implementation, y''know.


Actually, I did everything you said I should do BEFORE I posted the message, and found that everything I was reading in was exactly the same for eaech frame, I checked it out in many different ways, but who knows maybe i still did something wrong. I''m loading each frame into its own vertex buffer, and give each model an array of vertex buffers and one index buffer.

But still didnt work. And about me not giving enough info, never asked u to fix my code, I was asking if/why all the frames are the same and if the real anim data is in the glcommands.



ByteMe95::~ByteMe95()
Cerebrum Software
ByteMe95::~ByteMe95()My S(h)ite

Topic Locked

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

Sign in to reply to this topic.