Static Objects & Batching β
Marking scenery Static tells Awaken3D an object never moves, which lets the renderer merge many objects into a single draw call and gives physics a simpler, fixed body. This page explains what the flag does and when to use it.
The Static flag β
Static is an entity-level flag (not a component): it's either on or off for a whole object. Set it from the Inspector or the Hierarchy's right-click menu, on one object or a whole multi-selection at once. It's an undoable edit, and it's saved in the scene (an object is only written as static: true when the flag is on).
The flag is a promise: this object's transform will not change at runtime. Two systems act on that promise.
πΈ Screenshot - save as img/world-static-flag.png
The Inspector header of a selected building with the Static checkbox ticked, and the stats overlay showing the "Static β¦ merged" count.
What marking Static does β
1. Render batching (index-merge) β
Drawing thousands of separate scenery meshes is expensive - each is a draw call. Static batching collapses many of them into a few.
Awaken3D uses an index-merge scheme. Static meshes that share a texture and sit in the same spatial cell are concatenated into one merged mesh and drawn together. Crucially, world transforms are not baked into the merged geometry: every vertex keeps its object's local position and carries an objIndex that selects that object's matrix from a stable per-object transform buffer in the shader.
Objects are bucketed by spatial cell so frustum culling still works at chunk granularity - a chunk of scenery off-screen is culled as a unit. Opaque and alpha-blended statics go into separate chunks so blending still sorts correctly.
Two kinds of static object are kept off the merge and drawn per-object instead: one with a MeshMaterial (its custom shader can't run through the material-blind static pipeline), and one with shadow casting turned off. Everything else static falls back to per-object drawing once the Batch threshold or merge budget is reached.
2. A fixed physics body β
For physics, a static object with a collider becomes a fixed body - immovable world geometry that other bodies collide against but that never itself responds to forces. This is exactly what you want for floors, walls, and terrain.
Repeated meshes stay instanced β
Not everything should merge. A mesh used many times (a fence post placed 500 times) is already efficient to draw with GPU instancing - one upload, many transforms. Merging those would duplicate the geometry hundreds of times and blow up memory.
So batching only merges low-repeat static meshes. A mesh is merged only if its use count is at or below the Batch threshold; heavily-repeated meshes are left instanced. The result: unique scenery merges into a few draws, and repeated scenery stays instanced.
Moving a static object is cheap β
The "static" promise is about the common case, not a hard lock. Because the merge keeps per-object transforms in a separate buffer, moving a static object is a single transform-slot write - no re-merge, no geometry rebuild. Only adding, removing, or moving an object across a cell boundary rebuilds the affected chunk. In practice you can nudge static scenery in the editor freely; you just shouldn't animate it every frame from a script (use a non-static object for that).
Settings β
Static batching is tuned in Render Settings:
| Setting | Default | Range | What it controls |
|---|---|---|---|
| Static batching | on | on/off | Master toggle for merging static scenery. |
| Batch threshold | β€ 8 uses | 1β32 | Only meshes used at most this many times are merged; more-repeated meshes stay instanced. |
| Merge budget | 8M verts | 4β32M | How much geometry to merge into chunks before falling back to per-object draws. Raise on heavy scenes to cut draw calls; costs merged-geometry GPU memory. |
Watch the Draw calls and Static β¦ merged figures in the Viewport stats overlay while you tune these - the goal is fewer draw calls without exhausting memory.
πΈ Screenshot - save as img/world-render-settings-batching.png
The Render Settings panel showing the Static batching toggle, Batch threshold slider, and Merge budget slider.
When to use it β
- Do mark non-moving scenery: buildings, walls, floors, terrain decoration, static props - especially many unique small meshes that share a texture.
- Don't mark objects that move under script or physics each frame (doors, platforms, characters, pickups that spin) - keep those non-static so the renderer treats them as dynamic.
See also β
- Rendering performance - draw-call budgets, instancing, and the full perf picture.
- Transforms & Hierarchy - the moved-set that makes moving a static object cheap.
- Render Settings - where the batching sliders live.
- Colliders - how a static collider becomes a fixed body.