Vertex Groups Support

Good day,

I’m hoping to find out if Babylon supports Vertex Groups or the grouping of vertices on a mesh, and if it would be possible to update that group along an axis by n units?

I’m very new to graphics, and any assistance or pointing me in the right direction would be greatly appreciated.

Hi @Kieran_Reilly and welcome to the community.

I do not know about vertex groups, however a search for vertex groups in the forum bring up some threads relating to vertex groups and Blender.

Perhaps submeshes would meet this need?

submeshes example of one use

Hey John.

Thanks for the warm welcome and taking the time to reply.

I had a look at the submesh example you posted and see the benefits submeshes buy you in terms of multi-materials. Would it be possible to query a submesh and apply a transformation to it, such as changing it’s position or scaling it along an axis?

Having looked at a subMesh in more detail it appears to be an abstract holder for a limited section of a mesh rather than a mesh in its own right. This means the answer to your question is no, unfortunately.

To me it looks like to create a ‘Vertex Group’ as you need, according to your description, there are two ways to go.

  1. Manipulate the vertex data within a section of the mesh, probably using matrices.

  2. Build a new mesh for each section of the vertex data you want as a vertex group, parent these new meshes to a root and then position and scale the new meshes individually.

Where is the mesh you want to divide into groups coming from? Are you creating it directly with Babylon.js or are you importing it?

Thanks for the direction.

We’re looking to generate rounded planes within Babylon similar to the one in this example.

However we’d like to section the plane into 5 groups, 4 groups containing the rounded corner areas, and 1 group containing the middle rectangle area.

We’d then like to scale the middle rectangle area along an axis as well as re-position the corner sections accordingly.

From your description above, I have a feeling using matrices is probably the best bet to achieve this result

Hi just checking in, was your question solved? @Kieran_Reilly