Jump to content

Recommended Posts

What version of 3ds Max? In new ones it should just be File -> Export (then select the .dae file type), I think. Older ones may require you to install ColladaMax first. That should export any kind of animation, and if it's a skeletal animation and things are set up just right then the game should be able to load it.

Link to post
Share on other sites

Is this better?

http://trac.wildfiregames.com/wiki/ArtDesi...t#COLLADAExport

IIRC, exporting a static .dae is the same as exporting an animated .dae.

You just specify in one model or the other which one is the animated model, and which one is the static.

The complexity of working with animation comes in when you are setting up and using skeletons, either bones or biped.

Your right, the actor design document is very weak here... if you have questions though I'd be happy to answer them as your learning how to do this.

Then perhaps you could flesh out the wiki (y)

Link to post
Share on other sites

I have a skeleton rigged to a model and an animation already completed. I have experience in exporting static models into .dae.

Some questions:

Do I export just the skeleton? just the model? both?

There are some options that come up when exporting, do any of them need to be selected?

Any particular length the animation has to be?

(I'm using 3dsmax 9 btw)

Link to post
Share on other sites

Do you want to use both the mesh and the animation in the game?

To use the mesh, the export needs to include the mesh and the skeleton (so that it includes the skin weights), but it doesn't need the skeleton's animations.

To use the animation, the export needs to include the skeleton and its animations, but doesn't need the mesh.

You can choose to export one file that includes the mesh and skeleton and animations, and use that file for both purposes - the game will just ignore the data it doesn't need. (You'll still need to make two copies of that file, since the game looks in different directories for meshes and animations.)

Assuming you're using the standard Biped skeleton, you'll also need to make sure it's called Bip01, so that the game recognises the skeleton structure. (binaries/data/mods/public/art/skeletons/skeletons.xml defines the skeletons that it knows - it translates the exported skeleton (e.g. the Biped) into a standardised form, to help compatibility between meshes and animations that were produced independently and potentially by different modelling programs. If you have a weird skeleton then you'd have to add it to skeletons.xml.)

Some export options may be important, but I don't remember what all the options are or which are needed.

The animation can be any length. I think you need to ensure the first frame and last frame are identical, so that it will loop smoothly. Unless it's the exact opposite of that.

Link to post
Share on other sites

Robert, are you using 3ds Max 9's standard exporter? I forget the options it gives you on export. If you list them, I could let you know which ones to check and not check.

To add to what Philip mentioned about the length, I think what happens when you export an animation - it 'flattens' the animation and places a key at every frame for every bone. So, the longer the animation, the bigger the file. I don't believe the .dae format recognizes the parabolic interpolation of the animation, the game engine does the smoothing between the frames though.

Once the animation was switched from .psa and .pmd files to .dae - I didn't do a lot of exporting, so I'm a little weak in that area (and I'm getting a bit forgetful). I have done both combinations physique/biped (animals, humans, etc..) and skin/bones (chariot). But, it's great your digging into this. It would be awesome to have more people in the community who are familiar with the process.

All of my original max files (not always very pretty) are in an art repository. I think someone from the team could get those for you if you would like some example files.

Link to post
Share on other sites
I think what happens when you export an animation - it 'flattens' the animation and places a key at every frame for every bone. So, the longer the animation, the bigger the file. I don't believe the .dae format recognizes the parabolic interpolation of the animation, the game engine does the smoothing between the frames though.
Yep - the .dae format can represent some animations losslessly, but it doesn't understand the details of all the biped transforms, so the exporter flattens those to one keyframe per frame. I think there's an exporter option like "bake transform matrices" which forces everything (even simple linear movement) to be keyframes, which is sensible to ensure the more complex animation modes don't get misunderstood by the importer, but it shouldn't make a difference for skeletons.

Currently, the engine code samples the .dae file at 30fps (so make sure your exported animation is at 30fps too) and outputs another file (the .psa) with simple keyframe data per bone per frame, and the renderer interpolates between keyframes. We could (and ideally should) change this so that it stores the animations in a much more compact form, by skipping unnecessary keyframes (and interpolating more cleverly), and that wouldn't need any changes to the .dae files - that'd probably be quite tricky to implement well, but it might be worthwhile if the animations end up using up far too much memory.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...