Author Topic: Mask by cube  (Read 285 times)

Offline treddie

  • Member
  • *
  • Posts: 156
Mask by cube
« on: August 30, 2017, 04:49:01 PM »
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.
« Last Edit: August 30, 2017, 04:54:56 PM by treddie »

Offline Kadri

  • Member
  • *
  • Posts: 7844
Re: Mask by cube
« Reply #1 on: August 30, 2017, 05:39:35 PM »

Just one of many ways.

Offline treddie

  • Member
  • *
  • Posts: 156
Re: Mask by cube
« Reply #2 on: August 30, 2017, 05:41:53 PM »
Hi Kadri,

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

75828-0

I will check out your file.

Offline Kadri

  • Member
  • *
  • Posts: 7844
Re: Mask by cube
« Reply #3 on: August 30, 2017, 05:45:24 PM »

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.
« Last Edit: August 30, 2017, 05:49:04 PM by Kadri »

Offline treddie

  • Member
  • *
  • Posts: 156
Re: Mask by cube
« Reply #4 on: August 30, 2017, 05:52:01 PM »
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.

Offline treddie

  • Member
  • *
  • Posts: 156
Re: Mask by cube
« Reply #5 on: August 30, 2017, 05:55:02 PM »
Yep...Scale was it.  It works now.  So what we see in the Density Fractal preview is not necessarily correct.

Offline Kadri

  • Member
  • *
  • Posts: 7844
Re: Mask by cube
« Reply #6 on: August 30, 2017, 06:00:46 PM »
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.

Offline treddie

  • Member
  • *
  • Posts: 156
Re: Mask by cube
« Reply #7 on: August 30, 2017, 06:04:01 PM »
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.

Offline Kadri

  • Member
  • *
  • Posts: 7844
Re: Mask by cube
« Reply #8 on: August 30, 2017, 06:05:03 PM »

:)

Offline Dune

  • Member
  • *
  • Posts: 12730
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Mask by cube
« Reply #9 on: August 31, 2017, 05:58:05 AM »
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.
In case you still haven't seen enough of my work: www.ulco-art.nl