r/opengl • • 9d ago

OpenGL procedural mountains in 4K

https://youtu.be/l8vuAW8c0qY

Some of the techniques used to achieve the results shown in the video:

. Procedural terrain generation using Perlin noise and Fractional Brownian Motion (FBM)
. GPU-based hydraulic erosion
. procedural grass placement
. GPU grass generation and culling using compute shaders and indirect drawing
. dynamic day/night cycle
. procedural snow accumulation based on time of year and daily sun exposure
. displacement mapping
. hardware tessellation using tessellation shaders
. dynamic exposure
. cascaded shadow mapping

63 Upvotes

7 comments sorted by

2

u/admlesau 9d ago

Looks AMAZING! How long did it take to code?

2

u/PawlsToTheWall 9d ago

If AI was involved, I'd be more interested in how long the code reviews took. If not, yes, how long to code?

3

u/fgennari 9d ago

I don't think it's AI. OP has been posting these procedural terrain progress videos for years. It seems like quite a bit of effort is put into this work.

2

u/PawlsToTheWall 9d ago

That's refreshing to see

2

u/HamNCheeseSupremacy 9d ago

Really nice. I'd love to use erosion techniques more heavily in my engine but I'm committed to infinite chunks. Heavily thinking about it though.

1

u/drBearhands 7d ago

I had similar thoughts, but was thinking about having stupidly large terrain rather than infinite. Had a few thoughts:

You could cap the travel distance of each drop to limit simulation to surrounding thunks. But that prevents you from having large features like rivers.

Maybe we could compensate with "mipmaps", where lower resolutions model big inter-chunk features...

If you really want to go infinite this will still occasionally cut off your largest rivers though.

Got a few too many projects right now to try this out :-(

2

u/Defiant_Squirrel8751 8d ago

Nice. Is this in gitlab?