Nanite¶
Metaplanets works with Nanite but doesn't depend on it. Use this page to decide what should be Nanite in a planet scene.
At a glance¶
| Content | Nanite? | Why |
|---|---|---|
| Terrain | No (procedural tiles) | The planet surface is generated at runtime as a quadtree of dynamic mesh tiles that morph smoothly between levels of detail. The LOD system already gives Nanite-like detail where you look, down to about 5 m vertex spacing on an Earth-sized planet (plus normal maps and micro relief below that). |
| Rocks and props | Yes, recommended | Opaque, solid meshes are where Nanite shines. The starter rocks (SM_RockA/B/C) are Nanite. |
| Trees and shrubs | Your choice per plant | Synth Plants default to Nanite. The shipped temperate kit uses classic LODs plus impostors, which work on every engine version. |
| Grass | Either | Nanite grass is drawn with plain instanced meshes for fast streaming. |
| Ring asteroids | Optional | Runtime-built static meshes; normal rendering by default. |
| Ocean, atmosphere, clouds, gas giants | n/a | Rendered by their own shaders. |
Terrain¶
Terrain tiles are procedural meshes built on worker threads as the camera moves. They don't need Nanite to look detailed:
- Tiles split until each vertex covers about
metaplanets.Lod.ScreenSpaceErrorPxpixels (16 by default), so detail follows the camera at every altitude. - New tiles morph from the tile they replace, with matching motion vectors, so there is no visible popping under TAA or TSR.
- Detail below the mesh comes from per-tile normal maps, the surface's micro relief and triplanar Synth textures (see Shading & Lighting).
- Tiles can provide ray-tracing geometry for hardware-ray-traced Lumen
(
metaplanets.TileRayTracing, on by default only when hardware RT is in use).
Terrain tiles have no mesh distance fields, so software Lumen gets no bounce light from the ground itself. Sky light and sun do most of the work outdoors; see Lighting.
Trees: Nanite or impostors¶
Every Synth Plant has a Nanite switch in Synth Plant Settings…:
| Nanite plant | LODs + impostor | |
|---|---|---|
| Settings | Nanite on (default). Leaves are real geometry, simplified with Preserve Area. |
Nanite off; Num Lods (3), Impostor on, Impostor Frames (8), Impostor Resolution (2048), Impostor Screen Size (0.08). |
| Near | Full geometry, no LOD transitions. | Mesh LODs that cross-fade. |
| Far | Nanite's own simplification; hard cut at the reach. | An octahedral impostor with depth: one card per tree, correct shadows. |
| Cost | Lower CPU and render-thread cost; heavier on the GPU at forest density. | Very cheap at distance; more draw work near the camera. |
| Engines | Works on 5.6–5.8. Masked Nanite leaves are expensive at forest density on 5.6. | Works the same on 5.6–5.8. |
The shipped temperate kit is built without Nanite (LODs + impostors) so dense forests to the horizon run on every supported engine version.
Measured with Nanite Synth Plants (about 273,000 instances, ground-level walk): render-thread time p99 dropped from 13.2 to 9.7 ms, while GPU time rose from 8.8 to 9.6 ms because of the heavier geometry. Disabling Nanite's programmable raster (no wind) saved only about 0.2 ms.
To switch an existing plant, right-click the Synth Plant, open Synth Plant Settings…, change Nanite (and the impostor settings), then Rebuild Synth Plant from the same menu.
Which should I use?
- Games targeting a wide range of hardware, or UE 5.6: LODs + impostors (the kit's setup).
- Cinematics, or a GPU-rich target on 5.7 / 5.8: try Nanite trees and
compare frame times in your own scene with
stat gpuandstat unit. - Either way, set each species' Max Distance sensibly: reach matters more for performance than the mesh type.
Nanite foliage notes¶
- Nanite has no per-instance fade, so Metaplanets' Nanite foliage material
grows plants in over the last 20% of their reach instead of popping them.
Use
M_MetaplanetFoliage(it is flagged Used with Nanite) or enable that flag on your own materials. - Wind (World Position Offset) works on Nanite plants.
metaplanets.Spawner.WindMaxMetersstops it beyond a distance if you need the time back.
Grass¶
metaplanets.Spawner.GrassUseNaniteISM chooses how grass is instanced:
| Value | Behaviour |
|---|---|
| 0 | Always hierarchical instanced meshes (HISM). |
| 1 (default) | Automatic: plain instanced meshes when the grass mesh is Nanite, HISM otherwise. |
| 2 | Always plain instanced meshes. |
Plain instanced meshes are about 6× cheaper to upload per instance, which matters when grass streams in around a moving camera. With non-Nanite grass, keep the default: plain instancing without Nanite shows a visible ring where whole tiles of grass appear at once.
Rocks and props¶
Make rocks, boulders, ruins and other solid props Nanite. They get full detail up close at no LOD cost, and shadows (virtual shadow maps) stay cheap. Spawn them with a Spawner Generator like any species; turn on Enable Collision for the ones the player can touch.
Shadows¶
Nanite and non-Nanite foliage both use virtual shadow maps. To keep them cheap:
- Each species stops animating at its reach, so distant shadow pages stay cached.
metaplanets.Spawner.ScatterShadowsStatic(on) caches grass and ground scatter shadows as static.metaplanets.Spawner.ShadowsStatic 1caches every species' shadows as static, for scenes where the frame budget matters more than swaying shadows.