Unity · Editor tooling
Unity World Creation Tool
A Unity editor toolkit I built to bring terrain creation and environment design into one workflow. It combines terrain generation, sculpting, texturing and object placement, so a landscape can be built without switching between separate tools.
Unity / C# / ShaderLab / HLSL / Compute Shaders
Making world building feel like one editor
Building a landscape in Unity normally means moving between separate utilities for heightmaps, texture painting, scattering and mesh work. This toolkit brings that work into a single Inspector and Scene-view environment: generate terrain, sculpt it with brushes, paint layered materials, scatter constrained prefabs and build organic forms from metaballs, each as a self-contained tab that can be used alone or alongside the others. A factory registers the tabs, serialized models hold their settings, and one scene-input path dispatches cursor raycasts to whichever controllers are active, so the tools stay coherent as the toolkit grows.
Generating terrain in the Scene view
The Terrain Morphing tab exposes strength, scale, iteration and seed controls for generating height variation. These recordings show different rugged terrain shapes taking form in the Scene view as the settings change, so the result can be assessed immediately within the same editor.
Generating and adjusting a rugged terrain directly in the Scene view.
Further landscape variations from the same terrain-generation workflow.
A 230-layer material contract
The terrain renderer is configured for up to 230 material layers, with aligned diffuse, normal and packed roughness/displacement/AO array data. RGBA mask slices store four blend weights, while the slice and channel determine identity: e.g., layer 137 is slice 34, channel G. That same explicit addressing lets terrain, grass and terrain-aware objects share the material library.
Automatic terrain texturing
The auto painter applies configured terrain textures according to height and slope, covering broad areas without hand-painting every transition. Rules can favour snow at higher elevations, sand on low, flatter ground, and rock on steep faces. The recording shows the resulting materials across mountainous and coastal terrain while the landscape is inspected in the Scene view.
Automatic texturing across a coastal landscape, with materials chosen by terrain height and slope.
Where the channel-range idea came from
An earlier shader prototype explored packing two blend weights and normalised texture IDs into RG and BA channel pairs, decoding each ID with int(value * 100 + 0.5). That experiment is a useful example of compact indexed data and the filtering problems it introduces. The current renderer uses the more explicit slice/channel addressing scheme, and the two designs are documented separately.
Adaptive geometry for displaced terrain
The non-instanced terrain shader calculates tessellation per edge from edge length and camera distance. Painted masks confine extra geometry to patches that use displacement; packed RDA height values move vertices along their normals. The wireframe recording shows the dense painted patch meeting the coarser terrain without visible holes. A second mode tessellates the whole terrain at full detail near the viewer, then reduces density smoothly over a configurable distance and falloff rate. That keeps nearby displacement detailed while limiting distant triangle cost without an obvious boundary.
Painted displacement adds terrain detail only where needed, with no visible gaps at the edge of the denser mesh.
Full terrain tessellation near the viewer falls away smoothly over a configurable distance and rate to limit distant geometry.
Blending objects into the ground
Placed objects can receive a terrain-aware blend material that compares object height with the terrain heightmap, shapes the transition with smoothstep, optional sharpness and multiplier controls, and breaks it up with noise. The object shader reuses the terrain's layered material evaluator for colour, normals, roughness and occlusion, helping rocks and props inherit the surrounding surface language while remaining ordinary meshes.
Terrain-aware shader blending a rock into the surrounding ground.
Updated shader correcting stretching where the rock blends into the terrain.
Painting baked objects as terrain detail
A custom baking workflow turns a varied collection of source objects into reusable diffuse, normal and roughness textures, then lets an artist stamp or paint that detail onto a surface. The normal and roughness maps preserve much of the objects' lit, textured appearance without placing every source mesh in the scene. For those painted details, rendering through the terrain material can use the terrain's draw call instead of issuing a separate draw call for each rock. The recordings show the baking setup and the resulting paint workflow.
Baking a collection of rocks into reusable texture detail for a custom terrain-painting shader.
Painting the baked rock detail across a surface with the custom shader.
Procedural forms with artist-friendly controls
Terrain stamps query Box, Sphere and Mesh strategies; object brushes use slope, surface and width constraints with spline placement; and the CPU metaball extractor builds an isosurface from a 256-case cube table, interpolated edge crossings and field-gradient normals. The result is a coordinated authoring pipeline from brush interaction to reusable geometry.
A reusable foundation for world building
The project brings editor architecture, shader programming, compute-assisted painting and procedural geometry into one authoring workflow. Its modular material and geometry systems make complex terrain work accessible from the Scene view while leaving room to extend the toolkit with new brushes, surface types and world-building tools.