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
Start Blender and open the 9931OS_09_volumelight_start.blend
file, where there is a scene set with a ground Plane, a Cube, the volumetric cone mesh (volume_light), a spot mesh object (spot_mesh), and an effective Spot lamp parented to the volume_light. The Spot lamp cone follows the shape of the volume_light, and its purpose is to light the Cube leaning on the ground Plane.
The volume light objects also have a brief animation of 98 frames. To see it, move the Time Cursor inside the Timeline window; to point the cone of light to the Cube, go to frame 81.
Let's go ahead with creating the light cone material:
volume_light
.Mix Shader1
.Mix Shader4
). Connect the output of the Transparent BSDF node to the second Shader slot.0.769
, G to 0.800
, and B to 0.592
. Then set the Fac value of Mix Shader4 to 0.800
.0.900
.0
. Then move the white color stop to the extreme left.Intensity
, and connect it to the Fac input socket of the Mix Shader1 node. Set the value to 0.400
.The entire material network
9931OS_09_volumelight_final.blend
.The effect of light blending with the night is obtained by the various factors of blending of the Mix Shader nodes that cause the mixing of the Emission shader with the Transparent shader. The purpose of connecting the Value node to the Fac input of the Mix Shader1 node is to establish the intensity of the fake volumetric light. A value of 1.000
turns it off completely (be careful not to go beyond 1.000
, otherwise the cone mesh will show up as a dark silhouette). On the contrary, values towards 0.000
(or even negative values) make it appear more and more intense.
Be careful with this simulation because being a mesh emitting light, it can produce strange and unrealistic effects if not carefully planned. Suppose you go to frame 62 and start the rendering. Then you will see that the volumetric cone mesh is intersecting the Cube even in those areas where a real light would create shadows.
Since Cycles has been added to Blender, many artists have posted screenshots and tests for almost every possible kind of material. Especially on the Blender Artists forum, you will find a plethora of data and will discover different (and often better) ways to create the same materials that you have seen in this Cookbook.
Now it's up to you to create new, amazing materials and renderings that no one can avoid staring at. Blend on!