I have a ring model which have 3 materials applied on it front face. I want to modify(shrink) the width of portion of mesh any of material have, and rest other 2 materials portion of meshes fills the shrink portion of first one, Is this mesh edit possible at runtime ?
Yes, meshes have a whole API surrounding editing them: Unity - Scripting API: Mesh
Yes, you can access the vertices with
And then move them any way you want…
But that is the difficult part, mesh will easily look broken if make faces overlap or other issues.
or if you already know your min and max modification ranges,
Some alternatives could be using
- blendshapes (created outside unity) Unity - Manual: Work with blend shapes
- or encoding data into vertex attributes (then you could make them move between that given ranges or positions)
other ways:
- using Alembic format (and have precalculated data)
1 Like