Procedural Demo
Engine: UE4.22.3
My Role: Everything
Team Size: None
Download Demo: Click Here
Source Code: Click Here
Description
Everything in this project is Procedural. The placement of trees, the terrain, the water areas and even all the meshes like the planet in the sky and the fish are procedurally made through mathematical equations. I created a fully procedural nature map that has a fully working day/night cycles and weather system.
The aim of this project was to use large scale mechanics such as day night cycles and weather systems on such a massive scale. The map is 8km x 8km making it the biggest map I have dealt with in a game that forced a lot of optimizations to get everything working. The result as seen in the pictures above is not just a fully procedural map, but one that fully works with day cycles and weather using rain and snow. This is all done using shaders that change the lighting dynamically, add rain puddles and snow on the ground and even on the foliage.
The source code contains the very complex shaders I created to achieve all this so feel free to check them out.
Project Technical Aspects
- Very Advanced Shaders
- In order to be able to support dynamic time and weather cycles at this scale. I had to create a very complex shader utilizing UE4's material system and my own custom code. The shader uses advanced methods such as parallax occlusion mapping and global functions that allow the cool effects seen from weather in the images and the weather to also effect the foliage and any model in the scene.
- Shader based Procedural Foliage
- All foliage is placed through the shader. By doing it this way I am able to place different foliage at different biomes (e.g. forest and underwater) and I can also place different foliage at different terrain steepness and on the top of mountains. As seen in the pictures, the trees on the top of mountains are different. This foliage placed by the shader still fully supports LODs for optimisation.
- Full Day/Night Cycle
- A full dynamic day night cycle that is created through Timeline in Blueprint. Since the Shaders use Unreal's PBR they calculate the dynamic lighting correctly and no 'hacks' are used. The day night cycle fully simulates day » dawn » night » dusk.
- Full Weather System
- A weather system that supports rain and snow and the effects which both can be seen on the terrain and the foliage. I created the weather system to even be detailed enough as to cause the ground to be wet after the snow melts. Currently in the demo, the weather randomly trigger rain or snow to showcase this.
- Procedural Meshes
- There are 2 procedural meshes that were both fully done in C++. The planet is a procedural sphere using the sphere algorithms for the mesh, topology and uv mapping of the shape. The fish uses the fish curve equation for the mesh and infact my own algorithm for the topology and UV since none exist. The land mass on the planet along with the colour differentiation between the see and land is also a procedural effect in the shader that is controlled by the offset of the vertex. The fish is animated through the shader aswell using basic vertex displacement calculations to create the swimming like animation.