Morph target transforms
#2
The biggest problem with achieving morphing the 3ds file format - it is quite old and does not support morphing.

Some time ago I have achieved to create morphing with using two 3ds files.

I have attached the zip file with a sample project with full source code. Please note that this is only a prototype (I modified the Animator3ds sample) - the code could be improved. And it only demonstrates one possible way how to achieve morphing.

It works by reading two 3ds files - one for the first frame and the other for the end frame. The first file contains the start 3d model and the second the end 3d model. The code than calculates the differences between positions and can play the animated morphing.

The code than creates two Lists that contain the differences for each point of the object - position and normal(FillDifferences method).

In the ShowFrame method the object is than morphed from the first file to the second (the percentage of the transformation is the parameter to the method).

I think the code can be used to produce a very good morphing animation.

To make it more persuasive, the animation should probably be less linear - maybe some sin or some spline technique should be used to make more "natural" animation.

The code can be also used to add more files to animations (not just two).

It could be also possible to binary serialize the differences (two lists) into file - if there would be more than 2 files in the animation this would probably significantly reduce the start-up time.

One of the problems I have found is that it is not possible to export only selected frame to 3ds from 3ds max. But I am sure that this can be overcome - maybe with firstly exporting to some other file format that support exporting only one frame (ASCII file format) - I did not test it.


I hope this solution will be sufficient for you.


Attached Files
.zip   Morph3dsTest.zip (Size: 900.5 KB / Downloads: 9)
  


Messages In This Thread
Morph target transforms - by JoeEngineer - 01-11-2010, 09:01 PM
RE: Morph target transforms - by abenedik - 01-13-2010, 03:23 PM
RE: Morph target transforms - by JoeEngineer - 01-14-2010, 07:07 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)