Huy137

In some case which a mesh have weights shared among 3 bones.
For example: I really need to lock the weights of the Main bone at 60% and toggle the weights between the Bone A and Bone B up and down to see how the mesh change
Is there any way we can lock the weights of specific bone for this purpose?
Huy137
  • 전체글: 61

Nate

Currently there isn't a way to do that, sorry. We will improve this in 4.1.

You could of course adjust the other bones, then set boneMain back to 60% (using either Direct or Replace).
사용자 아바타
Nate

Nate
  • 전체글: 11261

Huy137

Nate 작성:Currently there isn't a way to do that, sorry. We will improve this in 4.1.

You could of course adjust the other bones, then set boneMain back to 60% (using either Direct or Replace).
Thank, I'm glad to know that we will improve this in 4.1.
Because re-adjust the weight back to 60% with a dozens of vertices really not a comfortable experience :wounded: .and let's not talk about a mesh with hundred vertices :scared:
Huy137
  • 전체글: 61

Erika

We actually have weight locking as a proposed enhancement here:
https://github.com/EsotericSoftware/spine-editor/issues/338
I've added your +1!

You should avoid having dense meshes in the first place, about this here is a nice read about good mesh structures:
Blog: Mesh creation tips: vertex placement
Blog: A taxonomy of meshes
Blog: Mesh weight workflows

But of course, where there's a will there's a way. If you just have to apply 60% of a bone influence to several vertices, then select all of the vertices, select the bone in question, and set the weight to 60%. It will be applied to all of the vertices.

I presume that's not really the problem though, is it? you likely need to get some other weight to a certain specific amount, and then ensure this specific bone is still at 60% after changing it. You could tweak the weights and then set the amount back to 60% and that would work, but it would wreck the previous weight.

So in case you need to have a specific set amount for a bone weight, and a specific weight also for another bone on the same vertex, here's how I do it:

Let's say that I want my weights to be 20% one bone, 20% of a second bone, and 60% of this third bone.
I'll set 100% of the weight on the first bone, then 50% on the second bone: this brings the percentage of both to 50%. Then I'll apply 60% of the third bone weight to the vertex. The setup is achieved.

This works because whatever percentage I apply last will eat up the amount I set and proportionally resize the others.
Since you have a 60% weight fixed on the third bone, that leaves 40% max on the other bones to spare.
Say you want to achieve the first bone set to 10% and the second one set to 30%: that's basically 1/4 for the first, and 3/4 for the second bone.
You'll set the first to 100% (to have a clean slate) then the second to 75%, then apply 60% of the weight to follow the third bone. Setup achieved again!

Whenever you want to recreate exact weights, always note down the percentage of the weight you remove, and the new weights without it, then set them again in reverse on the new vertex.

As Nate mentioned, applying specific weights is very easy also using the replace mode in the weights view: Weights view - Spine User Guide: Brushes
or using direct as I mentioned above.

If you concern is purely to see the result of the whole thing while moving, then my recommendation is to consider the approach of first making every piece move at their greatest range, and only later apply a global 3D effect, exactly to avoid having to go back and forth this way.
If you'd like to discuss what you want to achieve with the setup you're creating, I'd be happy to give more detailed advice (:
사용자 아바타
Erika

Erikari
  • 전체글: 2951

Fabiano

Nate 작성:We will improve this in 4.1.
Sweet words to my ears 🥰
I'm so much looking forward it
2D Freelance Animator
사용자 아바타
Fabiano
  • 전체글: 34

Huy137

Erika 작성:We actually have weight locking as a proposed enhancement here:
https://github.com/EsotericSoftware/spine-editor/issues/338
I've added your +1!

But of course, where there's a will there's a way. If you just have to apply 60% of a bone influence to several vertices, then select all of the vertices, select the bone in question, and set the weight to 60%. It will be applied to all of the vertices.
The problem is the main bone which I want to look have different weight for each vertex, 60% is just for that single vertex.
So when I mention about "locking a bone's weight", it mean locking all the weight belong to the bone on that mesh, other weight of other bone on that mesh can go freely at the mean time.
You can check out this example:

As you can see I set up the main bone for the arm first (those blue bones) then I created the secondary bones for biceps and other muscle later.
Which mean the Biceps bone eat up some % of the Upper arm because it's the child bone of this, but Lower arm's weight should be kept intact because biceps not a child bone of "Lower arm" (Some vertex have weight of both Lower arm and Upper arm)
That's when we need to lock % of Lower arm's weight and toggle the weight of Biceps bone
Huy137
  • 전체글: 61


다시 돌아감: Editor