Performance
CAD assemblies are not authored for real time. They arrive with thousands of parts, millions of triangles and no thought for a frame budget. This page is what the plugin does about that, and what to reach for when a frame is short.
One primitive, few draws
A document is a single primitive whatever its part count, and neighbouring parts that agree — same material, same level of detail — are merged into one draw. With indirect drawing on, the visible indices are compacted on the graphics card and drawn as a single call. So the cost of an assembly is its geometry, not its part count.
The levers, in the order worth trying:
| Lever | What it does |
|---|---|
| Levels of detail Generate Levels Of Detail, r.Cadaclysm.LodScreenError | Simplified copies of each part, chosen per part by how far the surface may move on screen. The default lets a level move the surface by a ten-thousandth of its screen radius, which is invisible and throws away most of the triangles of a distant part. |
Screen-size cullingr.Cadaclysm.MinScreenRadius | Drops parts below a fraction of the screen. An assembly is full of fasteners that are never worth a pixel. |
Occlusionr.Cadaclysm.Occlusion | Tests parts against the largest few as occluders. Worth it inside an enclosure, pointless on an open part. |
| Surfaces instead of triangles the surface component | Moves the cost from the load to the frame, and removes the mesh memory entirely. See triangles or surfaces. |
| Nanite the static mesh actor, r.Cadaclysm.Nanite | Hands parts to the engine as Nanite meshes. Best where the same parts are placed many times and the camera lives close to them. |
r.Cadaclysm.LodScreenError 0.Where the seconds go
Parsing is fast; meshing is not. On a large assembly the meshing stage dominates, which is why the surface component — which meshes nothing it can draw from surfaces — loads a heavy document several times faster than the triangle component and holds a fraction of the memory.
Three things quietly mesh a part that would otherwise never be meshed: asking for its bounds through the mesh path, asking for an exact outline, and asking for a coarse proxy. The first two are avoided for surfaced parts by the plugin itself; the third is Surface Proxy Mesh Cells, and it is opt-in for that reason.
Use Load CAD File Async so the frames keep coming, and watch the phases through OnLoadProgress. Get Build Milliseconds and the load's own log line say where the time went.
What the plugin will tell you
Get Last Frame Stats hands back what the last frame actually drew: parts drawn, parts culled, draw calls, triangles, and for the surface path the triangles and vertices it tessellated. Those are read back from the GPU without waiting for it, so they describe the frame a frame or two before; a part the GPU culled from view still counts as drawn. r.Cadaclysm.LogCulling logs how many parts each view drew out of how many exist, which is the quickest way to find out whether a lever is working.
For measuring one thing at a time: r.Cadaclysm.SingleBatch 1 draws the document as one batch with no per-part culling, r.Cadaclysm.MergeRuns 0 draws every part alone, and r.Cadaclysm.Indirect 0 turns off the compaction. All three are for telling where a cost lives, not for shipping.
Lumen, shadows and the distance field
A meshed document takes part in everything an ordinary mesh does. Its distance field is built by the plugin rather than cooked: Distance Field Resolution Scale sets the resolution and rebuilds it in the background, which is the one heavy thing that does not need a reload; zero removes it. The build is sliced to a target time per submission and can run on the async compute queue, so it does not stall the frames it shares.
A document drawn from surfaces casts ordinary shadow-map shadows, since a shadow view gets a tessellation of its own. For ray-traced shadows, Lumen's hardware path and distance-field effects it needs Surface Proxy Mesh Cells — a coarse mesh nothing draws. Ray tracing against a CAD model's full-detail mesh is expensive enough to be the reason the coarse proxy exists.
What is held after the load
The component keeps its own vertex and index buffers, the line points, the levels of detail, and the document's tree if Keep Document For Queries is on — the tree, never the meshes. The file is closed once the buffers are built.
The ways to hold less: the surface component (no triangles at all for parts it can draw), Use Vertex Color Buffer off (four bytes a vertex), Load Isocurves off (they outnumber the edges on a curved model), and Generate Levels Of Detail off where everything is always close.