Terrain Pipeline


Scenario:

My client was building an open-world game in Unity intended for mobile devices. The terrain was a high-stakes game component with a fast-approaching milestone deliverable.

Requirements:

  • Design

    • Must incorporate Unity terrain

    • Flexibility to make gameplay changes at any point during development

    • Support various biomes

    • Support time of day

  • Art

    • Flexibility to finalize terrain sculpting and painting quickly

    • Look needed to have a crisp, vector-style aesthetic

    • Each biome needed intuitive layer support

  • Engineering

    • Terrain assets required processing for efficient runtime performance

Solution:

I simplified the problem by separating open-world portions into unique editable terrains, similar to tectonic plates. Doing so allowed for any changes to impact less of the world, made iteration between departments easier, and constricted asset requirements needed per region.

I could then leverage terrain palettes to define how biomes were rendered. A palette included layers that defined surfaces' PBR inputs (albedo, normal, roughness, metalness, occlusion, and emission) and tiling data. Biomes could now be painted onto terrains consistently across the open world. Any updates to the palette would automatically propagate through each biome.

At this point, I established a visual prototype in collaboration with the lead environment artist. While they mocked up the terrain sculpts and palettes, I worked on the terrain shader. Key features of the shader include supporting a maximum of 16 layers, crisp layer masking at reduced control map resolutions, and triplanar mapping of all layers.

I promoted consensus between art and design on the look and workflow. At that point, I scripted a TerrainConverter script, which distilled the process of converting a terrain between edit and finalized modes to the push of a button. This script included several performance and memory optimizations, including mesh chunking and redundant texture reduction. Upon profiling terrain performance on devices, engineering was on board for a comprehensive solution.

Previous
Previous

Time of Day

Next
Next

Wind Shader