Abelius

GO TO THE LAST POST FOR THE NECRO RE-EDIT
------------------------------------------------------------------------

Hi there,

Linked meshes are awesome. Period. :p

Now, they would be even more great if they could go in different slots, which is currently not possible.

I imagine there's some technical difficulty for this not being a reality, but I'd find that feature veeeery useful when customizing characters.

The reason I say this is because I have multiple models that use tight fitting clothes, tattoos, scars, etc... that I need to assign (make visible) in a completely random way at runtime. That is...: one character could have a scar in his face, while other could have it in his arm, so Skins are not an option here because of the huge number of possible combinations.

Anyway, as these meshes would need to move exactly as their parent body parts, my objective is that they inherit it so I don't need to do anything to animate those.

All this have left me with the only option of pre-making every body part with/without those 'props' and generating my characters by randomly picking an attachment (L_Arm_Tanned_Scar, L_Arm_Bodysuit, L_Arm_Pale, etc, etc, etc...) for every body part in the model.

But if you could have a linked mesh in a different slot, then I'd be able to have a slot for the body part with its different skin tones (and assign them to skins), and then other slots to make visible (or not) things like a tattoo, a scar or a given clothing part. And as all of them would share the same mesh and animation keys, I wouldn't need to do anything more than managing ONE mesh when animating.

And, my friends, would be awesome. :nod:
사용자 아바타
Abelius
  • 전체글: 179

Erika

I know right? I wanted to allow the player to change the color of the hair of the character, but to retain lights and shadows separately, and it's a nightmare! I had to give it up and put that project on hold, sigh.

I vote for this feature!

(but they already said that it would be bad if spine had to check in other slots too for the presence of a linked mesh... I wonder if by telling the source where the children are would make any difference...)

Or if one could al least copy and paste the shape of a mesh it would be great. One could then just move all the meshes through weighted bones and that would be a nice compromise at least.
사용자 아바타
Erika

Erikari
  • 전체글: 2588

Abelius

Erikari 작성:Or if one could al least copy and paste the shape of a mesh it would be great. One could then just move all the meshes through weighted bones and that would be a nice compromise at least.
Actually, that's what I'm doing right now.

