Hello Unity Devs!
18 months ago, I set out to learn about two game development related topics:
- Tri-planar, tessellated terrain shaders; and
- Running burst-compiled jobs on parallel threads so that I can manipulate huge terrains and hundreds of thousands of objects on them without tanking the frames per second.
My first use case for burst-compiled jobs was allowing the real-time manipulation of terrain elevation – I needed a way to recalculate the vertices of the terrain mesh chunks, as well as their normals, lightning fast. While the Update call for each mesh can only be run on the main thread, preparing the updated mesh data could all be handled on parallel threads.
My second use case was for populating this vast open terrain with all kinds of interesting objects... Lots of them... Eventually, 10 million of them... In a way that our game still runs at a stable rate of more than 60 frames per second. I use frustum culling via burst-compiled jobs for figuring out which of the 10 million objects are currently visible to the camera.
I have created a devlog video about the frustum culling part, going into the detail of data-oriented design, creating the jobs, and how I perform the frustum culling with a few value-added supporting functions while we're at it.
Please watch the video below first if you are interested and / or have a question - it has time stamps for chapters:
https://youtu.be/nphM21VFC_w
Steam Page:
https://store.steampowered.com/app/3876240/Minor_Deity/
Gideon
18 months ago, I set out to learn about two game development related topics: Tri-planar, tessellated terrain shaders and running burst-compiled jobs on parallel threads so that I can manipulate huge terrains and millions of objects on them without tanking the frames per second.
This is the story of implementing what I've leared into a gridless,...
Command Earth, Water, Air and Fire to create the landscapes of your imagination, from tiny single islands to networks of variable landmasses, to large continents.…
To be announced