Procedural geometry: choose an API
ArrayMesh, SurfaceTool, MeshDataTool, ImmediateMesh, MultiMesh and server RIDs by task.
Choose by data and update frequency
| Task | API | Fit |
|---|---|---|
| Position, normal, UV and index arrays already exist | ArrayMesh | Direct surface creation |
| Emit vertices sequentially and generate normals/tangents | SurfaceTool | Preparing attributed geometry |
| Need existing vertex/edge/face connections | MeshDataTool | Triangle-topology analysis and edits |
| A few frequently changing lines or triangles | ImmediateMesh | Small diagnostic geometry |
| Many instances of one mesh | MultiMeshInstance3D | Shared geometry, individual transforms/colors |
| Own rendering instances without MeshInstance3D | RenderingServer | Explicit RID lifetime and rendering scenario |
Mesh is geometry data. MeshInstance3D is an Entity that displays it. MultiMesh stores many instances; MultiMeshInstance3D displays them. Creating a resource alone neither adds it to the visible world nor creates a collider.
Surface and vertex
A mesh contains surfaces, each with attributes, primitive type and material. A vertex includes its normal, UV, color and other enabled data, not just position. UV seams and hard edges may require multiple vertices at one position. An index identifies the full attribute set, not merely a geometric point.
For Triangles, each index triple forms a triangle. Four vertices and six indices form the example quad. Winding determines its front side; normals determine lighting. Disabling back-face culling does not repair incorrect indices or normals.
Shared example setup
Use a Reckfell 1.0.0 C# project, a separate Entity3D-root level and a 640×420 base viewport. Each article lists every required file. GeometryStage3D provides only camera, light, floor and caption; the main component builds the geometry being taught. Build and run with F6.
Compute arrays separately from display when appropriate. These examples mutate Mesh, Entity trees and server instances on the main thread. Renderer readbacks and full per-frame rebuilds need measurement. Checks establish Windows/OpenGL correctness, not a promised speedup or every-platform export readiness.