Moving Terrain3D Towards a GPU Driven Workflow

Vision of Terrain3D

  • A high performance, realistic terrain
  • The only choice for bigger studios
  • The platform priorities are Desktop first, Mobile is ok especially high end, Web would be nice, and last is Compatibility

The target example is The Witcher 4.

 

Version 1.1 (coming soon)

The 1.x branch uses a GPU driven, Geometry Clipmap for rendering the terrain, but editing is entirely on the CPU. It supports the following Godot renderers:

  • Forward/Mobile (Vulkan/D3D12)
  • Compatibility (OpenGLES)
  • Web (WebGL)

New features coming in 1.1 include:

  • Displacement
  • Ocean Mesh and shader
  • C# bindings
  • Instancing on collision shapes, not just the terrain
  • Baking AO textures into normal maps
  • Usability features like asset highlighting, searching, picking, reticle
  • Lots of bug fixes and performance enhancements

We will release a 1.1-rc (release candidate) in Jan/Feb for people to test. Then a full release a couple weeks after. I intend to release builds against the Godot 4.4 API and 4.5 API as there is an important difference.

This branch has a handful of pending PRs, so should see a 1.2 in another 6 months. After that it will enter maintenance mode for older systems that currently use Godot’s Compatibility mode renderer because they do not support Compute Shaders (see below).

 

Version 2.0

The 2.x branch and beyond will be a GPU driven workflow. This means it will not support the Godot Compatibility renderer or cards older than 2009-11. 

GPU Support

Cards and drivers must support Compute Shaders; this means they support:

  • OpenGL 4.3+ (2012)
  • Direct3D 11 (2009)
  • Vulkan (2016)

Minimum GPUs

  • NVidia 400 series (2010)
  • AMD Radeon HD 5000 (2009)
  • Intel HD Graphics 2000 / 3000 (2011)
  • Mobile Android GPUs that support Android 5.0 and OpenGLES 3.1 (2014), e.g. Snapdragon 805, or Vulkan (2016+)
  • Mobile Apple A7 GPU, iPhone 5s, iPad Air (2013) with iOS 8+ (2014)

For Web, you’ll need to use the 1.x series as Godot currently supports WebGL only. When they support WebGPU, we’ll look at supporting it as well.

 

Planned Features

Having the terrain run entirely on the GPU allows us to implement features like these:

  • Faster terrain editing, allowing sculpting larger areas with destructive editing
  • Fully artist friendly, non-destructive editing with:
    • Layers
    • Alpha stamps
    • Curves
  • Terrain generation (can be done in 1.1, but much faster here)
  • Erosion
  • Rendering the terrain shader at editor time instead of at run time
    • Baking a runtime virtual texture for sampling
    • Simplifying the runtime shader, reducing VRAM requirements, and increasing performance
  • Potentially Increasing the transfer speed of data from editor to renderer
  • Potentially baking displacement into collision

 

Development Steps

Minutes from the last development meeting describe the planned next steps in our development:

  • Change Data format to:
    • Drop paintable uv scale
    • Heightmap: Heights + Holes, angle, nav, auto
    • Control: 6 textures * 3 layers + 14 blend
  • Consolidate the Spray and Paint tool into one
  • On a subsequent update to the format, drop auto and navigation bits
    • The autoshader will be baked while painting
    • The navigation indication will go into a new user defined custom data system
  • GPU Region streaming

 

Non Destructive Editing (NDE) Features

  • Layers
    • Baking priority: Height, texture, features
    • Multiple NDE & Hand edited layers
  • Alpha Stamping
  • Curves
  • Potentially meshes for rivers or roads
  • Local Mode / Region based terrain data and objects

 

Three main areas to change for NDE

  • Compute shader background
    • GPU Painting pipeline
    • Input pipeline f/ Funofabot
    • Debugging and logging improvements for async
  • Region storage
    • Add an NDE layer to every region
  • Front end UI for layer management

 

Download Terrain3D for Godot – free and open source.

Support my work.

 

Leave a Reply

Your email address will not be published. Required fields are marked *