SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   THE Ultimate Animation of Crew Thread (https://www.subsim.com/radioroom/showthread.php?t=176928)

skwasjer 11-11-10 08:31 AM

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).

skwasjer 11-11-10 08:38 AM

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...

Anvart 11-11-10 09:04 AM

Quote:

Originally Posted by Hans Witteman (Post 1533292)
Hi Anvart,

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

Hi, Hans.
I think Skwasjer already have answered your question... and has made it on good English... :D

Hans Witteman 11-11-10 11:47 AM

Quote:

Originally Posted by skwasjer (Post 1533570)
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...

Hi skwasjer,

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

Hans Witteman 11-11-10 11:49 AM

Quote:

Originally Posted by Anvart (Post 1533584)
Hi, Hans.
I think Skwasjer already have answered your question... and has made it on good English... :D

Hi Anvart,

No problem mate i think your English is enough clear for me i am not so good either in English :salute:

Best regards Hans

skwasjer 11-11-10 12:53 PM

Quote:

Originally Posted by Hans Witteman (Post 1533696)
Hi skwasjer,

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

No problem, good to have you in good shape.

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).

divingbluefrog 11-12-10 08:02 AM

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.

Hans Witteman 11-12-10 12:34 PM

Quote:

Originally Posted by skwasjer (Post 1533736)
No problem, good to have you in good shape.



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).

Hi Skwasjer,

Thank for your clear explanation i learn stuff this way and i like it:up:

This thread is worth gold

Best regards Hans

skwasjer 11-12-10 04:44 PM

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:

Originally Posted by divingbluefrog (Post 1534054)
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.

Correct, this is not a problem. It's not optimal, but it works, so good job! It surely isn't the first 'workaround' in the mod-scene ;)

skwasjer 11-12-10 04:51 PM

Quote:

Originally Posted by Hans Witteman (Post 1533696)
And second when you say take the base mesh does it mean we cannot add a new custom character mesh?

When talking about characters that walk on other surface vessels, yes you can because these are simple mesh animations, but full new NPC's living on your boat can't be done with S3D, at least not easily and it will require much hexwork and borrowing from stock models. This is the only missing feature in S3D. I only managed to 'decode' about 75% of how those characters (and animations) are stored in the DAT-file, so it never made it into S3D... So you're basically only able to do specific adjustments using current supported features in S3D.

Madox58 11-12-10 05:12 PM

Skwasjer,
Thanks for filling in the technical details.
:yeah:

As you stated above,
We'll need to do some Hex work here and there but nothing beyound
what most people could do if we explain it clearly.

Most of the work is going to be experimenting with the Crew Animations.
Finding the easiest and best ways to actually do them.

I think we have a good start on it all with S3D in the Tool Box.
:salute:

divingbluefrog 11-14-10 01:07 PM

Good news : all operations on faces are allowed, add, delete and flip normals, as long as you don't touch the vertices.
This seems to be little but this will open the door to an another major breakthrough. But this is a different story...

Madox58 11-14-10 05:31 PM

We need to get a Standard Rig built for all Crew Animations.
I would suggest a scale of 1 Unit = 1 Meter.
Then scale the exports to SH3 size.

If all future Animators use a Standard Rig We all work on the same level.
And provide a Tool to help those that wish to do some animations
but can not build Rigs.

Hans Witteman 11-15-10 02:14 AM

Quote:

Originally Posted by divingbluefrog (Post 1535234)
Good news : all operations on faces are allowed, add, delete and flip normals, as long as you don't touch the vertices.
This seems to be little but this will open the door to an another major breakthrough. But this is a different story...

Hi divingbuefrog,

That is what we call excellent news indeed:up:

Best regards Hans

Hans Witteman 11-15-10 02:18 AM

Quote:

Originally Posted by privateer (Post 1535361)
We need to get a Standard Rig built for all Crew Animations.
I would suggest a scale of 1 Unit = 1 Meter.
Then scale the exports to SH3 size.

If all future Animators use a Standard Rig We all work on the same level.
And provide a Tool to help those that wish to do some animations
but can not build Rigs.

Hi privateer,

When i will be finish with my mod i will do such a rig i already have human rig from previous project i did so i would just have to modify it for our crew:salute:

I wish i had more spare time to heavily test those new things i can't wait to put my dirty 3d hand on it:up:

Best regards Hans

urfisch 11-18-10 01:30 PM

does "new animations" mean = "new crew models"?

:hmmm:

Hans Witteman 11-18-10 03:16 PM

Quote:

Originally Posted by urfisch (Post 1537709)
does "new animations" mean = "new crew models"?

:hmmm:

Hi urfisch,

So far the progress are slow but i think we could make it with perseverance nothing is impossible to dedicated people:up:

Best regards Hans

Madox58 11-18-10 10:14 PM

Quote:

Originally Posted by urfisch (Post 1537709)
does "new animations" mean = "new crew models"?

:hmmm:

That is the final goal, Yes.
Animations of dock people and life boat people was done awhile ago.
That's pretty straight forwards.
Doing new Crew animations is a round about job.
Once started?
You have to do ALL animations, edit Keyframes and placement, etc.
It is a big job, Yes.
But nothing different from what Modders have ever done before
as far as the scope of the work load.

divingbluefrog 11-22-10 06:38 AM

I need help.
The way materials and textures are applied in the bodyxx.dat and heads is a total mess! I can't find any logic in it...
Especially for the gat material (it means neck in romanian). It seems to have its own texture but I can't find where the data are stored.
Another point is in the Body02.dat. There is an embedded texture map that is lableled Map #83. I have no idea what this tag is referencing.
Any hint will be welcome.

urfisch 11-22-10 04:42 PM

Quote:

Originally Posted by privateer (Post 1538164)
That is the final goal, Yes.
Animations of dock people and life boat people was done awhile ago.
That's pretty straight forwards.
Doing new Crew animations is a round about job.
Once started?
You have to do ALL animations, edit Keyframes and placement, etc.
It is a big job, Yes.
But nothing different from what Modders have ever done before
as far as the scope of the work load.

ok, nice!

but is there a chance of an option, to import the animation keyframes automatically? if they are already done in a 3d programm?


All times are GMT -5. The time now is 03:02 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.