Graphics Reference
In-Depth Information
How it works...
The effect happening on the water material is due to the Ray Length output, which returns
the length of the light rays passing through an object, thus giving the thickness of that object.
In our case, the distance from the water mesh surface to the far distance (from the Camera
point of view, because the light rays originate from the Camera).
The gradient of the ColorRamp is mapped on the length of this Ray Length output (also
clamped and inverted by the same ColorRamp node), connected to the Fac input socket of
the Mix Shader node in order to work as a stencil map to smoothly blend the amount of the
Glass shader with the amount of the Transparent BSDF shader node.
Thus, the transition from the Transparent shader to the Glass shader returns the impression of
a volume of water becoming murkier as the distance of the object from the surface increases.
Creating a fake volume light material
In this recipe, we will create a material to fake the typical effect of a cone of light visible when
passing through the dust suspended in the air, or falling from the sky on a cloudy day (the
so-called God's rays) different from the real volumetric effect described in the There's more
section of the Using Cycles volume materials recipe. This is a fakeā€”just a mesh and not a
real light to be used for the scene. Therefore, a matching Lamp must be set for the real
lighting, as shown in the already made blend file.
The fake volume cone of light as it appears in the final rendering
 
Search WWH ::




Custom Search