Jump to content
  • Advertisement
Sign in to follow this  
rubicondev

3DS Max Animation Exporter

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

I've got an animation exporter working with physique, but I've been given a load of animations using the "standard" skinning. I got the basics working and most of my animation seems to work, only some arms and legs are coming out screwed up. I'm assuming there is some kind of reference pose or "stand up straight" that I need to work with, but I can't figure this out. I've got a debug mode in my engine that allows me to see the skeleton bones as moving boxes and these seem to animate correctly, so it's almost definitely my vertex hookups that are screwed. I'm fairly sure this is because I'm not using a reference pose, but I can't find anything that explains what to do to get one! Anyone able to help ? Been here before ? Many thanks.......

Share this post


Link to post
Share on other sites
Advertisement
What we do is export the local space transforms of the character as it's in the first frame. We calculate the world space matrices of those local transforms and use the inverse of those matrices. If you export your character already in its bind pose you have the inverse bind pose world space matrices that you need in your skinning equation. Also the vertices are exported as they are in this bind pose.

Animations are exported separately in different files. If you export your character and animation in one file however you indeed must find out what the bind pose is on a different way.

One option could be to put the character in bind pose in its first frame of the anim and export only the animation data starting from the second frame. That's however not so cool of course.

The ISkin interface if I remember correctly also provides you with some mehtods that return the bind space transform. But I cannot remember correctly. We also don't use this.

Another way might be to enable the bind/reference pose mode of the ISkin modifier before getting the vertex and bind pose transform data. Then turn it off again and export your animation data. You can do the same with Biped as you know. Enabling/Disabling figure mode.

I know this answer doesn't really directly help you, but what is the reason you export your character meshes and animation inside the same file? If you separate them this will give you many advantages and would also solve the issue you are having.

Separating the anims from actor itself is nice because:
- you only load and store the geometry and hierarchical information once
- this means faster load times of your animation data
- you could share animations with some retargeting on different skeletons
- it wouldn't make sense to store the geometry with every animation if all you do is adjusting the skeletal tranformations

In case you already have different actor and anim files, your actor will already be in its bind pose in your actor max file. Simply export the pose of the skeleton and world space vertex coordinates for skinned meshes. Then it will work fine and you don't have to use any ISkin reference pose or Biped figure pose related function calls.

Share this post


Link to post
Share on other sites
Quote:
One option could be to put the character in bind pose in its first frame of the anim and export only the animation data starting from the second frame. That's however not so cool of course.

The ISkin interface if I remember correctly also provides you with some mehtods that return the bind space transform. But I cannot remember correctly. We also don't use this.

Yes, this is exactly how I want to handle it. I've spotted something called ISkinPose(). It has a method called SetSkinPoseMode() which looks and reads just loverly, but doesn't seem to bloody well do anything at all! :(

Quote:
I know this answer doesn't really directly help you, but what is the reason you export your character meshes and animation inside the same file? If you separate them this will give you many advantages and would also solve the issue you are having.

Partly for legacy support and partly for reasons like the difficulty I'm having now. Once I'm confident that everything works nicely, I'll probably go the extra mile of having "stick on" animations, but for now I've got a milestone to hit. :(

Thanks for getting the ball rolling.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!