Is a Distribution Shader always a manual addition?

Started by yesmine, February 20, 2014, 04:50:17 PM

Previous topic - Next topic


I've been experimenting while learning Terragen, and was testing applying grass over a wide terrain. In some of the presets for shading a terrain to appear as grassy fields, I saw options to control the location on the terrain so it looks like grass goes only so high or thins out with altitude (maximum/minimum slope or height, etc.) But when using a simple clump of grass as a population, there doesn't seem to be any default option to control presence on a slope or restrict it by height/altitude. Searching the forum and looking at samples by others, I see that a Distribution Shader is often used to control that.

What I'm wondering is whether manually inserting a Distribution Shader is always required for slope/altitude control, or am I simply inserting the grass clump population the wrong way? My sense is that whenever a plant or object is inserted as a population, it would be practical to automatically include control for slope or altitude on the terrain, so I thought I'd ask.



I haven't used every single shader yet so I can't my self say for sure. But what I can tell you is that if you ever need the distribution shader as a way to control the effects of other shaders, you can always add it.

Perhaps only the blue nodes would not respond to the distribution shader as dependably?

I understand wanting to have a definitive statement on this! And Oshyan or some users may have a precise numbers and list of which shaders can do what.

Usually though, when a shader has a control that others don't, its just a way TG saves you time. It does not mean that you cant add the control. For example, some nodes have a rotate control built in, but with a little extra effort you can add rotate by a number of different ways (depending on the node).

But the important thing to remember (I think) is that, you can add the distribution shader when ever you need it, to control both color and displacements and populations.

Personally, if a node can be controlled  by the distribution shader or a translate shader, then I would prefer that power be in the node already. But sometimes you will have add the control node.
It has been eaten.


It's quite an easy practise to add a distribution shader to every (or every group of) population. You can use the masking input to attach any masks you made, and/or a power fractal for clumping vegetation, and use the slope and height tabs for refinement of distribution. You don't need to hook it onto anything before.


Thanks, TheBadger and Dune. After a bit of experimentation with the Distribution Shader, it isn't hard to get exactly the control required. Actually, I've realized that by making a grass population over a large area, including a distribution shader, and then saving the nodes as a clip, I now have something to simply stick in whenever I need that kind of grass in a scene. I'm sure that's old news to you pros, but realizing I can build up a little library of pre-configured-yet-flexible clips of vegetation to use anytime is a big plus.

Also nice is something I realized while playing with the displacement setting for the base color. I inadvertently set the displacement to -.3 and suddenly the grass clumps appeared as bushes, their shadows off-set and slightly lower since the terrain dropped. Well, well, I went back and reset the displacement, then translated the grass vertically by .45 and scaled it vertically by 3. Voila!--at a little distance, where the LOD is low that it is not conspicuous, it's very effective as bushes going on for miles and miles (see attached.) Nice trick that might be useful in some cases

p.s. Dune: Greatest sci-fi novel ever written!


Populations have a generic Mask input and can be Masked by any shader that outputs color information. The reason one is not included by default with populations is we don't make the assumption that masking is desired, or if it is, that the user will want to mask using the tools included with the Default Shader. So we tend to err on the side of user choice and flexibility, though it does mean an additional step if you do want to mask by distribution.

- Oshyan