Distant shader on clouds unexpected behaviour.

Started by DutchDimension, August 12, 2021, 04:53:44 AM

Previous topic - Next topic

DutchDimension

So I've got a 'Cloud layer v3' that get's fed by the usual Density Fractal (Cloud Fractal Shader v3) to shape some clouds. The Density Fractal has a Distant Shader plugged in the 'Mask Shader' port. A Camera is used as a location device to position the centre of the Distance shader.
I basically want to limit the coverage of the clouds to a smallish circular area in the sky, so that I can combine it with another cloud layer node (that has the same mask, but its polarity reversed).

As soon as I connect the Distance Shader to the Density Fractal, the clouds indeed get masked to the circular area as defined by the Far/Near settings in the 'Distance Shader'. Unfortunately, the entire area outside of this mask now gets filled in by what can best be described as... smog? (See attachment) That is to say that the entire sky itself is now totally occluded by said smog. It is completely opaque. This is NOT what I want, nor expected because it means not only does it cover the sky, but also any other cloud layers above it.

Either I'm doing something wrong or this surely this must be a bug? If the former, how can I achieve what I am after?

In the animated gif I turned off the Atmosphere so you can very clearly see the sky in the image that is not using the Distance shader as a mask. In the other image the Distance shader is connected but the black of the sky disappears behind said layer of smog.

Untitled-2.gif

Dune

What if you uncheck the clamps? Or set the black to minus 1...

What you can also do is just locate the cloud and restrict it in the cloud itself. Or use a soft edged circular simple shape a s a mask. And you'd better mask by the final density, especially if you increase coverage in the cloud tab. That won't work very well together.

DutchDimension

Quote from: Dune on August 12, 2021, 11:29:18 AMWhat if you uncheck the clamps? Or set the black to minus 1...

What you can also do is just locate the cloud and restrict it in the cloud itself. Or use a soft edged circular simple shape a s a mask. And you'd better mask by the final density, especially if you increase coverage in the cloud tab. That won't work very well together.
Hi Dune,

thank you for dropping in with some advice. I did try a Simple Shade as a mask, but the results were the same.
How/where can I mask the 'final density'?

DutchDimension

Quote from: Dune on August 12, 2021, 11:29:18 AMWhat if you uncheck the clamps? Or set the black to minus 1...

What you can also do is just locate the cloud and restrict it in the cloud itself. Or use a soft edged circular simple shape a s a mask. And you'd better mask by the final density, especially if you increase coverage in the cloud tab. That won't work very well together.
Oh and unchecking the clamps and/or setting negative values resulted in other undesired behaviour.

DutchDimension

AH. I think I've got it working now, thanks to your advice Dune. Found the 'Final Density Modulator' port on the 'Cloud layer v3' node. Plugged my Distance Shader in there and setting the values for Far and Near color to -1 and 1 respectively got me the result I was after.
Interesting but convoluting work flow.

Thank you Dune for your great advice!  :)

Dune


WAS

Probably cloud layers coverage was upped or further alterations of the density input lifted the black values.

DutchDimension

Quote from: WAS on August 13, 2021, 12:51:44 PMProbably cloud layers coverage was upped or further alterations of the density input lifted the black values.
It was actually turned down significantly (into the negative). I tried setting it back to 0, but that didn't solve the issue.

WAS

Something changed the black level in the density then if the coverage adjust isn't it. It's not default behavior.