In this recipe, we'll see the properties and the settings of the World in Cycles.
The main characteristic of the Cycles World is that it can emit light, so it practically behaves as a light source. Actually, its effect is the famous Global Illumination effect.
As in Blender Internal, the World is considered as a virtual dome at a large distance from the camera, never touching the scene's objects. Nothing in the 3D scene can affect the World. Actually, only the World can emit light on the scene and the objects.
start_04.blend
file and go to the World window under the Properties panel to the right of the screen. This is where we see the usual Use Nodes button under the Surface tab.R 0.179
, G 0.152
, and B 0.047
, and save the file as start_05.blend
.Note that both the intensity and the general color graduation of the World are driven by this color. To have more light, just move the Value slider (the vertical slider) to a whiter hue. To give a general color mood to the scene, pick a color from inside the wheel. This will affect all of the scene's illumination but will show the effect mainly in the shadows, as shown in the following screenshot:
To the right is the color wheel to set the World's color, inside the World window, under the main Properties panel
However, to get access to all the options for the World, we have to initialize it as a node system, which is shown in the following steps:
The World button to be switched in the Node Editor toolbar
Just like the materials, the default material for the World is simply made up of two nodes. A Background node is connected to a World Output node. In the Background node, there are two setting options: the Color box and the Strength slider. Both of them are quite self-explanatory. Now, perform the following steps:
The Sky Texture node with options connected as Color to the Background node
Note that you can also modify the incoming direction of the light, that is, the location of the sun, by rotating the sphere icon inside the node interface. This control isn't that much precise, by the way, and will hopefully improve in the future. The next steps are as follows:
start_06.blend
.The pink warning effect of a missing texture in the Environment Texture node of the World setting
textures
folder and load the Barce_Rooftop_C_3k.hdr
image (a free, High-dynamic-range (HDR) image licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License from the sIBL Archive, at http://www.hdrlabs.com/sibl/archive.html).The Rendered preview of an HDR image assigned as a background to the World through the Environment Texture node
start_07.blend
.Now let's imagine a case in which we want to assign a texture to the World material and use it for the general lighting of the scene, but we don't want it to show in the background of the render. In other words, we are using the HDR image to light the Spheroid and the Plane, but we want the two objects rendered on a uniform blue background; so how do we do it? This is how:
The previous World setting rendered with a transparent background
A different way to render the two objects on a uniform blue background is to use a Light Path node:
R 0.023
, G 0.083
, and B 0.179
.The use of the Path Light node as a factor to have a different background than the HDR image still illuminating the scene
start_08.blend
.To explain this trick better, let's say we just created two different world materials: the first material with the texture and the second material with a plain blue color (this is not literally true; actually, the material is just one, containing the nodes of two ideally different worlds).
We mixed these two materials using the Mix Shader node. The upper green socket of the Mix Shader node is considered equal to a value of 0.000
, while the bottom green socket is considered equal to a value of 1.000
. As the name suggests, the Light Path node can set the path for the rays of light that are shot from the camera, if you remember. Is Camera Ray means that only the rays directly shot from the camera have a value of 1.000
, that is, not the reflected ones, or the transmitted ones, or whatever, which have a value of 0.000
.
Thus, because the textured world is connected to a socket equal to the value of 0.000
, we don't see it directly as a background, but only see its effect on the objects lit from the reflected light or from the HDR image. The World of the blue sky, which is connected to the input socket of value 1.000
instead, is seen as a background because the light rays shot from the camera directly hit the sky.
Just after the Surface subpanel, in the World window, there is the Ambient Occlusion subpanel. Ambient occlusion is a lighting method used to emphasize the shapes or the details of a surface, based on how much a point on that surface is occluded by the nearby surfaces. Ambient occlusion can replace the Global Illumination effect in some cases, though not the same. For example, to render interiors with fast and noise-free results, ambient occlusion is a cheap way to get an effect that looks a bit like indirect lighting.
There is a checkbox to enable Ambient Occlusion, along with the following sliders:
1.00
is equivalent to a white World.The Ambient Occlusion feature is only applied to the Diffuse BSDF component of a material. The Glossy or Transmission BSDF components are not affected. Instead, the transparency of a surface is taken into account. For example, a half-transparent surface will only half-occlude other surfaces.