u/runevision

Large-scale Voronoi-esque cells to drive my procedural mountain forest

I'm working on adding large-scale structure to my procedural terrain based on Voronoi-esque cells.

Down the line, this allows me all kinds of level design control not possible with traditional noise functions. Like adding lakes, rivers, giant walls, and impassable steep cliff faces strategically based on level design needs. For starters though, I've just tested it with largely flat cells at three different heights.

If you haven't already seen it, you could also consider watching my latest dev video about 'supercharging my procedural mountain forest' - although it does not feature the cell based terrain. :)

For more info on what kind of game this is all for, I have a page about 'The Big Forest' here.

u/runevision — 9 days ago

Sunrise in the procedural mountain forest

I've spent the last month adding volumetric clouds, a time-of-day system, and better atmospheric scattering to my procedural mountain forest game (working title: 'The Big Forest').

With regards to procedural generation, there's nothing really new compared to what I've shared in here before, but the new lighting has such a big impact on the overall appearance that it's like seeing it anew (in my opinion), so I thought I'd share some nice sunrise shots I captured. :)

The clouds are using the package Enviro 3 - Sky and Weather as a starting point, but I'm only using the clouds part and have heavily modified it to my needs to make it work with my own atmospheric scattering and time-of-day colored lighting.

The atmospheric scattering is based on this shadertoy by Fernando García Liñán, though again heavily modified. I increased the saturation, exaggerated the depth (bringing tinting closer to the camera), and implemented the atmospheric scattering via a compute shader that renders scattering at different distances and directions into a cubemap. Fernando's technique does a lot of the heavy lifting though! It's similar to previous techniques for sky and atmospheric scattering used in e.g. Unreal, but uses four spectral samples (~red, ~green, ~cyan, ~purple) instead of the usual three (red, green, blue). This produces notably richer colors and practically no extra cost.

I made my own time-of-day system with a simple simulation of the sun and moon relative to the Earth, where I can independently vary time-of-day, time-of-year, lunar phase, and latitude without them impacting each other.

I also implemented time-warping so make sunrises and sunsets slower. In a 24-minute day-night cycle, they're over awfully fast if not slowed down. Here's a video of a full sunrise.

If you haven't already seen it, you could also consider watching my lastest dev video about 'supercharging my procedural mountain forest' - although it does not feature any sunrises. :)

Hope you like them!

u/runevision — 2 months ago

New video: Supercharging my procedural mountain forest

I've published a new video about how I've made my procedural mountain forest bigger, better and faster over the past two years :)

Watch it on YouTube:
Supercharging my procedural mountain forest

Hope you like it!

Links to things mentioned in the video

My previous video about my procedural mountain forest.

My LayerProcGen framework and my talk about it at Everything Procedural Conference 2024.

My free game The Cluster (full trailer), which my LayerProcGen framework was originally developed for.

My blog post about the procedural creatures I alluded to.

The GPU Instancer Pro (Asset Store) third party tool I use for GPU instancing with frustum and occlusion culling.

The Grasslands - Stylized Nature (Asset Store) model pack I use for my new trees.

My blog post about my Point Cloud Sound technique.

My blog post about the game progression dependency graphs I alluded to.

My erosion filter video and blog post. The links section at the end of the blog post has links to implementations by others in various engines, tools, and games.

A GitHub Gist demonstrating shared C# and shader code.

My blog post about atmospheric perspective and distant mountains.

u/runevision — 3 months ago
▲ 72 r/gamedev

How my Point Cloud Sound technique for irregular shaped audio sources works

Some years ago I added water streams to my game (think small rivers, creeks), and had to think about how to implement the audio for it.

I implemented a technique I call a point cloud sound, and later I ended up using it for the sound of rustling leaves from trees and bushes too.

Since it’s turned out to be highly useful and effective for me for multiple use cases, I thought I’d share how it works in the linked blog post.

The basic idea is to use just a single audio source to represent up to many thousands of contributing points, by manually calculating volume, direction, and spread. This is more efficient than having that many actual audio sources in your game.

And the technique has some advantages over e.g. just placing the audio source at the nearest point inside the shape, which mostly works for simple convex shapes. There are lots of details and code snippets in the post for those interested.

How are people here normally handling audio from things that are not convex, like winding rivers, tons of trees, and similar?

blog.runevision.com
u/runevision — 4 months ago

Walking and flying around in my expansive mountain forest

Since my last post here, I've been adding additional features to my mountain forest.

I further improved the erosion look by adding an additional octave and also darkening the cliff in the crevices.

I made the fog (atmospheric perspective) fade towards a paler color at far distances. This enhances the sense of depth in the distance a lot. (For some musings on why mountains get first blue and then paler with distance, I wrote a blog post about that last year after having observed mountain views in Japan.)

I implemented a floating scene origin so the world now works within +/- 8000km from the world origin. The generation is based on fixed point coordinates that can represent 256 values per unit, so the supported world size is the Int32 range divided by 256. As a last step the floating origin is subtracted and only then are the numbers converted to floating point.

And I implemented collision sounds for the foliage (bushes and tree crowns). A soft collision sound for walking and running through them, and a heavy collision sound for flying through them. This is based on my point cloud sound technique, so it requires only two audio sources in total, shared among all foliage.

Now, I know that popping of LOD levels is visible for terrain chunks (particularly tree coverage) but addressing that by e.g. fading things in smoothly would be quite hard for me.

For a bit broader context, this terrain is for the game I'm developing with the working title The Big Forest. You probably won't be able to fly around unrestricted in the final game, but it's fun to mess around with for demonstration purposes (and debugging). :)

u/runevision — 4 months ago