Graphics Programs Reference
In-Depth Information
In the preceding screenshot, you can see that only the plane and the sphere in front
are lit by the
Spot
lamp. With a mesh-light plane replacing the
Spot
lamp, instead,
both the sphere and the cylindrical green wall behind are lit, as shown here:
So what if we want to only light the object in one direction (plane and sphere in front)
with a mesh-light? Is there a way to make a light-emitting plane to emit it only from
one side and not the opposite one? Yes, of course, there is:
1. Open the
1301OS_01_meshlight.blend
file, which has a prepared
scene similar to the one used for the preceding screenshots, and set the
bottom 3D window to the
Rendered
mode by clicking on the
Viewport
Shading
button in the header and selecting the upper item.
2. Left-click the
Emitter
item in the
Outliner
and put the mouse pointer in
the
Node Editor
window. Add a
Mix Shader
node (press
Shift
+
A
and go
to
Shader
|
Mix Shader
) and move it to the link connecting the
Emission
node to the
Material Output
node to paste it in between.
3. Add a
Geometry
node (press
Shift
+
A
and go to
Input
|
Geometry
) and
connect its
Backfacing
output to the
Fac
input socket of the
Mix Shader
node.