# Client Module The visual layer. Takes finished chunk data and turns it into Godot nodes. It calculates nothing — no densities, no terrain, no collision. ## `ChunkRenderer.cs` A `MeshInstance3D` created per chunk by the server, which then calls `RenderChunk(data)`. - **Mesh generation.** Calls `MarchingCubes.GenerateMesh()`, passing the density field, the block IDs, and the per-column data the mesher needs to colour correctly: the true (unrounded) surface heights, the biome per column, and the road surface material per column. - **Vertex colouring.** Creates a `StandardMaterial3D` with `VertexColorUseAsAlbedo = true`, so Godot renders the per-vertex colours the mesher assigned rather than a texture. Colours fade between materials across a tunable band instead of switching at whole-metre steps. - **World positioning.** `ChunkPosition × CHUNK_SIZE × VOXEL_SCALE` on X and Z, `y = 0` — chunks are placed by their footprint and carry their full height internally. - **Backface rendering.** `CullMode` is disabled, so the world is still visible from underneath or from inside terrain. ## Notes - **One material instance per chunk.** Each renderer builds its own `StandardMaterial3D`. Since they are all identical, a single shared material would do — an easy win whenever performance work starts. - Chunk positioning is relative to this node's parent, so **moving the `World` node in the scene moves the entire rendered world** with it. ## Not here yet No textures or UV mapping (raw vertex colour only), no LOD, no player, no UI, no input handling.