Procedural Mesh Component - UV per triangle, not per vertice

Hello,

I’ve created a hexagonal grid field with the Procedural Mesh Component, however, I’m trying to find out if we can supply uvs per triangle as opposed uvs per vertice?

What I mean by that is just like in Blender or any other 3D modeling software you can provide one set of UV coordinates per triangle of a hexagon like the image below.

Each triangle has it’s own coordinates per vertice connected, with the same vertice re-used per triangle(There are only 7 vertices in the mesh, yet there are 18 vertices in the UV).

Is it possible to supply the procedural mesh component somehow with the same type of UV data? For our implementation, we do need UV’s per triangle, not per vertice.

https://forums.unrealengine.com/core/image/gif;base64

If I understand correctly, no, you can’t. That’s because nowadays GPUs take their vertices in a packed format for best performance. This mean each vertex is a complete structure, containing position, normal, color, UVs, etc. and each triangle is defined by only three indices into the list of vertices and the Procedural Mesh Component tries to match this. 3D Modelling Programs have more relaxed performance requirements and perform and convert the data under the hood to display on the viewport.

To do what you want you will need to have unique vertices per hex tile, you cannot share the vertices at the tile borders.

The image appears to be broken

Fixed the image, thanks!

Why not just use a duplicate vert at same position with different uv coordinates

That’s what we’re already doing but I prefer not to duplicate verts as that increases the vertex count considerably so I’m checking if there’s maybe any other way of doing it

Are you having performance issues? If not I would just let it go and use the redundant UV data in each vert.

I would like suggest to think about if really need UV for per triangles. Just can not make sense of it.