Skip to content
PRODUCT GITHUB  ↗

Mesh Tools

The RealtimeMeshComponent ships a set of tools for getting geometry into and out of a RealtimeMesh, and for cleaning that geometry up before you render it. These are the utilities you reach for when the mesh data doesn’t originate from your own generator: files on disk, existing UStaticMesh assets, the GeometryScript UDynamicMesh, or a UProceduralMeshComponent you’re migrating away from.

Almost everything on these pages lives in the RealtimeMeshExt module (the OBJ loader, the StaticMesh and DynamicMesh converters, and the data optimizer). To use any of them from C++, add RealtimeMeshExt to your module’s Build.cs:

PublicDependencyModuleNames.AddRange(new[]
{
"RealtimeMeshComponent",
"RealtimeMeshExt", // OBJ loader, converters, optimizer
});

The URealtimeMeshProcedural drop-in component and its helper library live in the core RealtimeMeshComponent module instead — that difference is called out where it matters below.


The common currency: FRealtimeMeshStreamSet

Section titled “The common currency: FRealtimeMeshStreamSet”

Every tool here speaks in terms of a FRealtimeMeshStreamSet (or its UObject wrapper URealtimeMeshStreamSet on the Blueprint side). A stream set is just the collection of raw vertex and index buffers — position, tangents, texcoords, colors, triangles, poly groups. It is not yet a renderable mesh.

The pattern is always the same:

  1. Fill a stream set — from a file, a converter, or your own builder.
  2. (Optional) Optimize it in place — see Mesh Optimization.
  3. Hand it to a mesh — URealtimeMeshSimple::CreateBufferSet(GroupKey, MoveTemp(StreamSet)).

Because the stream set is plain CPU data, steps 1 and 2 can run on a worker thread; only the final CreateBufferSet needs the game thread. See Key Concepts for the stream set and builder fundamentals.


  • Loading Meshes — Load OBJ files at runtime (sync or async) with URealtimeMeshObjLoader, and the general recipe for wiring any other file format into a stream set.
  • Converting Static Meshes — Copy geometry between a UStaticMesh asset and a RealtimeMesh in either direction with URealtimeMeshStaticMeshConverter.
  • Converting Dynamic Meshes — One-shot conversion to and from GeometryScript’s UDynamicMesh with URealtimeMeshDynamicMeshConverter, plus how RMC relates to UProceduralMeshComponent.
  • Mesh Optimization — Reindex, cache-optimize, reduce overdraw, and improve vertex fetch with the meshoptimizer-backed URealtimeMeshDataOptimizer.

For meshes whose source is another live mesh that you want to keep mirrored automatically (rather than converted once), see the mesh types: