#How I Manage 10 Million Objects on Huge Terrains: My Jobs + Burst Devlogs

1 messages · Page 1 of 1 (latest)

scarlet frost
#

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,...

▶ Play video

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.…

Release Date

To be announced

▶ Play video
scarlet frost
#

How I Render 100K+ Variable Objects Using Burst-Compiled Parallel Jobs – Draw Calls
https://youtu.be/3TLyrMi8ef8

What interests us today is how to render different visible objects in a performant way, so that we can handle in the order of 100 thousand visible elements of different types. In addition, we want to be able to highlight certain individual objects to relay information to the player. For example, an object could be selected, or we may want to ind...

▶ Play video
#

How my Shaders Combine Indirect Rendering and Per-Instance Properties from Burst-Compiled Jobs
https://youtu.be/cPXIAwGAbjI

Today, we conclude the rendering miniseries by digging into the shader code to see what we need to do to have our shaders consume all of this data and render everything correctly. We will focus on the parts of the shaders that use the indirect data and apply the per-instance specifications, rather than the entirety of the shaders, since I’m su...

▶ Play video
scarlet frost
#

We conclude the rendering miniseries by digging into the shader code to see what we need to do to have our shaders consume all of this data and render everything correctly. We will focus on the parts of the shaders that use the indirect data and apply the per-instance specifications, rather than the entirety of the shaders, since I’m sure you ...

▶ Play video

I’ve been looking for a visually appealing way of showcasing the terrain manipulation capabilities of my work in progress game, Minor Deity. While normal terrain editing definitely looks smooth and almost therapeutic, I wanted something with an extra spark. And then it hit me: Soundwaves!
I decided I would try to let the system sound impact my...

▶ Play video

After some comments on my recent culling video, and discussions about the performance of different approaches to threading, I thought it would be good to run some empirical tests to compare the results. I did not want to run the tests in isolation, but rather as part of an actual, complex, real-game setting, where lots of other calculations happ...

▶ Play video

I love learning about the technical aspects of game development. So, 18 months ago, I set out to learn about 2 specific topics: Tri-planar, tessellated terrain shaders and running burst-compiled jobs on parallel threads. A natural use case that combined these two topics was creating large terrains that could be manipulated smoothly in real-time,...

▶ Play video

Adding foliage to games is a bit like growing a beard. If you can’t grow a dense enough one, it may be better to get rid of it completely. Hello and welcome. Today I’ll show you how I helped the large terrains in my game to swap this not-quite-cutting-it patchy attempt out for a don’t-ever-cut-it, full-bodied beard worthy of taking its pla...

▶ Play video