OpenGL Procedural Terrain - improved placement of snow

Published April 18, 2024
Advertisement

1 likes 8 comments

Comments

Aressera

I did a few blog posts (1) and (2) on this topic recently, maybe they can be of use? I still need to work on it some more but currently lack some important input data such as surface/air temperature and climate, so that I can vary the amount of snow (and rain) based on location and the current season. Also I want to take into account the solar exposure to have shady spots retain snow for longer.

April 18, 2024 09:32 PM
buzzelliart

hi, yes, I just looked at your recent post and they look amazing!
You did an incredible job, on a complete different level compared to mine.
Before looking at them I was quite proud of my work, but after seeing what you did I was ashamed of how obsolete and very basic my work looked compared to yours.
In this version I took into account the total daily solar exposure to increase snow value on shady spots, and it really gives more realism compared to my previous version without that improvement, but I still have to properly manage different sun paths according to season and latitude.
Keep up your amazing work, it really encourages me to do better myself knowing that such incredible results are possible.

April 18, 2024 11:27 PM
Aressera

@buzzelliart Thanks for your positive feedback! It helps encourage me to work on this. Your results are nice too (especially the erosion, I can't do so many time steps such that I get nice rivers/streams). One thing you can work on to get even better quality is to add a LOD system so you can increase the detail up close and have bigger terrains. Applying erosion at multiple different power-of-two scales (e.g. in a quadtree) helps a lot with that, and might fix your issue with streams that are too narrow. I have the opposite problem, that my streams/rivers are too wide. I hope to fix this by manually carving river beds into the terrain to kick-start the erosion and produce good rivers.

April 19, 2024 06:33 PM
buzzelliart

@Aressera Thank you for your useful suggestion. I never thought of applying erosion at different scales, this seems a very interesting thing to try.
Yes, I should definitely try to implement some sort of LOD system, since now I tried to obtain finer detail using tessellation shaders and displacement mapping, but the repetitive patterns of the displacement texture are visible, and plus I would like to to something completely procedural, without relying too much on textures (at least for the geometry side).
My erosion process still needs improvements too, now it depends on many parameters, and changing them you can get very different results, that can vary if you change map resolution (some of which may look realistic, but some others look like complete garbage), I would like to find a way to rely less on those parameters and find a more general solution that works well at different map resolutions.
Keep up your amazing work, your work is a great inspiration.

April 19, 2024 11:14 PM
Aressera

@buzzelliart Yes the erosion is definitely a parameter tuning hell. For multi-scale erosion I usually define the parameters relative to the size of an erosion cell, including things like erosion rate, time step, etc. One thing I found is that I needed some clamping to get the standard shallow-water erosion to be well-behaved with steep slopes. The standard approach has sediment capacity increase proportional to slope, but this leads to extreme erosion and bad results if you don't clamp the slope to something reasonable like 45 degrees. This one change seemed to make the parameters much less likely to produce bad results without needing careful tuning.

April 20, 2024 02:31 AM
buzzelliart

@Aressera it is nice and someway comforting to know that someone else has encountered the same struggles with all the fine tuning of parameters/experimental variants to get a good looking erosion mechanism.
I was inspired by the article linked by Sebastian Lague in his amazing hydraulic erosion tutorial, but then I tried to add some variants (read also ugly hacks xD) to try to get a better looking result, so also my version is not exactly similar to the common approach.

This is far from perfect, and according to the parameters tuning it switches often from results where river formation is very nice, but with areas with extreme erosion, and other cases where overall erosion looks very nice but it is difficult to get clear river paths. For now I think I am tired of adjusting it and I think I have to move to something more interesting, and maybe when I have found again the right motivation I will try to improve the erosion mechanism, I definitely have to try your LOD suggestion, seems a very interesting approach.

April 20, 2024 05:29 PM
Brain

looks very nice, the player model you test with at the end of the video seems very large though, or the mountains are scaled down. The generated terrain looks like it should be a few miles across, or more, with the glacier-like flows running down the sides of the mountains and the lake in the valley, when walked near to with the player the mountain feels more like a small hill than an immense mountain, perhaps increase the scale of generation a bit?

Looking very pretty though!

April 22, 2024 09:11 AM
buzzelliart

@Brain Thank you! Yes, you are right, the scale of the map is a bit off, actually the whole terrain here is just 1200 x 1200 meters so those are not properly mountains (or maybe the flat areas are high plateaux and the mountains are just peakes of a bigger mountain chain). As suggested also by user @Aressara, I should probably try to implement a LOD system in order to get good detail at small distances and still be able to scale the whole map at very high sizes.

April 22, 2024 06:16 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement