[Feature Request] PN Triangles tessellation for UProceduralMeshComponent

As of 4.11, assigning a material with “PN Triangles” tessellation to a UProceduralMeshComponent produces garbage results. The mesh starts glitching as shown in this picture:

The shape itself changes at every frame, probably because some random memory is read every time during processing.
The easiest way to reproduce this is to use the blueprint function “Generate Box Mesh” and assigning a material with tessellation enabled.

As far as I understand from reading the Engine source code, PN Triangles requires adjacency information, but there is no way to generate/provide that information for a UProceduralMeshComponent. This feature would be a really nice addition to procedural meshes and other people are interested in making it work as well (see https://answers.unrealengine.com/questions/404566/tessellation-to-procedural-mesh-component.html for an example).

Is there any chance to see this feature in the near future?

I’ve made a custom procedural mesh component supporting that. It’s an horrible hack, but it works :wink:

ProceduralMeshComponent.h

ProceduralMeshComponent.cpp

Build.cs

The main idea is to do Mesh.Type = PT_12_ControlPointPatchList with FMeshBatch& Mesh.

Tested on 4.17