Is there a way to make a fluid box dissipate (not in sim terms really, just render with less opacity) as it gets closer to a camera?
It needs to get partially less opacity, not the full thing.
Thanks!
Is there a way to make a fluid box dissipate (not in sim terms really, just render with less opacity) as it gets closer to a camera?
It needs to get partially less opacity, not the full thing.
Thanks!
You can use 3d texture on the fluid density… for example you could project a ramp texture from above(map it to transparency)… parenting the texture node to the camera. (turn wrap off on the 3d placement node). You will need to enable volumeSamplesOverride on the fluidShape and enable enough volume samples so that it can properly evaluate your texture within the fluid( otherwise it only evaluates at the outer bounds). Make the transition on your ramp gradual so that you do not need too high a volumeSamples.
Or instead of the parented projection you could route the cameraPointZ from a samplerInfo into a remapValue utility connected to transparency. (you still need to increase volume samples, though)
Oh that’s some good ideas, thanks Duncan! I was thinking cameraPointZ would not work well with volumes but sounds like it might be just fine.
Reason why I’m asking is actually that I have two cameras and with two clipping areas (near and far) that need to match up with each other in comp (stereo reasons). There’s a nasty edge right at the clipping area and it seems like Mental Ray stops rendering a voxel as soon as it hits a certain voxel, not let’s say the middle of a voxel - but its box. The result means one line of voxels won’t render in either far or near clipping areas.
That’s my guess from what I’m seeing in the renders - is that what actually happens, and is it fixable? The original question is related to a tedious workaround…
Thanks again!