Author Topic: Is there a way to mask a cloud by clipping the high and low elevation?  (Read 284 times)

Offline eapilot

  • Member
  • *
  • Posts: 70
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.

Offline WASasquatch

  • Member
  • *
  • Posts: 3255
Re: Is there a way to mask a cloud by clipping the high and low elevation?
« Reply #1 on: November 16, 2018, 09: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

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3549
  • I'm the crazy one
Re: Is there a way to mask a cloud by clipping the high and low elevation?
« Reply #2 on: November 16, 2018, 09: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.
Just because milk is white doesn't mean that clouds are made of milk.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3549
  • I'm the crazy one
Re: Is there a way to mask a cloud by clipping the high and low elevation?
« Reply #3 on: November 16, 2018, 09: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.
Just because milk is white doesn't mean that clouds are made of milk.

Offline eapilot

  • Member
  • *
  • Posts: 70
Re: Is there a way to mask a cloud by clipping the high and low elevation?
« Reply #4 on: November 17, 2018, 12:08:08 AM »
I'm using Cloud Layer (v3).  I feel like I have more control that way.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3549
  • I'm the crazy one
Re: Is there a way to mask a cloud by clipping the high and low elevation?
« Reply #5 on: November 17, 2018, 03:29:47 AM »
Yeah, that should work.
Just because milk is white doesn't mean that clouds are made of milk.

Offline WASasquatch

  • Member
  • *
  • Posts: 3255
Re: Is there a way to mask a cloud by clipping the high and low elevation?
« Reply #6 on: November 17, 2018, 04: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.

 

anything