Skip navigation, go to main content
About NanoGeo

Documentation

Get started

Requirements, installation and your first object: set up NanoGeo, the virtualized geometry system for Unity 6 with HDRP or URP.

Overview

What NanoGeo does

NanoGeo lets you use very detailed meshes, with hundreds of thousands or millions of triangles, and still keep a good frame rate. You do not have to make LOD meshes or set up LOD Groups.

When you add NanoGeo to an object, the mesh is split into small pieces of up to 128 triangles and simplified versions are prepared at many levels of detail. This step is called baking. While the game runs, the GPU chooses for each part of each object the simplest version that still looks the same on screen, skips what is off screen or hidden behind other NanoGeo objects, and draws the rest. How much is drawn depends on how much of the screen an object covers, not on how detailed the mesh is.

Nothing breaks

Your objects stay normal GameObjects with a MeshFilter, a MeshRenderer and your usual materials. Lighting, shadows, decals, SSAO, motion vectors and post processing work as usual. If NanoGeo cannot draw an object, the object keeps using its MeshRenderer and the Inspector tells you why.

Requirements

Unity and render pipeline

Unity 6000.0.84f1 or newer (every Unity 6 version), with HDRP 17 or URP 17. The Built-in Render Pipeline is not supported.

On URP, keep Render Graph on, which is the default. Unity 6000.0 to 6000.2 still let you turn on Compatibility Mode (Render Graph disabled). NanoGeo then still draws everything, but occlusion culling, the software rasterizer and the visualization modes are off, and the NanoGeo window shows a warning. Unity 6000.3 and newer always use Render Graph.

Graphics cards

How much NanoGeo can do depends on the graphics card.

Full
Direct3D 12 or Vulkan on a recent GPU. Everything works.
Hardware only
Direct3D 11 and Metal. Everything works except the software rasterizer, a speed up for very small triangles. New projects made with Unity 6000.0 use Direct3D 11 by default; from 6000.1 new projects use Direct3D 12. You can change this in Project Settings > Player > Other Settings > Graphics APIs for Windows.
Fallback
The device cannot run NanoGeo. Every object is drawn by its MeshRenderer as if NanoGeo was not there.

Baking

Baking runs in the Windows Editor (64 bit). Games built for other platforms can use data baked on Windows.

The mesh must have Read/Write enabled in its import settings, so the Editor can read it while baking. NanoGeo can turn this on for you, see Many objects at once.

Installing

Import the package

  1. Import the package. Everything stays in Assets/RoamMoon/NanoGeoForUnity. Do not move files out of this folder.
  2. Wait until Unity has finished importing. NanoGeo creates its settings and makes NanoGeo versions of the HDRP and URP Lit shaders for the pipeline versions you have installed.
  3. Open Window > Analysis > NanoGeo Visualization. If it shows a warning about BatchRendererGroup Variants, press Fix. Builds of your game need this setting. NanoGeo never changes it unless you press the button.

HDRP and URP

On HDRP, Custom Pass must be enabled in the HDRP asset and in the camera frame settings. It is on by default. On URP nothing has to be changed.

If you update HDRP or URP later, run Tools > NanoGeo > Regenerate Shaders once.

Your first object

Add the component

  1. Select an object with a MeshFilter and a MeshRenderer. Its material should be HDRP Lit, URP Lit or an HDRP Shader Graph. If the object is in a LOD Group, select the LOD0 object.
  2. Click Add Component and add NanoGeoMesh.
  3. Wait a few seconds while the mesh is baked. A mesh with one million triangles takes about four seconds on a fast desktop CPU.
  4. The Inspector now says “Rendered by NanoGeo”. Done.

Materials and fallback

Your material and MeshRenderer stay on the object. NanoGeo makes its own copy of the material and keeps it up to date. If you edit the material and a NanoGeo object does not show the change yet, turn the object off and on again or press Play.

To draw one object with its MeshRenderer again, tick Force Fallback on the component, or remove the component.

Baking uses meshoptimizer by Arseny Kapoulkine, under the MIT license. It runs in the Editor only and is not part of your game build.