r/ClaudeGameDev • u/imlo2 • 18h ago
Alpha Claude Code graphics programming - an Earth-sized fully procedural planet in Unity, from orbit to grass level
The goal of the project: One Earth-sized planet, all procedural, rendered live in Unity 6 (URP).
After a short intro of other places, the video is one continuous flight from 4,600km in orbit down to a few metres over a meadow and back out.
This is my procedural island generator's sister project: a whole planet instead of an island, and it borrows some of the components from it.
It's a personal R&D project that may become the base for a game.
How Claude Code is used on this project
- It drives the Unity Editor itself through an MCP server (CoplayDev's, and I'm developing my own for specific purposes). It recompiles, reads the console, starts and stops Play Mode, and runs C# snippets inside the running editor to move the camera, switch features on and off, and take captures.
- It judges by renders, not just numbers. Early on, the project drifted for a while by passing numeric checks while never looking right. Now every change is followed by a capture round: fixed viewpoints, my saved views, and before/after sheets with difference images. Claude looks at them, and numbers only back up what the pictures show.
- The repository is its memory. CLAUDE markdown holds the defined standing rules. A handoff document says where the work stopped and what's next, so a new session, or one that ran out of context, picks up from there without any special instructions. There's also a development log, decision records, a tech note per subsystem, and a dead-ends file listing every failed approach, what happened, and what it might still be good for, so nothing gets tried twice by accident.
- Screenshots carry a location line with the position, view and time of day. When I say something looks wrong, Claude goes to that exact view, reproduces it and measures it.
- It works from papers and documents I keep in the project, and notes where it departs from them: in this case Ulrich's chunked LOD for picking tiles, Bruneton, Neyret and Holzschuch 2010 for the sea, and the RPV model for how deserts reflect the sun.
- It writes its own measuring tools: frame times logged in motion, a hunt that flies a six-minute route counting one-frame flashes, push-in sequences that count what pops in, sheets comparing rounds, tests for motion and region seam artifacts etc.
- Outside Unity, it scripts Blender through another MCP server for tree parts and other objects. Textures come from Codex's image model, cut and processed by scripts Claude wrote.
- Even the video: Claude wrote the route recorder, it found the song's tempo, cut the intro on its beats, and sped up the descent with a ramp. And then the video post-processing, watermarking and compression is also handled automatically by Claude.
Who does what
I've done 3D environment art, shaders and tech art for a long time. I set the direction and the look, bring the references and papers, and judge every change by eye. Claude Code writes most of the code and all the tools. Codex did the first tests, and now makes textures and reviews subtle changes. That's about 270 commits since late July.
My judgement is still needed, as Claude will happily finish something technically right that looks wrong, so references and my eye decide. Unity's traps also had to be learned once and written into the rules.
The renderer specs
- A cube-sphere quadtree. Every tile is the same 32×32 grid, generated on the GPU as you fly, from 25 octaves of 3D noise between 16,000km and about 1m. At the finest level, vertices are about 1.5m apart.
- The camera stays at the origin, with its position kept in doubles. URP's TAA never sees the camera travel, so the travel is fed into it.
- Hillaire's atmosphere and volumetric clouds from a global weather map.
- A climate model carries rain inland on the winds and decides where clouds, snow, forests and grass go.
- The sea is currently the terrain clamped to sea level. Trees are grown after Palubicki et al. in the tree lab from my previous project, with impostors past about 100m. About 100,000 GPU grass blades a frame reach 250m.
- It runs at 9-13 ms a frame at 1080p in the Editor on an RTX 3090.
Music made with Suno.
