• Unity
  • Duplicated slots for blending. What happens if I do this...?

Hi there,

I have a question that it might be a bit too obvious, but I want to confirm it.

I'm using duplicated slots to apply addtivive/multiplied blended tinting to body and hair layers. It looks better than if I just black tint the base image.

But my question is... all those duplicated meshes are also being computed independently in Unity? Because if they are, then I'm making the model a lot more "expensive".

I assume the runtimes can't know if a given slot contain meshes that actually are exact duplicates from another, right?

Well... they would, if you guys finally implement off-slot linked meshes. Maybe this is yet another reason to do that? :smirk:

Related Discussions
...
Abelius wrote

But my question is... all those duplicated meshes are also being computed independently in Unity? Because if they are, then I'm making the model a lot more "expensive".

Only linked meshes with Inherit deform enabled will be deformed by one set of deformation keys.
Mesh attachments - Spine User Guide: Linked meshes

If Inherit Deform is checked, then any deform keys for the source mesh will also affect the linked mesh. If Inherit Deform is not checked, deform keys for the linked mesh can be set as normal, separately from the source mesh.

Abelius wrote

I assume the runtimes can't know if a given slot contain meshes that actually are exact duplicates from another, right?

Computation is only saved when they are specifies as linked meshes, there is no test if they are exact duplicates.

Uhh... I'm not sure we're on the same page. :think:

What I mean is that the duplicated meshes are actually on another duplicated slot, so the master meshes from those duplicated slots can't have "Inherit deform" as a setting. That's for linked meshes only, right?

On one hand I have this "base" slot...:

On another I have this "multiply" slot...:

...which is duplicated from the base one, and I'm using this just to apply a multiplied tinted overlay...:

The final result is nicer than just trying to tint the base slot...:

But... as I was considering earlier, if I'm duplicating the whole slot, and linked meshes can't be outside their master's slot (yet, and I really hope this changes in 4.1), then I'm assuming all the calculations needed for the original slot master mesh, will need to be done as well for the duplicated slot master mesh I'm using for this additional tinting...

Right?

That's what I'd like to clarify. If, by doing this, I'm doubling the amount of computations the runtimes need to do, "just" for tinting the thing in a more pleasing way. :rolleyes:

Abelius wrote

But... as I was considering earlier, if I'm duplicating the whole slot, and linked meshes can't be outside their master's slot (yet, and I really hope this changes in 4.1), then I'm assuming all the calculations needed for the original slot master mesh, will need to be done as well for the duplicated slot master mesh I'm using for this additional tinting...

Sorry, I didn't say it explicitly: as meshes on different slots can't be linked meshes, and only linked meshes with Inherit Deform enabled will save computation, this will not save the duplicate computation.

Alrighty and thanks!