Planetside Software Forums

General => Terragen Discussion => Topic started by: Thejazzshadow on December 24, 2009, 05:12:54 PM

Title: clamp function question
Post by: Thejazzshadow on December 24, 2009, 05:12:54 PM
I have created a basic voronoi function that looks like rocks on the shore of a lake. What I want to do is stop the rocks at a certain height. How do I limit the height of the function specifically.
Title: Re: clamp function question
Post by: choronr on December 24, 2009, 05:33:01 PM
My only thought would be to use a distribution shader set at maximum altitude or slope.
Title: Re: clamp function question
Post by: Henry Blewer on December 24, 2009, 07:48:54 PM
Surface layers can do this also. A surface layer also allows adding displacement directly using the displacement input. This can be a power fractal, redirect shader, or a node tree.
Title: Re: clamp function question
Post by: Thejazzshadow on December 24, 2009, 08:11:04 PM
Do I plug the displacement shader into the input of the surface layer?
Title: Re: clamp function question
Post by: Henry Blewer on December 24, 2009, 08:58:03 PM
Go to the displacement tab of the surface layer. Use the box on the right of the input and use assign to link to the last link of the displacement node.
Title: Re: clamp function question
Post by: Tangled-Universe on December 25, 2009, 05:40:44 AM
Is the layer which generates the voronoi a surface layer? If so, then use the surface layer's own restriction parameters.

If not, if it is generated using a displacement shader, then connect the output of the displacement shader into the child-layer port of either a surfacelayer or distributionshader and use their restriction parameters.

This should work, otherwise you can post your tgd (or an example) so we can figure it out for you.

Cheers,
Martin