![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
11-11-10, 08:38 AM
|
#11 |
|
The Old Man
![]() Join Date: Apr 2007
Location: Netherlands
Posts: 1,553
Downloads: 30
Uploads: 4
|
MeshAnimationData works as follows:
Take the base mesh, and for each frame, and for each vertex, compute the delta translation. For the computed delta's get the lower and upper bound. This is your resolution (or range). Then pack each vertex with this resolution as signed short. The narrower the resolution, the finer the accuracy of the animation. Store the resolution and the packed vertices (or texture coordinates, you can also animate textures!!), and you are done. Take note that whenever the base model changes, the animation goes whack! Without the base mesh, you can't 'restore' the animation frames... All the above is exactly what S3D does during import/export, and why it needs to be tied to the base model for import/export to work! Additionally, when using S3D to modify a stock animation, take additional note that S3D has more advanced compression routines than stock, so the index tables can also go out of sync requiring you to reimport not only the animation, but also the base model! Stock, no compression is done on any model, so many models contain alot of duplicate vertices and texture coordinates. This is why you sometimes see a model having 20K vertices and after reimport without modifying it suddenly has 12k vertices. This is S3D's optimization/compression feature. You CAN and perhaps should (!) turn it off during import/export (it's an option). Keep this in mind! [edi] I wrote unsigned, but of course this should be signed...
__________________
![]() SH5 mods: Speech Recognition for SH5 | Digital UI Clock Tutorials: [TEC] Import/export 3D models to/from game using S3D [TEC] How to work with the model viewer in S3D - VIDEO Last edited by skwasjer; 11-11-10 at 09:27 AM. |
|
|
| Thread Tools | |
| Display Modes | |
|
|
