zeldaret / oot

Decompilation of The Legend of Zelda: Ocarina of Time
4.55k stars 575 forks source link

Rename Skeleton types #1604

Open Dragorn421 opened 8 months ago

Dragorn421 commented 8 months ago

Context

Skinning

In the context of modern 3d graphics, "skinning" refers to a mesh being deformed by bones (as if the mesh is skin wrapping the bones and the skin stretches to accomodate for bone movements). There's almost no constraints on how this deform happens, the mesh vertices may be rigged to one or more bones, using weights to blend the transformations. There's also no restrictions on which face(s) the vertex belongs to and how the other vertices on those faces are rigged.

In ancient days (n64 era) however the processing power and complexity level wasn't quite there yet for general use and there were constraints to save processing power.

The three main OoT skeleton types

In oot, there is a generic least-constraints multi-weighted-vertices (a vertex may be influenced by several bones, according to defined weights) skinned skeleton system, SkinSkeleton, which is used for horses.

There is also a widely used single-weighted-vertices (one bone per vertex with weight 1) skinned skeleton FlexSkeleton. Examples: Link, carpenters...

And finally there is the simplest single-weight non-skinned Skeleton It is "non-skinned" in that a triangle's vertices may only be deformed by a single bone, so a triangle is never stretched. Illustration of such a rigged mesh:

mario split into chunks to illustrate single-weight non-skinned 'Skeleton'

Suggested names

After investigating I concluded to suggesting the following name changes:

Note:

References

fig02 commented 8 months ago

Oh I didnt realize this was only an issue and not a PR lol I'm fine with the proposed names I think.

"Rigid" for what is currently "Flex" is the one that makes the least sense to me. Disjointed and Smooth tell me alot about what the final result will be like for those types, but rigid is pretty broad. I do see that professional software like maya refers to it as rigid, but is there any more of an explanation beyond that?

fig02 commented 8 months ago

I guess to add on to my point about "rigid" not making sense, the word rigid to me tells me there will be no deformation (like disjoint), but with this type there is some deformation, just only from 1 bone, right?

mzxrules commented 8 months ago

I feel it wouldn't be as bad if it were spelled out more, e.g. RigidSkinnedSkeleton, SmoothSkinnedSkeleton

OoT also has "CurveSkeleton" which not much is known about. It gets little use by the game.

To me it look like it's in both games, since I believe it's used to animate the light coming from chests (see object_box).