![]() |
Quote:
Thank mate for the clarification on this controller but what would be really helpful for the community is a list of what controllers are usable for modding sh3 i look at all of them and some i think are not usable via S3D editor i might be wrong but i would like to know the one that work. Best regards Hans |
Export the MeshAnimationData2 rawchunk.
Open it with a Hex editor. Change the SubType from 0X8005 to 0x5. So change the hex values 0580 at address 1C to 0500 Now import to the dat. S3D now sees it as MeshAnimationData and exports properly. |
You're right. It works fine. I should have imported it on an already modified mesh. My bad.
Hex editing the mesh, I can delete the third channel and import it back. No problem in game. Of course it's always easier to cut than to modify, but it's a first step. The bad news is that Blender wracks the .obj produced by S3D. |
MeshAnimationData2 is technically identical to MeshAnimationData. The import sequence in S3D is the same. The only difference is a bitflag in the first section of the data (look at privateer's post above 0x5), and as previously stated seems to be used for crew. I needed to make this a seperate controller in S3D to support this bitflag but it in fact is the same controller in game. The game knows the difference only because of that flag.
|
Another tip is you can also simply copy/paste the chunk, so unless you need a rawchunk for hexeditting purposes, I suggest do the easy way and just CTRL+C/CTRL+V
|
You can drop uv3 channel. It is not needed, nor is 4th channel. Only the first channel (diffuse) is required and the 2nd is optional (occlude).
|
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... |
Quote:
I think Skwasjer already have answered your question... and has made it on good English... :D |
Quote:
First i like to thank you for your intervention in this thread and i am glad to see you are still following the SH3 mod forum an honor to have you here:salute: It clarify a lot but i might sound like a newb on this one i mean what is the delta is it in s3d because when i do morphing in max i have a delta option in the controller menu? And second when you say take the base mesh does it mean we cannot add a new custom character mesh? Also i remember i post you a pm earlier this year on animation and i didn't reply because of health problem just want to apologize for not answering back now health is better fortunately:up: Best regards Hans |
Quote:
No problem mate i think your English is enough clear for me i am not so good either in English :salute: Best regards Hans |
Quote:
I was just 'tech' babbling on how the actual animation frames are stored in the DAT-file. It's not really anything you should worry about. But if you want to know, the delta is a value that is computed based on the position of a specific vertex A, in frame 1 vs the same vertex A in frame 2 (where frame 1 is the base model/frame). It's basically subtraction, and you end up with a value called delta. All delta's are compared for the highest and lowest, and this final 'range' can then be used to determine the resolution, translation and initial offset. The initial offset (float) is a value that all vertices 'inherit', the translation is a factor (short) of resolution (float), which is added to the initial offset (for each component xyz). The final value is then the actual (new) position of the vertex. The finer the resolution (which is just computed using an algoritm, and depends on each model/frame), the more 'lossless' the compression is. As you can see, this can save quite a few bytes of data, since per frame the initial offset and resolution are just merely taking up 8 bytes of data, and each vertex only 6 bytes, whereas normally each vertex would take up 12 bytes + index table. This is a factor of > 2 compression. I don't have the details (nor do I have SH + S3D installed), but I remember quite alot of space savings was achieved this way. The biggest downside of this approach though, is to uncompress, expensive multiply operations are needed. But I'm sure the devs made the right tradeoff between load times and overall game size... Todays computers shouldn't really feel the pain though, this is a decided upon like what 6 years ago? I'll save you from how my algorithm specifically computes all this, because it is a bit more complex and not really interesting. The option in Max has nothing to do with this specifically, but the term delta can be explained in similar way, you probably specify the maximum allowed range of the morph algorithm (I am no Max expert, and don't know this controller). |
skwasjer, thank you again for this priceless software that is S3D, and for your help.
With your detailed informations on MeshAnimation controller, I found a way to modify the original mesh without screwing up the animation. I did it in Hex editing because Blender doesn't give me the .obj file I'm expecting and I don't want to deal with the python scripts for importing/exporting .obj files now. First I remove the third channel, then I only keep the 2432 first vts. Then, as animations deal only with vertices, I remove the faces I want to delete but keep the associated vertices. Some become isolated vertices, but it seems not to be a problem. It's how I have now in game a mesh without the faces linked to Rank-Deco informations and animations go as expected. |
Quote:
Thank for your clear explanation i learn stuff this way and i like it:up: This thread is worth gold Best regards Hans |
No problem, glad to help. Animations have been supported for a while by S3D, but I never got to do some tutorials due to lack of time so it's good that people try and discuss so the 'word gets out' on how to work with them.
Quote:
|
Quote:
|
All times are GMT -5. The time now is 03:27 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.