Jump to content
  • Advertisement
Sign in to follow this  
Zarl

Animation format

This topic is 2355 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!

I am making a quite basic game and I need to add animation support to my game engine. I don't need bones, just simple positional and rotational interpolation (I think I will use nlerp) between key frames. My problem is that I need to get animations from Blender into my engine. I have written a .OBJ parser for models, but .OBJ doesn't support animations to my knowledge. At first, I thought of making my own format as the only data I need is the following: mesh name, frame time, position (as a vector), orientation (as a Quaternion). But I quickly realized that writing a blender export plugin would take quite a lot if time, so I started to look for other formats that might contain this data. I have had no luck in that either, so before I go and start to learn how blender exporters work, I ask you if there are any good alternatives. I know C++ quite well and
a bit of .NET C#, so I can write a converter between a existing format containing the data I need to a custom format that would be easy for my engine to parse. Are there any formats I could use? If so, does there exist a Blender exporter for the format? (or am I back to square one, having to write a blender exporter?)

Thanks,
Zarl

Share this post


Link to post
Share on other sites
Advertisement
MD2 is a pretty well documented format that supports animations. It takes a little bit of effort to parse since it was designed for being small due to memory constraints at the time it was designed, but I've managed to get an animated file working so it can't be that hard. IIRC Blender has an exporter for it, if not built in then at least a plugin.

http://en.wikipedia.org/wiki/MD2_%28file_format%29

Share this post


Link to post
Share on other sites
Vertex animation is quite a bit of work versus IK-chains. How complex animation are we talking here? You might just be adding a lot of extra work vs. just using bones and doing a bit of rigging or, if the "animation" is simple enough, just doing it by hardcoding in-engine. A bit more detail would be nice.

MD2 will indeed do the job, but I doubt Blender still has any supported exporter in 2.5+

Share this post


Link to post
Share on other sites
Well, I don't really need animations down to per-vertex level, what I need is per-object animations (the positions and orientations of the objects at different times) and I hoped there would be some kind of "scene data export" or something, containing the positional and orientational data of the objects at different key frames. Making a system for parsing and real-time interpolation of vertex data seems to be a lot of work, and you might be right when you are talking about hardcoding this, or perhaps, parsing "handwritten" animation data. I hope I have made my needs a bit clearer for you.

Share this post


Link to post
Share on other sites

Well, I don't really need animations down to per-vertex level, what I need is per-object animations (the positions and orientations of the objects at different times) and I hoped there would be some kind of "scene data export" or something, containing the positional and orientational data of the objects at different key frames. Making a system for parsing and real-time interpolation of vertex data seems to be a lot of work, and you might be right when you are talking about hardcoding this, or perhaps, parsing "handwritten" animation data. I hope I have made my needs a bit clearer for you.

What you are looking for is still bone animation, just with one bone affecting the whole object. I would take a look at FBX, it is "human" readable and blender got good export support for this format. Thought you should build your own converter to strip out only what you need and put it into your own fileformat.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!