For example, I`m duplicating the F_Arm_Green master mesh to F_Arm_Scars_Dark, and put it in another slot (F_Arm_Scars). Then I create a linked mesh in that slot for the other scar Light variation.

What I get then is the compromise you mention: a mesh that has the same weighting configuration as the 'parent' body part, so it moves reasonably well unless at a given animation I've set heavy deformation in the original 'template' mesh. But of course, no animation keys are transferred over to the duplicated mesh. And you also need to remember to duplicate again these meshes when you reconfigure weights in the original ones.

Of course for this to work the scars layer needs to have exactly the same dimensions as the parent mesh. So even if the contents of F_Arm_Scars_Dark are only the scars and they could be cropped, you must instruct your artist to expand its layer dimensions to be like F_Arm_Green. That means you'll move a lot of transparent pixels and could possibly be not the best thing to do in mobile games, but it works well enough on desktops.

At any rate is a trick that I'd prefer not to use and have linked meshes instead of duplicated ones. ;)
사용자 아바타
Abelius
  • 전체글: 179

Davi Clean

We NEED this feature!!!

Linked meshes on different slots would take spine to the next level!
Davi Clean
  • 전체글: 35

Erika

Lol, that sure was fast.
Remember that if you need you can always duplicate a mesh (not making it a linked mesh) and then change the path of the image. If you don't do direct mesh deformations but bind them to bones this trick works nicely.
사용자 아바타
Erika

Erikari
  • 전체글: 2588

Nate

Some discussion about this is in the last paragraph here:
The reason for this limitation [all linked meshes in same slot] is DeformTimeline, which changes the vertices for a mesh. To find which mesh it should change, it knows what slot to look in. If a linked mesh could be in any slot, it would have to look in ALL slots for potential meshes it should change.
An animation says "DeformTimeline, apply yourself at time X". DeformTimeline gets the attachment for a slot, if it's a mesh it asks it "I'm supposed to be applied to mesh Z, should I be applied to you?". The mesh says yes if it is mesh Z or if it is a linked and mesh Z is the source mesh.

What happens if linked meshes could be in different slots? Now there could be multiple linked meshes visible in different slots at the same time, so DeformTimeline might have to apply itself to multiple attachments. How does DeformTimeline know which attachments to apply itself to? It would have to query the attachment for every slot to see if that attachment is one it should be applied to, and if so it sets the vertices on the slot. Every time an animation is applied (generally once per game frame at runtime), every DeformTimeline in the animation would have to look at the attachment for every slot. Eg 5 DeformTimelines * 30 slots = 150 checks.

There may be ways to reduce checks, eg DeformTimeline could know that linked meshes it affects can only be in slots A, B, or C so it only checks those. This is better, but feels a bit dirty.

Another option might be to simply disable deform inheritance for linked meshes that aren't in the same slot as the source mesh. The "inherit deform" checkbox would be unchecked and disabled. Vertex manipulation can still be done by keying the linked mesh (resulting in a separate deform timeline) or using weights. This feels like the most reasonable solution. Any thoughts?

I've added an issue to track this feature:
https://waffle.io/EsotericSoftware/spine-editor/cards/5939dc0b2a479a007e032a73
사용자 아바타
Nate

Nate
  • 전체글: 9957

Davi Clean

So? any news on when this feature will be available? It really is a pointless limitation that shouldn´t exist.

We need to create multiple meshes that are visible simultaneously and are affected by the same bones.

Thank you
Davi Clean
  • 전체글: 35

Nate

There is certainly a point to the limitation, as explained.

Unfortunately we have a large backlog of bug fixes and other efforts and don't currently have an ETA for when linked meshes can be moved to other slots. You can subscribe to the issue on GitHub to get email notifications when there is activity. When we do implement it, likely the restriction will be that mesh deform will be disabled on linked meshes in other slots.
사용자 아바타
Nate

Nate
  • 전체글: 9957

Erika

@Davi Clean
Remember that if you need you can always duplicate a mesh (not making it a linked mesh) and then change the path of the image. If you don't do direct mesh deformations but bind them to bones this trick keeps on working very nicely.
사용자 아바타
Erika

Erikari
  • 전체글: 2588

pag

Erikari 작성:Remember that if you need you can always duplicate a mesh (not making it a linked mesh) and then change the path of the image. If you don't do direct mesh deformations but bind them to bones this trick keeps on working very nicely.
Exactly. I'm working with a highly customisable character right now and it has never been a problem working that way. I really don't understand the issue here and have never been limited in any way.

Don't key the meshes, use weighted bones
pag
  • 전체글: 48

Abelius

pag 작성:
Erikari 작성:Remember that if you need you can always duplicate a mesh (not making it a linked mesh) and then change the path of the image. If you don't do direct mesh deformations but bind them to bones this trick keeps on working very nicely.
Exactly. I'm working with a highly customisable character right now and it has never been a problem working that way. I really don't understand the issue here and have never been limited in any way.

Don't key the meshes, use weighted bones
But there IS a limit. As Erikari mentions "If you don't do direct mesh deformation..."

That's the exact point of this thread: that we key mesh deformations and they don't get linked if you just duplicate to another slot.

Example: I make a nude model and then a TIGHT bodysuit with different stages of integrity (yes, I'm that guy making adult games... ^_^). The bodysuit parts have the same dimensions as their naked counterparts. And to worsen things even more, I have different colored skins for the nude model.

Therefore, the ideal way to do this would be to render both the naked body parts AND the bodysuit parts on top. And both of those sets should be synchronized, so if I adjust a nude mesh in the future (the curve of the butt for instance), that change gets also duplicated to all the bodysuit linked meshes in the other slot.

Now, I know you guys have a lot of work and I'm not demanding anything here, but please don't disregard this feature. It would be useful for a lot of people. Maybe not the majority, but a good deal for sure.

Thank you.
사용자 아바타
Abelius
  • 전체글: 179

pag

Hi, correct me if I understand it wrong but I feel we have almost the same situation.

So in the example below I have an image for the skin of the leg and on top of it I have a image for the pants that are almost as tight as the skin.


First I create the mesh and the weight for the skin, then I duplicate the slot and swap the image for the pants. The image will keep the same weight so you won't see the skin. Inside the slot, I can put any kind of customisable pants I need. All the images need to be same size.

I never key the meshes.

Skin colours and clothes are changed by code in Unity.

Hope it make sense!
pag
  • 전체글: 48

Erika

You're right, pag, this is eaxctly the workflow I was suggesting (:
(but I feel you, I'm still up for allowing this feature at least in the editor only)
사용자 아바타
Erika

Erikari
  • 전체글: 2588

Abelius

Just to clarify my stance: I'm not saying I'm not doing that already. I do! But only because I have no other choice.

Keep in mind that there are things that are not so easily adjusted just with bones. Some fine tuning is required for things like a... woman body.

Moreover, there are times when I pose a character in the first frame of an animation, and when I show it to my artist, he asks me to deform several meshes so the body curves are more realistic.

Just imagine trying to do that with just bones... it's just not possible.

So my workflow is indeed like you say, pag, but every time I deform an underlying body part I also need to reduplicate all clothes meshes to update their keys.

Far from efficient... ;-P

---

Ok, sorry for necroing this... but the fact that 2.5 years have passed and we still have this limitation is getting on my nerves.

I know you guys have a lot of work, and you're the developers and have the right to establish what your priorities are... but still, let me give you a graphical example.

This is one of my models for a new game...:



To not complicate the post too much, let's say the legs have three parts...: foot, shin, and thigh.

I'm using mix'n'match to separate the body by skin tones. This is the "fair" skin tone.

Then you can have a myriad of socks. I've just started to add them, so there's only three there, but I plan to have 5-8 types with multiple colors each.

Now... when I said in previous posts "I need skin-tight clothing follow exactly the body parts underneath", now you'll see with this model that I wasn't exaggerating, right? I mean, this is not your typical platformer character. This is going to be zoomed in to an absurd level and it really needs to look good.

So, when I started to use Spine three years ago, I thought... "Well, so let's use linked meshes and give the tight-fitting clothes the same mesh as the body part they're on..." And yes, that works well... until you need to put that clothing on another slot.

Then you only have the option to duplicate, losing any future adjustment you make on the master mesh.

"But why is that a big deal? Any decent animator will just use weighted bones, you stupid amateur, har har!"

Yeah, and that's what I'm doing now because I've learned a lot since I started this post.

But... you change the weights of the original mesh, and you need to recreate it on the duplicated slot master mesh. You add, move, delete a vertex...: same. Any little, tiny, minuscule change you make... no longer identical, so I'll have a thigh flexing X, and a sock flexing X minus 10.

And yes, you can re-dup, deleting the master mesh in the duped slot, and recreate AAAAALL the slaves and put them again in their skin placeholders.

Do that with 50 skins... I dare you.

So, what will I need to do from a realistic perspective? I either try not the change anything in those body parts for the 3-4 years of development this will take...

...or multiply those 50 types of socks by the 3 skintones we will have. That is, merging each sock type, color and skintone for that thigh, every possible combination... and do that for the other thigh and any other body part that could have skin and cloth at the same time, and needs to move the same exact way.

Now... seriously... just having 3 skins for the body and whatever skins for the clothes, and activate the body skin, then the clothing on top... wouldn't that be so much more easier?

In fact, that hell of unending combos would also translate into Unity when coding!

What is easier to code?

a) Activate fair skin; activate black high socks

...or b) Activate fair skin, search (somehow) which is the name for the skin that has the black high socks over the fair skin

So please, by the gods, recover this as a reasonable feature to research into.

I mean, if this makes my computer explode, so be it. It could be optional, you know. Put a checkbox or something on the Settings, but for the love of god, why is this impossible to do?

Anyway, thanks for reading yet another wall of frustrated text.
사용자 아바타
Abelius
  • 전체글: 179

Nate

I'm really sorry for the frustration. We do understand the issue is painful. Right now we have a lot of construction sites and we are starting to connect many of the pieces we have been building over the past year. Coming soon and in this order: We've got new server architecture so the website and downloading updates will be faster. We've got a new 64-bit launcher that allows Spine to use more than 1GB of RAM and will make Spine run faster. The new launcher is quite a bit larger, making the server updates more important. We've got a curve editor that makes a huge improvement in the quality of all animations created with Spine. Each of these things are really big. Once they are complete then we will do an update that focuses on quality of life/workflow improvements and that will include the one you are suggesting.
사용자 아바타
Nate

Nate
  • 전체글: 9957

Abelius

Thanks for replying, Nate. Much appreciated.
Nate 작성:Once they are complete then we will do an update that focuses on quality of life/workflow improvements and that will include the one you are suggesting.
That's great! If that's the case, I'll use duped slots for clothing, in preparation for when it gets released.

Do you think it'll be ready by this year's fall? :bigeye:
사용자 아바타
Abelius
  • 전체글: 179

Nate

I would be very sad if it was not!
사용자 아바타
Nate

Nate
  • 전체글: 9957


다시 돌아감: Editor