geometry
Build and edit mesh topology: primitives, dynamic-mesh edits, UVs, collision, LODs, Nanite.
What it's for
This namespace builds and edits mesh geometry through Unreal's editor modeling tools. You start from a procedural primitive (box, sphere, cylinder, torus, stairs, pipe, ramp, and more), then reshape it with dynamic-mesh operations: extrude, inset, bevel, boolean union and subtraction, deformers like bend, twist and taper, and remeshing or simplification passes.
Beyond topology, it handles the finishing work that turns a raw mesh into a shippable asset: generating UVs (auto-unwrap, projection, packing), recomputing normals and tangents, building simple or convex-decomposition collision, generating LODs, and converting a dynamic mesh into a Static Mesh asset with or without Nanite enabled.
Reach for it whenever the target is mesh topology or a generated mesh asset. If you only need to
place, move, or transform meshes that already exist, use actor or level
instead. Most operations work on a live DynamicMeshActor in the current level, so you
shape the mesh interactively and bake it to an asset once it looks right.
Examples
Block out a pillar and bake it to a Static Mesh
Create a box primitive, push one face up to give it height, then convert the result into a saved asset.
You: Block out a tall pillar and save it as a Static Mesh.
call("geometry.create_box", {name:"Pillar", width:80, depth:80, height:60})
→ {ok:true, actorName:"Pillar"}
call("geometry.extrude", {actorName:"Pillar", distance:240, direction:{x:0, y:0, z:1}})
→ {ok:true}
call("geometry.convert_to_static_mesh", {actorName:"Pillar", assetPath:"/Game/Meshes/SM_Pillar"})
→ {ok:true, assetPath:"/Game/Meshes/SM_Pillar"}
Done. Pillar extruded and saved as /Game/Meshes/SM_Pillar.
Cut a doorway with a boolean subtraction
Make a wall and a smaller cutter box, then subtract the cutter to punch the opening.
You: Cut a doorway through this wall.
call("geometry.create_box", {name:"Wall", width:400, depth:30, height:300})
→ {ok:true, actorName:"Wall"}
call("geometry.create_box", {name:"Doorway", width:120, depth:40, height:220})
→ {ok:true, actorName:"Doorway"}
call("geometry.boolean_subtract", {targetActor:"Wall", toolActor:"Doorway", keepTool:false})
→ {ok:true}
Done. Doorway subtracted from Wall; cutter removed.
Finish a mesh with collision and Nanite
Generate convex collision on the dynamic mesh, then bake it out as a Nanite-enabled Static Mesh.
You: Give the rock collision and export it as a Nanite mesh.
call("geometry.generate_complex_collision", {actorName:"Rock"})
→ {ok:true}
call("geometry.convert_to_nanite", {actorName:"Rock", assetPath:"/Game/Meshes/SM_Rock_Nanite"})
→ {ok:true, assetPath:"/Game/Meshes/SM_Rock_Nanite"}
Done. Rock collision generated and saved as a Nanite mesh.