You are viewing a single comment's thread from:

RE: Infinite Terrain Generator Demonstration

So I intend to do a full write eventually, but I'll add some detail here. The height map is determined by 3 noise channels with different settings blended together. A baseline Simplex Noise channel handles the gradual, continent spanning changes in elevation that produces a smooth slightly wavy landscape. A second Perlin Noise channel handles mountains and hills, and left to its own devices just gives an infinite mountain landscape. A third Simplex Noise channel just goes from 0 to 1, and controls "how much mountain" to add to the baseline noise. So it goes:

Height = GetBaseNoise() + (GetMountainNoise() * GetTransitionNoise());

This gives a smooth transition between noise types while allowing a lot of variation.

Color is handled by old school vertex colors for each triangle, informed by which biome the triangle falls into. It does this by two more noise channels that measure temperature and moisture (hot + dry = desert, hot + wet = jungle, etc). Each biome has its own color associated, and that color gets applied to the triangle. Triangles that have a steep slope are shaded for rock, and triangles just above the water line are shaded for beach.

Sort:  

Very cool man, you should definitely do a full write up. :)

Coin Marketplace

STEEM 0.20
TRX 0.14
JST 0.030
BTC 67808.66
ETH 3248.00
USDT 1.00
SBD 2.67