0
$\begingroup$

The situation is as follows - I use the model in Unity, the human model and there are clothes for it, need to turn off groups of vertices that are not visible, for example, the legs on which the pants are worn. In Unity there is no option to turn off vertex groups, but there is an option to adjust shape keys, can this be used? How to set shape keys so that groups disappear?

Or what other options are there?

The idea comes to mind to make several blanks with the absence of some parts of the mesh, but I think this is stupid...

$\endgroup$

1 Answer 1

1
$\begingroup$

Shapekeys are essentially just a snapshot of your vertices in a different position, accompanied by a factor to tell the object how much to move the vertices between the original and the shapekey.

All you can do in a shapekey is move vertices around. So, if you want to use that in order to hide something, the only way is to hide the vertices, either mover them inside something else, or scale them down to zero (ideally both).

To scale them down:

  • go in edit mode in the shapekey to hide the vertices
  • select the vertices you want to hide
  • make sure your Pivot Point is set to Median Point:
    median point
  • press S 0 enter

That being said, when people make video games, any part that isn't meant to be there is simply made into a distinct asset, so that you can let the game engine load it in an out when needed instead of wasting resources having everything loaded even when not needed.

$\endgroup$
8
  • $\begingroup$ that is, you propose to cut the body mesh into separate meshes and turn off / on the necessary pieces? this option will not work, I tried it, there are problems with normals, and this adversely affects performance. and as for scaling, if set scale to zero in the shape key, is it equivalent that there is no mesh? Interesting, need to try... $\endgroup$
    – Zimaell
    Feb 10, 2023 at 20:53
  • $\begingroup$ But vertices can't be set to scale zero... Not that. How in general it is possible to set parts of a mesh to zero scale and to set this value in a shape keys? Or am I misunderstanding something... $\endgroup$
    – Zimaell
    Feb 10, 2023 at 21:13
  • $\begingroup$ you propose to cut the body mesh into separate meshes and turn off / on the necessary pieces? Not into separate meshes, but into sepeare OBJECTS. And in your game engine, import them as different assets. $\endgroup$
    – L0Lock
    Feb 10, 2023 at 21:30
  • $\begingroup$ if set scale to zero in the shape key, is it equivalent that there is no mesh? Not exactly. When you scale a bunch of vertices down into a virtually infinitely small size, you just can't see them. It isn't the invidivual vertices that are scaled down, vertices have no scale. It is their position relative to each other that is affected when scaling down. $\endgroup$
    – L0Lock
    Feb 10, 2023 at 21:32
  • $\begingroup$ there are problems with normals, and this adversely affects performance that sounds like a different issue to address in a different topic then ;) $\endgroup$
    – L0Lock
    Feb 10, 2023 at 21:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .