Mask by cube

Started by treddie, August 30, 2017, 12:49:01 PM

Previous topic - Next topic

treddie

Hello.

I have a scene with clouds.  I love the clouds and their position on the left.  I hate the clouds on the right.  If I could just mask out the right-hand clouds life would be beautiful.
Is there a way to make a huge cube object act as a mask on the right side of the scene, so that no clouds within the cube render?  Or perhaps a plane that separates left from right in the scene, and no clouds to the right of the plane renders?

Even a gradient mask with white on the left and black on the right would work, but can't find a way to assign such a gradient to the clouds, that is perpendicular to the camera view normal.

Would be nice to have a simple lasso tool that can tell the camera to not render something within the lasso.

At any rate, I have been trying to find a combo of shaders to make this work, and cannot find such a combination.  I'll keep searching in the meantime.

Kadri


Just one of many ways.

treddie

Hi Kadri,

I just came back with my latest failed example, when I saw your post.

[attach=1]

I will check out your file.

Kadri

#3

Hi. Not sure but your image size is just too small and doesn't cover the clouds probably.
Just change the image size and-or centre.
A more easy way is to use the camera front projection setting there.

treddie

Hm, I assumed that in the preview windows, if the mask completely covered the area I wanted not to render, everything would be ok.  The underlying density fractal is the same, just covered in black on the right.

Your example is identical to mine except that you used a simple shape shader, rather than an image map shader.

treddie

Yep...Scale was it.  It works now.  So what we see in the Density Fractal preview is not necessarily correct.

Kadri

Yes it can be misleading if you don't see the size .
The preview size is 1 km in your example. The clouds are much bigger and farther away.

treddie

Thank you, sir!

Was almmmmmoooost there, except for the scale thing.  :o
And thanks for using the Simple Shader example,  I couldn't find a way to get that one to work when I was experimenting with it earlier.

Will experiment with your camera projection advice, too.


Dune

You can also use a distance shader and a new camera. Put the camera near the edge of where you want clouds, point it in the direction of clouds (or no clouds) set to Z distance, and put some values for the distance in the black and white (determines softness of transition), lead to fractal's mask input or final density input on the cloud node. This can also be used in combinations, if e.g. you need a triangular (3 camera's and distance shaders, added) cloud coverage or triangular open sky or whatever.