Planetside Software Forums

General => Terragen Discussion => Topic started by: eapilot on November 16, 2018, 04:23:53 PM

Title: Is there a way to mask a cloud by clipping the high and low elevation?
Post by: eapilot on November 16, 2018, 04:23:53 PM
I am working on a cloud that I want to render out the top and the bottom in separate renders.  Is there a node/ function/ or combination nodes that can mask out the cloud vertically be selecting the elevation/height?
Thanks.
Title: Re: Is there a way to mask a cloud by clipping the high and low elevation?
Post by: WAS on November 16, 2018, 05:37:28 PM
Surface Layer with colour input disabled (or use the colour as the density input)

https://planetside.co.uk/forums/index.php/topic,25956.msg257782.html#msg257782
Title: Re: Is there a way to mask a cloud by clipping the high and low elevation?
Post by: Matt on November 16, 2018, 05:43:06 PM
Yes, absolutely.

You can use a Distribution Shader to define maximum and minimum altitudes. If you want to specify world-space altitudes, change the Distribution Shader's "Altitude key" to "Final position".

If you prefer to specify altitudes relative to the cloud layer's altitude, then you can do this if the Cloud Layer has "Move textures with terrain" enabled. Then you can set the Distribution Shader's altitude key to "Position in texture/terrain" (which is the default). With Easy Cloud, relative altitudes are relative to "Cloud base altitude". For Cloud Layer V2 and Cloud Layer V3 they're relative to "Cloud altitude", which is the mid-point between the top and the base of the cloud.
Title: Re: Is there a way to mask a cloud by clipping the high and low elevation?
Post by: Matt on November 16, 2018, 05:57:40 PM
To do the actual masking:

Easy Cloud has a mask input.

For the other cloud types you should mask the density shader(s) or use the depth modulator as a mask. If you have transition/fuzzy zones in your mask, then it might be better to use "final density modulator" because this will preserve the shape of the cloud in the transition zones, but it's slower to render.
Title: Re: Is there a way to mask a cloud by clipping the high and low elevation?
Post by: eapilot on November 16, 2018, 08:08:08 PM
I'm using Cloud Layer (v3).  I feel like I have more control that way.
Title: Re: Is there a way to mask a cloud by clipping the high and low elevation?
Post by: Matt on November 16, 2018, 11:29:47 PM
Yeah, that should work.
Title: Re: Is there a way to mask a cloud by clipping the high and low elevation?
Post by: WAS on November 17, 2018, 12:36:09 AM
If you use the distribution shader, you can define you minimum alt whee you want the cutoff at, you can just invert the mask in the density shader, to switch between the two levels.