How do you control populations?

Started by Elegy, February 04, 2009, 02:09:17 PM

Previous topic - Next topic

Elegy

I've made myself a rock and I'd like to place some moss on it. I thought an interesting way to do this would be to load a grass population, shrink it down and place it on the rock but limit it to a certain slope (say, a max of 20 degrees). Unfortunately, I can't seem to get the population to disappear above 20 degrees no matter what I try.

I've tried using a power fractal blended with a surface layer (set to 20 degrees max slope) as a density shader but it makes literally no difference whatsoever. When I set the maximum altitude to 5m, it works though - no grass is present above 5m. Yet when I set the exact same surface layer to max slope, nothing happens.

What am I doing wrong?

Things I've tried that don't work:

- Feeding the surface layer a compute normal
- Checking/unchecking "Use Y for slope"
- Changing the slope key

Tangled-Universe

Did you use a rock-object or a fake stone shader for creating the rock?
If so, it is not possible to place objects upon them.
If not, then please post a .tgd-file showing the problem.

Martin

Elegy

Yes, I used a fake stone shader but it's heavily distorted by various power fractals. I don't know if you can't place objects on naked rocks but you certainly can with distorted ones.

The TGD is attached.

Tangled-Universe

Quote from: Elegy on February 04, 2009, 02:49:06 PM
Yes, I used a fake stone shader but it's heavily distorted by various power fractals. I don't know if you can't place objects on naked rocks but you certainly can with distorted ones.

The TGD is attached.

Huh? If you can place them on distorted ones you surely have to be able to place them on naked ones.
But...I've learned now that you can indeed place objects on fakestones :)

The reason your setup doesn't work is very simple. The patch size of the last compute terrain is set at 20. But your fake stones scale is set at 7. So the compute terrain won't compute the terrain with patches smaller than 7 metres. I've reduced it to 0,5 (for example) and then the masking using the surface-layer works just fine.

Another thing I saw in your setup: you also have a compute normal up in the chain of the rocksurfacing. It doesn't work the way it is connected now. The compute normal needs an input. You can pick the shader before your fake stones layer (in this case the base colours). However, you'll see that your stones will be messed up.
In your case you're only using displacements along the normal so they don't necessarily need an extra compute normal, only when you're using displacements along vertical/lateral you'll need it.
You can check this by simply disabling the compute normal: it won't change the appearance of the stones, nor the placement of the objects.

I hope this all helps and thanks for showing you can indeed place objects on fake stones :)

Martin