TG is awesome for creating realistic mountains. What I would like to know if there is a way to have more control over their placement. For example, a list of x/y/z points to provide the origin of the alpine fractal algorithm, much like the population instances for objects. It would be a huge time-saver for creating realistic 3D versions of existing hand-drawn maps for fantasy books.
Any ideas?
Try this :)
Quote from: cyphyr on April 12, 2014, 08:29:08 PM
Try this :)
Now
that is pretty damn cool. Stored in my "examples" library, thanks!
After adding a few mountains here and there, and combining them with merge shaders, I realized I was heading for a confusing mess of a node tree if I was going to have a couple hundred mountains for my map.
Here's where I may be exposing my inexperience: I saw this "multi shader" node, said "aha!", but when I tried to pipe it into the fractal shader, TG3 crashed every time. Perhaps the nodes are incompatible? Thx for any help.
The Multi Shader is actually an old node mainly kept around for reasons of backward compatibility. It was previously used instead of the Parts Shader for handling multiple textures on objects. So it's best to ignore it at this point (and I imagine we'll remove it from the node menus in the future).
When you're trying to put specific features (e.g. a mountain) into a specific location, there are some basic things to be aware of with the workings of the procedural functions Terragen uses to generate terrain. Basically, due to their procedural nature, they can't really be explicitly "directed" like that at this point. A procedural function is a mathematical definition that creates color pattern output essentially, and the output is pseudo-random. Thus it's not really possible to say "put a mountain there" by using just a procedural function and have it look like e.g. the Alpine Shader.
Now, you can certainly create a specific, simple shape with something like the Painted Shader, Simple Shape Shader, or even the Crater Shader and several others. The key thing that will be lacking is realistic detail. You'll basically just get a very simplistic shape, smooth and featureless aside from the larger-scale shape that you've defined. So adding detail then is the tricky part, and that's where procedural functions do have a lot of value. As I said they cannot be so easily "directed", but if you get an understanding of how the interaction of *scales* work, you might be able to find a good workflow.
A good approach to try would be using a Painted Shader or Simple Shape Shader to create a basic shape, let's say a circle. Create it in the Terrain layout/group. Feed its output into a Displacement Shader to get height out of it. The Displacement Multiplier will control height, measured in meters. Once you get dimension to your shape, add a Power Fractal next in the Terrain group. This will allow you to add detail to your shape. What you want to do basically is adjust the Power Fractal so that its scales - Feature Scale, Lead-in, and Smallest - are all smaller than your larger terrain shape that you've created, probably by an order of magnitude or even two (so if you have a 1000m mountain, make your Feature Scale 100m say). Make your Displacement Amplitude (on the Displacement tab) about 1/2 of your Feature Scale. Instead of a Power Fractal you could also use a Fractal Warp Shader which is designed to add detail to terrain in situations just like this. Either approach should give you a start on creating a base shape and then adding procedural detail to it, essentially getting the best of both and hopefully giving you the "put mountain there" type of control you want.
The other thing you can consider is using a Simple Shape or Painted Shader as a *Mask* input for a Power Fractal. The challenge there is that the random nature of the Power Fractal output doesn't guarantee that a mountain shows up in your masked area. *But* you can use a Translate Input shader to move a mountain into the masked area. Or simply reposition the mask to be around an existing mountain in the Power Fractal. To best accomplish this you'd probably want to turn the Mask on the Power Fractal off so you can find a good mountain, then do your Translation of the Power Fractal to move the mountain where your mask is, or move the mask to where your mountain is. Either will work.
That should be a start and hopefully you can experiment to get the results you want from there.
- Oshyan
Thanks for the suggestions, Oshyan. I think the first option would be easier to control at a mountain-by-mountain level. Would the height of the displacement shader be the mountain's peak, or the average? Using your example, I assume the peak would be 1000m high.
However, this approach still presents the problem of a very complex node tree if I have a lot of mountains. I'm wondering if I could use one image shader with white circles where I need them (like an array shader, but manually placing the instances), then pipe that into the displacement & fractal shaders. I could even have separate images for different heights, such as low hills, medium mountains, then the big Himalayan size ones.
The height of the displacement shader would indeed be the highest point of your mountain, the peak. You could certainly use an Image Map Shader with white areas painted where you want mountains. It would be ideal to paint mountain-like shapes if possible, in a basic sense. Basically, the better the shapes you can start with, the easier it will be to get nice results. No need to have separate images for different height ranges, I don't think (though you could potentially). Just use shades of gray to represent different heights.
- Oshyan