"matting" part of the volume shader

27 views
Skip to first unread message

Jeff McFall

unread,
Mar 28, 2012, 11:11:22 AM3/28/12
to soft...@listproc.autodesk.com

I am stumped with this and hoping someone can give a quick tip.

I am using the volume shader to generate clouds. I have a nice look going but would like to flatten the bottom of the clouds so they look more natural.
My first thought is to use the scalar multi math node and a simple gradient to subtract part of the visible area in the volume.
However since it is a point cloud I can't create a projection for my gradient.

I am trying to use the texture space generator but since my particles are rotated, the gradient is also rotated per each particle. I need for it to be the same for the whole cloud.
Using "screen space" for the space transformation gets me close or at least makes me think I am clos, but is not much good with a moving camera.

I've tried to build a box around the cloud and use those uv's on the cloud but no luck so far.
I am sure this is simple, I just have not done this kind of thing before.

any tips suggestions much appreciated.


thanks
Jeff

winmail.dat

pet...@skynet.be

unread,
Mar 28, 2012, 11:24:28 AM3/28/12
to soft...@listproc.autodesk.com
use the vector state set to intersection point, plug it into the vector
input of a gradient, in the gradient select vector y and you're good to go.

Pete Edmunds

unread,
Mar 28, 2012, 11:24:44 AM3/28/12
to soft...@listproc.autodesk.com
A lattice around the cloud and squash it a tad?

Jeff McFall

unread,
Mar 28, 2012, 3:37:58 PM3/28/12
to soft...@listproc.autodesk.com
Thank you both for your suggestion.
I am trying to setup using the vector state, but it does not seem to be working for me
The edges of my gradient appear to be clamped at the origin of the scene

I've included an image of the render and nodes to illustrate. This is a front view render.
All of the render tree is disconnected except for the gradient part.

i would like for the gradient to be mapped evenly across a bounding box of the cloud or something similar. I would prefer it to be a static map since the bounding box of the cloud is likely to change depending on the location of particles.

many thanks
Jeff

volume-gradient.jpg

pet...@skynet.be

unread,
Mar 28, 2012, 4:53:20 PM3/28/12
to soft...@listproc.autodesk.com
your rendertree looks ok to me - did you play around with the active range
figures?
now this would be a vertical gradient from 0 (the origin) to y +1 in the
scene - which depending on scale can look very small.
also - watch out with densities in the volume shader - they use the alpha
values by default I think - and by default the alpha of the gradient is 1
all over - so change the black to have zero alpha.

I'm not sure rendering the volume from an orthogonal viewport is reliable
btw.

when in doubt, map the gradient first on the volume's colour or ambient
color - so you can see it showing up and adjust it - and then later plug it
into the density.

think of 'intersection point' as static 3D space of the world - the gradient
or other texture that uses it will be static in space - however you move
particles or objects around.


Hope you get it solved - I'm gonna be offline for a couple of days

Jeff McFall

unread,
Mar 28, 2012, 5:49:05 PM3/28/12
to soft...@listproc.autodesk.com
that was it - active range, they are rather sensitive which is why I missed their effect earlier.


thanks for taking the time to help me out!

Reply all
Reply to author
Forward
0 new messages