One of my goals for Terragen 2 is to model an entire fantasy world. There are a few approaches around the Planetside forums, but none offer the realism and control I’m looking for. I want to be able to specify a “zoomed out” model, and also a more detailed model for specific areas when you zoom in (e.g. show villages complete with buildings). I’m looking toward the long-anticipated API and my programming skills to do that.
In the mean time, I’m learning.
One challenge in creating a world-scale model is that not all areas look alike. Green fields, desert, rocky hills all coexist in the same world and have to blend realistically from near and far. This post explores how Terragen 2 supports that.
The files for this post are here.
Open up MergeShaderRedGreen.tgd. There you will find two heightfields (one red, one green) merged together with a merge shader. The heightfields have not been generated yet, so the areas appear flat. They are designed to overlap. Note how the overlap area is a blend of the red and green colors… it is yellow.
Now generate the heightfields and note how the two heightfields interact.
Here’s the generated result
Note how both the colors and the heights blend in the overlapping region… colors are a mix of the color of the two heightfields, and the altitude is the addition of both heighfields.
This example is constructed to understand how multiple heightfields in the same TGD interact. With a little work, the red area could be desert, the green area plains. Toss in an altitude shader to make the higher area in the middle snow-covered and the result would be quite a bit more realistic.