I have a volume object with a basic volume material. I want to fade it along the Y axis, getting thinner and less dense as it goes up. Or even better, as it ages.
How do I change the density? Is it something to do with the volume mix node?
Or could I transfer alpha attributes from points to a volume?
Fading Smoke
7559 5 3- Soothsayer
- Member
- 861 posts
- Joined: Oct. 2008
- Offline
- xtimmyx
- Member
- 166 posts
- Joined: Oct. 2008
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
I think he wants to alter an already generated volume.
You can use a Volume Mix set to user mode and use something like:
$V * (1-$BBY)
or add a ramp parm and index in to the chramp() function with $BBY to have a ramp control the fall-off
or set it to multiply and create a second volume filled with increasing density and composite the two.
or use a Volume VOP SOP and do it in there. Volume VOP SOP works on voxels instead of points. Just do your bby stuff in there.
You can use a Volume Mix set to user mode and use something like:
$V * (1-$BBY)
or add a ramp parm and index in to the chramp() function with $BBY to have a ramp control the fall-off
or set it to multiply and create a second volume filled with increasing density and composite the two.
or use a Volume VOP SOP and do it in there. Volume VOP SOP works on voxels instead of points. Just do your bby stuff in there.
There's at least one school like the old school!
- Soothsayer
- Member
- 861 posts
- Joined: Oct. 2008
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
Oh I thought you were in SOPs… In SOPs you work with a single field at a time. Opacity is usually a color which requies three volumes but sure you can apply a Volume Mix SOP to all three and scale the voxel values by that expression.
$V is the current voxel's value. By multiplying it by $BBY you are linearly reducing the voxel values as you move up in Y in the volume primitive(s).
I think you mean opacity from within a shader. You can read in any volume primitive in to the surface shader as a parameter by it's name in SOPs. It's probably best to create another volume that is the same size and location that has decreasing values from 1 to 0 then in your surface shader, multiply the volume that you are using to shade (probably density if it is smoke).
$V is the current voxel's value. By multiplying it by $BBY you are linearly reducing the voxel values as you move up in Y in the volume primitive(s).
I think you mean opacity from within a shader. You can read in any volume primitive in to the surface shader as a parameter by it's name in SOPs. It's probably best to create another volume that is the same size and location that has decreasing values from 1 to 0 then in your surface shader, multiply the volume that you are using to shade (probably density if it is smoke).
There's at least one school like the old school!
- pelos
- Member
- 617 posts
- Joined: Aug. 2008
- Offline
-
- Quick Links