Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I made a model in which a number of cobble stones fall into a hole using the rigid bodies in 3DS Max 2012 MassFX. They are just editable polys, no skin, no bone. I want this to play (Take 001, 0-100 frames) when the game loads the mesh. I haven't found a way to get to the animation though.

Does anyone have suggestions? All the tutorials for animated skinned models don't seem to work with a model set up like this? Do I really need to give each of 145 rocks a bone? If so, does anyone have a suggestion how to streamline that, or if there is an alternate solution to achieving this effect? The animation only needs to play once when the game starts, and that's it.

Thanks.

share|improve this question
    
Is there a reason you can't use a physics engine in the game to make the falling stones? –  Sean Middleditch Nov 19 '12 at 3:08
    
Have you thought about exporting the animation to a XML using MaxScript? You'd still have to implement logic that loads the animation and animates the objects though. –  Aaron Kabashi Aug 16 '13 at 7:28
add comment

1 Answer

XNA does not support animations out of the box, to get animations in you need to write your own code, such as the skinned sample they provide. Changing that sample to instead load a number of FBX files and changing between them with morphing is quite possible, its used in some games and demos to do facial animations since it provides the artist with more finegrained controls.

There are drawbacks of course, the animation will take more memory since it needs to store the entire model 100 times (for your 100frame example above) instead of just the changes in terms of bone animations. But as long as you use it sparingly it shouldn't be too bad.

The first step is to export the scene into a suitable format (FBX), you need to do this once per frame (or once per keyframe, the further apart they are the higher the chance that the morphing will look bad). I don't know how to do this in 3DS Max but hopefully it has a batch mode for exporting or some scripting API you could use for this.

Secondly you need to write a processor that loads and combines all the FBX files, a quick search gave this post as a possible example, in this case it has a flaw about multiple different textures but its a starting point.

Thirdly you need to animate the result, I would recomend looking at this CPU Gem chapter which is about facial morphing.

As you can see, it isn't entirely straightforward to do, in the end it might be simpler to simply rig your animation, but morph targets can be a very nice technique for good looking facial animations (in particular) so the time spent researching this won't be wasted.

share|improve this answer
    
Thanks for the information in which direction too look in. I'll give it a go and see what happens. –  AnKoe Jun 22 '12 at 4:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.