Mesh outline

hi, in games libe BlackDesert online when you customize the cahracter each part of the body is highlighted when you mouse over it, anyone knows how can you achieve this without splitting the character into multiple meshes

for example when you mouse is over the head, only the head glows/outlined

I’m pretty sure BDO does split the mesh. Theoretically, you could create a mask texture or use vertex colours to give each area a unique colour and then drive an highlight shader based on that, but then you’d also have to implement some custom collision testing as well.

It would be easier from a workflow issue to just split the mesh and you’re likely not going to see any real performance hit.

im using UMA im not sure about how to do it, since they combine everything into a single mesh at the end
also BDO does have glow for specific stuff like eye brows, is the mesh splitted into all these very tiny parts?

You don’t. While you’re customizing character, the mesh is split into parts.

You could try some trickery to avoid that, but honestly there’s simply no point.

Another thought: Use the bone weights to determine what a vertex belongs most likely to what bodypart.

Few problems here:

You don’t necessarily know which bone index is which bone. While SkinnedMeshRenderer has bindposes and bones[ ], a mesh may be actually split into parts affected by small number of bones. This has been used in the past when hardware could not support large number of bones.

The information about bone indexes may not be even available in the shader:
https://discussions.unity.com/t/912220

If you check examples, nothing ever touches bone weights or bone indexes:
https://docs.unity3d.com/Manual/SL-ShaderSemantics.html