Sign in to follow this  

3D Model/Animation File Formats?

This topic is 4383 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

My friend does all his 3D stuff in Maya which is not very friendly in terms of what it is able to export. There are 3rd party converters which are somewhat useful but it is another program to buy or you have to rely on demo. We are planning to try using Alias' FBX format but it seems like it might be a little overkill for what we would require. The other option is for me to sit down and pound out an exporter for Maya to some other format. So before I do this I would like to get some input about what file formats other people use for their model/animation data and why. Thanks in advance for the input.

Share this post


Link to post
Share on other sites
What kind of 3D 'stuff' are you trying to export? That will have a big effect on what you use to do it. If you only need basic geometry data, writing your own exporter might not be a bad idea. That way you can store it in a format that works specifically for your purposes.

Personally, this is what I do. I have a custom exporter that does geometry, joints, weights, and animations. It took some time, but having everything in a format that is specific to my projects helps immensly because all the data is already set up for my own data structures in-engine.

Share this post


Link to post
Share on other sites
I mostly need to store everything that you just mentioned geometry, joints, weights, and animations. I have already made an Exporter for Maya which exports geometry only just to help learn the API but I want animation data also and getting that data out of Maya is alot more complicated than extracting the geometry which is why I want to get some opinions before I dedicate the time to making it.

Share this post


Link to post
Share on other sites
Animations aren't that hard, they just seem complex (as most things in the Maya API do). You need to iterate the dependancy graph, find all the MFn::kAnimCurves, and store the key-times at each one. Then, using the MAnimControl (which I like to call the 'magic time machine') you can set the current time in Maya to be that of each keyframe. As you do so, re-extract the joint data and store it as a keyframe at each time.

The biggest problem I ran into was correctly extracting the original bind pose of each joint. There isn't really a straight-forward method of actually doing this. But, the easiest way to handle this issue is to manually put the skeleton into it's bind pose before exporting.

Share this post


Link to post
Share on other sites
Quote:
Original post by TomBlind
Animations aren't that hard, they just seem complex (as most things in the Maya API do). You need to iterate the dependancy graph, find all the MFn::kAnimCurves, and store the key-times at each one. Then, using the MAnimControl (which I like to call the 'magic time machine') you can set the current time in Maya to be that of each keyframe. As you do so, re-extract the joint data and store it as a keyframe at each time.


As long as you have an increadably basic rig, that will work. If you use IK, expressions, set driven keys, clusters or other animation devices, that won't work.

You'd be better off just sampling the data every 'n' frames. It's a trivial task to fit animation curves onto arbritrary keyframes.

Quote:
Original post by TomBlindThe biggest problem I ran into was correctly extracting the original bind pose of each joint. There isn't really a straight-forward method of actually doing this. But, the easiest way to handle this issue is to manually put the skeleton into it's bind pose before exporting.


Well, there is a way to do it.

a) Look for the bind pose node.... or,
b) realise that any pose will do, so it doesn't matter if you use the first frame of animation, or maya's bind pose. It's all relative really.

Quote:
Original post by The ProvokerWe are planning to try using Alias' FBX format but it seems like it might be a little overkill for what we would require


It may seem like overkill, however in reality any format you write will, over time, become very similar. The FBX SDK also supports collada and a number of other formats, which does mean you can use the collada exporter instead of the (not very good) fbx exporter.

Basically, if you want to learn the API and time is not an issue, write your own exporter. (my website has some handy stuff on it to learn that). If time is an issue, and you do not require custom markup data provided by your own custom plugins, use the FBX SDK downloadable from the alias site.

Share this post


Link to post
Share on other sites

This topic is 4383 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this