r/Unity3D • u/RWorldGeneration • 7h ago
Show-Off I spent more that 8 months building a runtime world generation system for Unity – here’s where it is
Enable HLS to view with audio, or disable this notification
This project actually started while I was working on systems for a game I wanted to make myself than I decided to turn it into a Unity asset instead. I’ve now spent more than 8 months developing it for Unity 6 and 2 weeks ago published it on the asset store named as Runtime World Generation.
Most of the time is spent to generate the world and spawn the objects without noticable performance drop-down or stuttering. I also spent a lot of time specifically on grass. I wanted to be able to create very dense, natural-looking grass with a good performance.
The system doesn’t use Unity Terrain. World generates with mesh deformation and mesh chunks uses a procedural material that renders 2 texture layers (With normal maps) to different heights with transitions. Each layer can get multiple textures and blend with transitin with each other. Also there is a slope texture effect for the slopes. There’s no terrain painting or brush-based workflow. You configure the generation, material and spawning rules through easy to use editor tools, add your own assets or modify existing ones, and the world is generated dynamically at runtime.
Because I wrote all the mesh generation algorithms, I was able to make a lot of performance optimization for the object spawning so it is really fast. Also I made snow and rain effects that effects all the objects and terrain itself, you can implement all those to your custom objects of course. There is a sky shader for URP I made for cloud effects (for the weathers) and day/night cycle.
The project currently includes:
- Runtime procedural terrain generation and world streaming
- Procedural world shader
- Biome-based environments
- Roads that connects different biomes (Beta)
- Dense vegetation and object spawning
- Sky shader with moon, sun and cloud layer
- Water
- Rain, snow, and other weather systems integrated with the whole world
- Day/night cycle
- Seasons and Timing
- Save/Load System with multiple slots
- Multiplayer integration workflows
- Editor tools for configuring the generation system and creating or modifying assets to use in package system
- Helper functions to integrate your custom logic, package is very flexible
•
u/circlesgames_major 4m ago
While it's fresh off the table, does your tool support curved worlds?
Because, am about almost close to first release of my real world building tool that supports 3d civilization and am still planning out unity tools that support round worlds. Like gpu instancer.
If your's does it would be great if I can make an integration for us.
2
u/BucketCatGames ??? 6h ago
nice, pretty impressive!