Controlling object population.

Started by DMFW, December 16, 2021, 08:41:59 PM

Previous topic - Next topic

DMFW

This is a very general question where I need a bit of help. I am making a scene with an island in it and I would like to populate my island with a forest, but NOT put trees beyond the shore line, or on the top of a mountain. What I'd really like to do, is something similar to the way that a maximum and minimum altitude can be specified for a surface shader and have that affect the object generation. My first thought was that I could perhaps use the object density shader on the population and assign it to an existing surface shader that was already bounded by the desired maximum and minimum altitudes, but this doesn't seem to prevent generation of objects above the maximum altitude (at least), so I think my idea is too simplistic. What's the best way to do something like this? 

A follow up harder question, is that I also have a small lake on my island, and I would like to avoid populating trees into that, but ideally get them right up to the shore line. In a perfect world I likt to put one bounding box for my population completely round the island and use a density shader to achieve all the effects described but is this possible? If so how and if not, how would you go about achieving these kind of effects?

WAS

You should use the Distribution Shader for the input into the Density Shader, it is like a surface layer but more geared at masking. For the lake, if it is derived from a simple shape shader, use that in combination with a Colour Adjust Shader to mask the previous Distribution Shader, setting it's mask input to invert with the checkbox .

DMFW

That was exactly what I needed to know, thanks! Although I feel I am starting to get to grips with Terragen I have a lot to learn and particularly the uses of the various shaders. The lake was a water object and I couldn't figure out how to use the data in there directly to mask the distribution shader, however your post pointed me in the direction of a working solution. I simply created a shape shader called "lake exclusion zone" and positioned it over the lake, then used that. My trees are now going where I want them to on the island.

Dune

You can always post a tgd, and one of us could have a look at what you need to, or can do.