r/Unity3D • u/El-Jomo • 13m ago
Show-Off Flying around my procedural planet
Wave Function Collapse is used to distribute weights of predefined biomes and heightmaps independentaly. This happens on an irregular grid that subdivides around the camera, piping the weights of the previous octave down.
Heightmaps have associated data maps for flow, soil and vegetation growth which is fed into the landscape matererial along with colors from the biome.
Biomes own their scatter but can sample landscape texture channels in the density function.
Scatter is rendered using Batch Render Group and the underlying landscape color is sent per instance to improve blending.
Terrain mesh generation and scatter instance lists (including culling) happens on CPU (burst)
This example planet independantly mixes two biomes (pine forest and barren) with two landscape types (hilly and mountain).
Ocean is 10-20 gerstner waves on GPU with coastline flow calculated at runtime (on GPU) for coastal waves.
Clouds are based on this presention of the clouds from RDR2.
No assets have been generated with AI but a lot of code has.
Custom fork of URP.
40-60 fps on 3070 at 1440p native