In this tutorial, we will make a desk lamp using Light Intensity Curves, Light Fog, Double-Sided Shading and Shader Glow.
Create the Lamp Body
Using primitive objects, build a simple desk lamp head. In this example, I used a detached sphere, a cylinder and filleted connections. Place a light bulb in the head, and group all the objects together.
Adjust the Surface Normals
We will be using a double-sided shader on the lamp body, which will map colors or textures based on the direction of the surface normals. If you have several surfaces on the body as in this example, make sure the normals are facing the same way on each surface.
Select the surfaces and press the 5 key to go into shaded mode. Click on Display -> Nurbs Components -> Surface Normals (Shaded Mode). The direction of the normals will be displayed. The direction of the normals is dependent on the U and V direction of the surfaces, so in order to reverse the normals, reverse either the U or V direction of the surface you want to reverse.
|
Create a Double Sided Shader
Let's make the outside of this lamp a different color than the inside. In the hypershade window, create a Phong Material, a Sampler Info node, and a Condition node. In the attribute editor of the condition node, set the operation to equal, color 1 to [1.00, 1.00, 1.00] (white) and color 2 to [1.00, 0.00, 0.00] (red).
(Note: you can also map textures to the two colors instead)
![]() |
MMB-drag and drop the condition node onto the phong material, and map the condition to the color input.
MMB-drag and drop the sampler info node onto the condition node. The connection editor will appear. Map the Flipped Normal attribute of the samplerInfo node to the First Term of the condition node.
![]() |
In this setup, the Sampler Info node queries the direction of the surface normals. The condition node will apply either color one or color two to the surface, depending on the direction of the normals as reported by the Sampler Info node.
If the colors are reversed, change the Operation in the Condition Node Attribute Editor Window to "Not Equal".
![]() |