Notifications
Clear all

[Closed] Copy weight table

Sorry but where exactly I should be looking for that “modified object skin”? Like mentioned, my maxscript knowledge is very low.
I gues by hierarchy make no sense in Max you mean that it makes no sence to link the root bone to the corresponding skined mesh, right? Like already said, not going argue about that, as considering max you seems to be right, as other users, that posted here, say the same, but at the end it doesn´t meter if it makes sence in max, as the game engine wants such hierarchy.

What ever game engine you’re using that requires the root to be a child of the skinned mesh is probably not worth using.

If you want to continue down the path of sillyness, ignoring suggestions from people who have been doing this for a long time, then look at the skinOps methods:

http://help.autodesk.com/view/3DSMAX/2018/ENU/?guid=__files_GUID_0820AA26_920F_434D_A6BC_E8B6B57F54AC_htm

In particular, GetVertexWeight and SetVertexWeight.

I am not using the gameengine directlly, but the game the skined models are made for uses it, so switching to any other engine is not an option.
Also, can somebody explain why should it be sily? The bones are influencing only vertices of a mesh but not the node, to which the mesh is attached, so see really not where that loops should come from.

Out of interest, what game engine is it?

The problem with hiearchachly linking a mesh to the root of the hierarchy it is skinned to is you will end up getting double transforms.
The simple order of operations for a mesh object in max is:
1 – transform is computed.
2 – mesh updates relative to its transform.
3 – modifiers adjust the mesh.

This allows nodes to modify a mesh without being a hierarchical parent of said mesh, by computing in a modifier at step 3.
Now skinning a mesh to its hierarchical parent will result in double transforms, meaning moving the parent will cause all 1 – 3 steps to evaluate, as the root moves the mesh, the mesh updates and the the modifiers tick, rather than just the modifiers updating.
Now max handles this, but it is very inefficient, especially if you have a relatively complex rig, likely resulting in significant slowdowns. So it is very much considered bad practice as you are getting the same ( potentially unstable ) result with much more calculations to get there.

You are getting the dependency loop warning because max stores a reference to all nodes a mesh is skinned to on said mesh, so linking to one of those parents, as far as max can tell when it tests for a loop, is the same as trying to make the parent of bone1, bone2 at the same time as trying to make the parent of bone2, bone1.

1 Reply
(@gtafan)
Joined: 11 months ago

Posts: 0

I thought from my nickname you can see for which game I need to do the models.
Also I am not triing to link the mesh to a bone, but the root bone to the mesh node. I see the reasons, why max has problems with that, but because of my bad english, wasn´t able to explain clearlly, what I wanted to do.
I was jus searching a way around that max limitation, so I tried to make a copy of the skin modifier, delete it, link the root bone to a mesh witout skin which is no problem in max and then add the skin modifier back with all the weights information.

There’s “Back transform vertices” in skin mod., that will take care of double transforms…
And there wouldn’t be “dependency bulsh*t”.
But as I understand he want to link rooth bone to mesh.
@gtafan And that could be done like i wrote before – delete skin mod. (putin it in “sleep mode” not helping), link and reapply same skin mod. (that’s the reason I mention “modified object skin”).
Hierarchy will hold on “on paper”, so if you need it…
But my son can’t be my father. Maybe in soap operas.

P.S.
I know there was some probs. with Unity and root bones, didn’t hear about this solution

@gtafan

The skin skeleton (hierarchy of skin bones) must not be linked to the skin mesh. It’s one of the main skinning rules. Skin bones drive the mesh! Mesh can’t drive its own drivers.

If any engine asks about linking driver bones to a driven objects it’s something wrong with this engine.
the best what this engine developers can do is just kill themselves.

From Unity:

If you prefer to keep animation and Mesh information in the same Unity GameObject, parent the Mesh node to a bone in the bone hierarchy in 3ds Max before exporting.

Now, in Max parenting is called linking and it goes child->parent.
So could it be “Lost in Translation”

That was exactly what I tried to do with my code from the very first post, but my my maxscript knowledge is very low, so it didn´t worck. I searched for that “modified object skin”, but looks like google hate me , so no results.

Mesh to bone or bone to mesh, either way that is a dependency loop if the mesh is already skinned to the bone.
This is not just a limitation in max, but all DCCs as it is a basic design paradox…

Crikey, ok well irrelevant of your reasons, to properly copy the skin weights, you will need to use skinOps ( as I linked above )

http://help.autodesk.com/view/3DSMAX/2018/ENU/?guid=__files_GUID_0820AA26_920F_434D_A6BC_E8B6B57F54AC_htm2

In particular, GetVertexWeight and SetVertexWeight

Ok… Here is a deal.
If you prove that your engine requires to link a skeleton root to its skin mesh, I will post a code how to do it preserving skin modifier data.

1 Reply
(@aaandres)
Joined: 11 months ago

Posts: 0

This will be interesting… Please, wait a minute to start, I’m going to buy a great popcorn box to see this movie.

Page 2 / 3