Skip to content

Feat: Mountain Region Variability - #95

Draft
scottdraper8 wants to merge 2 commits into
ETcodehome:1.21.1from
scottdraper8:feat/mountain-region-variability
Draft

Feat: Mountain Region Variability#95
scottdraper8 wants to merge 2 commits into
ETcodehome:1.21.1from
scottdraper8:feat/mountain-region-variability

Conversation

@scottdraper8

@scottdraper8 scottdraper8 commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Mountain Region Variety (mountainVariety Setting)

Important

Main idea:
This feature adds variability to mountain generation without changing existing settings, user presets, or default behavior. The feature is turned off by default and only takes effect when the user opts in.

The motivation behind this feature is to achieve more realistic variability of mountain shape and scale within the same world.

1. What is this?

A new mountainVariety slider (0.0 to 1.0), shown below.

Currently, every mountain range in a world shares the same height, width, and erosion profile. With this setting enabled, your other mountain settings become the midpoint of a range, and different regions get different parameter rolls around that midpoint.

For example, if you set verticalScale to some value $n$, enabling variety means some regions will generate mountains shorter than $n$ and others taller than $n$. But the average across the world stays centered on $n$.

  • At 0.0: nothing changes.
  • At 1.0 (max variety): some ranges are shorter and wider with heavy erosion, others are taller and narrower with sharp ridgelines.

2. Why add it?

RTF already has three different noise algorithms for mountains (M1/M2/M3), but they all share the same height envelope, feature scale, and erosion character. So every mountain range in a world ends up feeling sort of the same. Real continents don't work that way.

For example, in just the one U.S. state I live in, the mountain ranges themselves vary pretty extremely in shape and scale:

So with the mountainVariety setting we get a little closer to emulating the natural world by making mountain settings a range and not a fixed point for the whole world. When building a preset with mountainVariety in mind, you'd choose:

  • the values that you want to be the center of your range
  • how big you want your range to be

3. How does it work?

Each mountain algorithm (M1/M2/M3) builds three internal variants:

  1. Low (shorter, wider, more eroded)
  2. Center (the user's selected settings)
  3. High (taller, narrower, sharper)

These get wrapped behind a single pool entry so the existing terrain layout stays the same.

Which variant a region gets is deterministic and seed-driven. Its an even one-third split and no spatial bias. The slider simply controls how far apart/extreme the variants are, not which one gets picked. Moving it from 0.5 to 1.0 makes the low variant shorter and the high variant taller, but doesn't reassign which regions get which variant.

Parameter Low variant (at 1.0) Center High variant (at 1.0)
verticalScale x 0.80 unchanged x 1.20
horizontalScale x 1.35 unchanged x 0.65
baseScale x 0.85 unchanged x 1.15
erosion strength 0.85 (weathered) 0.65 0.40 (sharp)

Note

The erosion strength row only applies when fancyMountains is enabled. fancyMountains is still just a boolean toggle. But when both fancyMoutains and mountainVariety are toggled on, the erosion pass runs at different intensities per variant, so some ranges look freshly uplifted and sharp while others look heavily weathered.

4. How to QA this?

Setup

  1. Create world A with a preset that sets moutainVariety: 1.0
  2. Create world B with the same seed but mountainVariety: 0.0
  3. Fly to the same coordinates in both. Most mountain regions should show visible height, width, and/or biome label differences

Look for:

  • Height differences between the two worlds at the same peaks
  • Peak width: tighter spires vs broader ridges
  • Biome labels shifting (like Jagged Peaks vs Stony Peaks at the same location)
  • Erosion character with fancyMountains on: sharp ridgelines vs rounded weathered profiles

Important

33% of mountain regions will land on the "center" variant (the explicit settings the user chose), which means they'll look identical to a world with variety turned off. If you're comparing a varied and unvaried world at the same coords and they look the same, you're probably looking at a region that uses the "center" variant. Just fly to a different mountain range to confirm.


Note

If you look in the RTF Discord, you'll see lots of presets where people are fixating on one specific range to emulate, because that's really all they can do. This setting would allow for different kinds of mountain ranges to simultaneously exist in a world. Similar to how the Wasatch Range and the Uintas can coexisit in the same state.

However, I recognize this setting is not the end-all-be-all for mountain variety in RTF. To vary between something as extreme as the Tasmanian Highlands and the Himalayas, that would require much more extensive changes than this relatively minor addition.

The reason being, if the coded range differences that mountainVariety generates internally were pushed too far, it would become unwieldy. Mountains would clip to world height, or collapse into nothing. The code's spread constants have to stay reasonable for the users that turn it all the way up to 1.0 with already heavily altered presets.

@scottdraper8
scottdraper8 force-pushed the feat/mountain-region-variability branch from 14fe72b to 82e47e8 Compare June 27, 2026 03:58
@ETcodehome

ETcodehome commented Jun 27, 2026

Copy link
Copy Markdown
Owner

This looks much improved from the previous efforts, nice work!

I had a quick test using modern default and the previews highlight some relatively abrupt mountain transition regions when variety is increased. I was a bit concerned about it, but when viewed in game the transitions seem alright.

image transitions image

I'll have a play with a few more presets and some higher generated noise + checking out some more range variants and if all looks good is this ready for review?

Would also appreciate your QA results posted as documented in the description if you could please, it would be an ideal record for posterity about what change was made and why (people are visual)

@ETcodehome

ETcodehome commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Unfortunately the transitions issue is worse when scales are larger:

image image image

we probably need to investigate how transitions are being handled under the new model.

Otherwise the results im seeing are quite impressive for introducing significant, desirable new variation in mountain patterns.

@scottdraper8

scottdraper8 commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for checking this out, and good catch. I'll be looking into this

@scottdraper8
scottdraper8 marked this pull request as draft July 19, 2026 08:57
Introduces a mountainVariety setting (0.0-1.0) that creates three
parameter variants (low/center/high) per mountain algorithm, producing
visible height, width, and erosion differences between mountain regions.

Uses dual-mode variant selection: hashed cell identity for Voronoi
terrain regions (uniform 33/33/33 distribution, no spatial bias) and
Perlin noise with coordinate offset for the mountain chain overlay.
Prevents broken terrain generation from hand-edited preset
JSON with values outside the valid slider range.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants