GAMES IN PROGRESS
Latest Videos
Home
/
Indie Game Developers
/
Re: cOg Mission
/
Creating Procedural Meshes with Burst Jobs

Creating Procedural Meshes with Burst Jobs

6 min
This is the story of implementing what I've learned into a gridless, interactive, world-building sandbox game called Minor Deity. Minor Deity on Steam: https://store.steampowered.com/app/3876240/Minor_Deity/ Minor Deity Discord Server: https://discord.gg/2NEb4HxwhF Over the last few months, we’ve spent a lot of time improving the performance and visuals of the dynamic game world. But the horizon all around it looks quite monotonous here, with ocean as far as the eye can see. Wouldn’t it be nice if we could spruce it up a bit! Today, we’re procedurally manipulating a single mountain mesh with a rectangular footprint to form concentric rings of variable peaks around our world. Doing this on the main thread takes around 150ms, which isn’t a problem for a once-off occurrence. However, in the interest of keeping every part of the game performant, and developing technology that can be used later on, we’ll use burst-compiled jobs to edit the mesh data directly in parallel. First, we’ll warp the footprint into a curve forming part of a ring. Then we’ll add both overall and local variation in position and elevation. We’ll also flip the mesh over on either or both the X and Z axes to vary its orientation. Finally, we’ll arrange the meshes into concentric rings, with each ring producing increasingly larger peaks to give the horizon some depth. Let’s consider each of these steps in a bit more detail, before we implement it in parallel. 00:00 Introduction 00:45 Visual Summary of Results 01:16 Visual Step-through of Approach 02:40 Main Thread Code 02:55 Using Advanced Mesh API in Burst Jobs 04:07 Creating the Jobs 05:15 Results 05:50 Outro