• Editor
  • Suggestion: Linking meshes in different slots for draw order

Related Discussions
...

Hi!

When we are working on image attachments where one attachment need to fit inside the other one ( e.g. a character inside a car / mech, or a head inside an armor piece), we generally need to break the outer attachment apart into a "front piece" and a "behind piece". Then we fit the other attachment in between them.

For example, we need this head inside the helmet, being drawn on top of one side of the helmet but under the other side.

Like this:

In order to do that, I generally break the helmet down to 2 pieces and into different slots (under the same bone). Then fit the head inside.

In this case, when we need to use mesh to transform the helmet, we need to make sure that the front piece and the behind piece of the helmet has almost the same mesh transform in order for the seaming part to match.

One way to achieve this is to give the exact same mesh to the 2 images, then copy and paste every mesh transform keys in the animation.

Another way is to control the mesh transform with only the weighted bones, then set the same weights on the 2 meshes.

The second way is not always preferable because of the limitation when using weighted bones. The first way can achieve the goal of keeping the 2 meshes the same, but it requires repetitive labor especially when the animation needs a lot of tweaking.

Is there an easier way to achieve 'linked mesh' effect on different slots so that we can easily use mesh transform and keep the 2 pieces synced when they are only separated for draw order?

Thanks!

Hi, @proxyerror!

The example seems really common, but what do you mean by this? :

The second way is not always preferable because of the limitation when using weighted bones.

When I make the rig that you gave an example, I set the same weights on the edge (or the crossing point) of the two meshes.

In other words, do you mean that you want to use a "linking vertex” feature? (Like, if the target vertex is transformed or its weight is changed, the change will be reflected on the linked vertex.)

Misaki escribió

Hi, @proxyerror!

The example seems really common, but what do you mean by this? :

The second way is not always preferable because of the limitation when using weighted bones.

When I make the rig that you gave an example, I set the same weights on the edge (or the crossing point) of the two meshes.

In other words, do you mean that you want to use a "linking vertex” feature? (Like, if the target vertex is transformed or its weight is changed, the change will be reflected on the linked vertex.)

Hi Misaki!

Thanks for your reply!

By the limitation of using weighted bones I mean sometimes we wanted the mesh to be in a shape that is only achievable through manipulating the vertices directly in deforamtion. Or sometimes we don't want to use additional bones for controlling these meshes, we just want to use the mesh deformation keys alone.

And you summarize it quite well, that a "linking vertex" feature will help me make sure that the two image pieces are transforming synced while I manipulate the vertices.

What I was thinking about is something simpler I guess, like this following image shows, I usually rig the first full image of the helmet in one mesh. Then I just duplicate the mesh twice so that I have 3 identical mesh of a full helmet. Then I just change the image path of the 2 duplicated meshes to the image of front and back, so that they have exactly matching vertices /meshes.

In this way, when I manipulate the vertices of the front piece of the helmet, I can copy the mesh deformation key into the back piece and they can match as I wanted.

I just thought it would be so much easier to have a kind of constraint between these 2 meshes that when I deform one of them, the other will automatically deform in the same way without manually copy / paste keys.

That being said, I do believe a linking vertices feature will not only help in the case I just mentioned, but also help in more complex situations. So it would be very nice to have the feature in the future.

Thanks so much for your reply!

For performance reasons, I'd recommend to control meshes through bones whenever possible. The important part is to give both meshes the exact same weights in the overlapping parts so that they match. It does what you are requesting without needing a new type of constraint.

If you can't, then why not copy and paste vertices transforms?
Tools - Spine User Guide: Copy/paste

Erika escribió

For performance reasons, I'd recommend to control meshes through bones whenever possible. The important part is to give both meshes the exact same weights in the overlapping parts so that they match. It does what you are requesting without needing a new type of constraint.

If you can't, then why not copy and paste vertices transforms?
Tools - Spine User Guide: Copy/paste

Hi Erika!

Sorry that I didn't know about the performance burden of mesh deformation before. Now that I understand it better I would definitely use more weights to control meshes.

That being said, I would be very glad if one day we do get a "linking meshes from different slots" or "linking vertices" feature : )

5 días más tarde