View Single Post
Old 01-31-10, 04:28 AM   #9
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

Quote:
Originally Posted by Tomi_099 View Post
---------------------------------------


Thanks Skwasjer,

how can I import a frame by frame ??
Or do I have the entire animation with hex editor in
in MashAnimations Data Copy to Type100 / 5










You do not need a hexeditor. To import a mesh animation:
  • Select the model
  • Choose 'Import 3D model'
  • Select the first frame of the animation sequence ie. 'Animation000.obj' and click OK
  • S3D determines there is a sequence of frames and asks you if you want to import the animation. Choose 'Yes'
  • On the 2nd tab of the import-options dialog, choose the framerate, or time per frame.
  • Once all options are set, let S3D import. It will generate the required chunk-structure if not already available (ie. a child controller type 10 / 5 for the model, and the MeshAnimationData chunk containing all the frames for the animation). If the structure is already available, it will be reused (overwritten)
  • Test the animation in the 3D preview.
You can manually adjust the framerate of each frame then in the MeshAnimationData controller. If you make a change to the animation however in Max, you will have to reimport the entire animation. You can't replace a single frame. Manual adjustments to timing will also have to be redone.

The problem with your animation however is (as I described in my previous post) that some of individual frame-meshes do not contain the same number of vertices. If two vertices in one mesh somehow 'merge' on the timeline they still must be stored as seperate vertices in the OBJ-file. This is not a problem if you import a static model, but it IS when importing an animation. You can verify this by importing the faulty frame in S3D as a static model and notice that it is correctly drawn this time.

In the DAT-file, each frame-mesh is not stored exactly 'as is', but it is stored using a formula that calculates the difference to the primary mesh. This is to a) save space and memory and b) to speed up rendering with GFX. The game uses interpolation to 'rebuild' a specific frame based on the 'delta' frame and the primary frame. As such, each frame-mesh must be identical in vertex count and face count. If it isn't, then the 'delta' for some vertices will be the world offset (0,0,0) or point to a completely different vertex and you end up with the animation you have experienced (some vertices spike out to the world origin, or some indexes point to a different vertex, iow. the index buffer is filled with an incorrect array of indices).

I do not know how to correct this. Perhaps there are some modifiers or export options in Max that 'optimize' each individual frame upon export (they remove too small faces, or merge vertices that are very close together). Try turning this off. Or you may have to redo the animation...

I can not make a video tutorial right now, but hope the above helps.

Last edited by skwasjer; 01-31-10 at 04:40 AM.
skwasjer is offline   Reply With Quote