You are on page 1of 5

Illustration: Simon Danaher Email: sdanaher@onetel.net.

uk

3D

ART54.3dsk

64

2/1/01

February 2001

1:38 pm
Page 64

2/1/01

1:38 pm

Page 65

3D

3D Skills

ART54.3dsk

Strategies for
lighting
In the second of our two-part series, we take a
look at the intricacies of more advanced lighting
techniques, and offer you tips and alternative
methods for illuminating 3D scenes
he technicalities of lighting
can be highly involved, but
understanding the nature of
each light type in 3D apps
can help you create better lighting setups. Last month we covered some of the
general guidelines you need to follow
now well take that a step further.
Like many aspects of 3D programs, the
virtual objects and tools are designed to
closely mirror their real counterparts. So
we have spot, point and distant lights, as
well as area and tube lights which help

mimic the properties of light in the real


world. But as any experienced 3D artist
knows, getting imagery to look right often
requires lighting set-ups that would be
impossible to achieve in reality.
The best way to learn is to experiment
you may need to place lights inside
objects, link them to animated objects,
bury them in walls or under floors. So fire
up your 3D program and get started.
Artwork and expertise supplied by Simon
Danaher, [e] sdanaher@onetel.net.uk If you
missed any of our previous tutorials, you can
find them all in our online archive by heading
to [w] www.computerarts.co.uk/tutorials

February 2001

65

2/1/01

1:38 pm

Page 66

3D

ART54.3dsk

Part 1: The anatomy of a spot light


Spot lighting is by far the most commonly used light type. Lets take a more
detailed look at some of its properties
Depth maps 1
The depth map here tells the
renderer which parts of the scene
are in shadow and which are
illuminated by that light. The
parts occluded by nearer objects
in the scene in the depth map
render are in shadow.

Depth maps 2
Increasing the resolution of
the depth map render can help
to sharpen the edges of depthmapped shadows. This will
increase render times and
memory requirements.

The main property the cone has is its angle.

3 This is the measure of the spread of the lights


This is because, as you can see here, the spot

Heres a typical scene thats been lit by spot


lighting. The light, off to the top-left of the
image, casts an elliptical illuminated area on the
floor, and the shadows are also elongated.

The cone of a spotlight has another important

4 effect. Depth-mapped shadows can be

calculated from spotlights in most 3D apps. These


are renders that store the depth information of a
scene, in the form of a greyscale image from the
lights location. Here in ElectricImage you can
actually see a shadow map being rendered.

7 There are two reasons for this. The light is

too far away, and the cone angle is too large,


probably because we are trying to light too much
of the screen with a single light. By moving the light
closer and/or narrowing the cone angle, the shadow
becomes increasingly sharper, without needlessly
increasing the depth map resolution.

66

February 2001

2 light casts a cone of light. Its essentially a

directional, point light source. Because it has this


cone of illumination we can access some of its
parameters and alter the look of the lighting.

illumination. Most of the time youll use spot lights


that have angles within a 10 to 90-degree range.
Here a spots been set with an angle of 175 degrees
(the limit in Cinema 4D XL 6), where it acts like a
point light with a hemispherical illumination pattern.

The cone angle of a spotlight determines

5 the viewing angle for the depth map render.


Therefore, by previewing the scene through the
light (an option in many applications), you can
troubleshoot problems you may have with depthmapped shadows. Heres a typical example note
how the shadow is fuzzy and indistinct.

Another property of the cone is the softness

8 of its edge. Usually there are two angle

measurements for a spot light inner and outer


or a main angle and then the soft-edge angle. Here
are two spot lights, one with a hard edge (inner and
outer angles the same) and one with a soft edge
(smaller inner angle).

By viewing the scene through the spot light

6 you can see why. The object casting the

shadow is taking up a tiny portion of the view,


and therefore its presence in the depth map will
also be tiny, resulting in blocky or fuzzy shadows.

The soft-edged spot appears more natural


9 than the hard-edged spot. You can adjust the
degree of softness by just changing the inner angle.
If you set it to zero degrees, the edge falls off all the
way to the centre of the cone. Your 3D app may also
have a secondary fall-off factor control, to adjust the
rate of the fall-off at the edges of the cone, used
here in ElectricImage to create a soft look.

ART54.3dsk

2/1/01

1:38 pm

Page 67

3D

Inverse Square 1
The Inverse Square law is useful
to know. It enables you to work
out how bright a light needs to
be to illuminate an object at a
particular brightness and at any
given distance.

Fall-off rates
Not all 3D apps support this falloff rate, and youll find that some
offer alternative rates such as
Linear and Inverse Cubes for
slower or faster decays.

Another aspect one we touched on last

10 issue is illumination fall-off. A real lights


illumination decays by the inverse square of the
distance from it. If at 1m away the light intensity is
100, at 2m the intensity becomes 25 (100x1/22),
and at 4m its 6.25 (100x1/42). Put more simply,
doubling the distance quarters the intensity. Here
in XL 6 is a light set with an Inverse Square fall-off.

You can see in the previous step that although


11 the figure is nice and bright, the floor (much
further away from the light) is dimly lit. Along with
the Inverse Square setting weve also set Maximum
Distance. This is the point away from the light at
which its illumination becomes zero. In this case, its
four times further from the light than the figure is.

To make the fall-off more dramatic you


12 can decrease the Maximum Distance setting
and increase the light intensity. As shown here,
the light doesnt even get to the figures left hand.
Conversely, by increasing the Maximum Distance
and lowering the intensity the fall-off effect will
become much less noticeable.

Part 2: Selective illumination


You can choose which lights contribute to which shading property

1 Lights generally affect three areas of shading:


Diffuse, Specular and Ambient. Ambient
shading is a special case, but all lights will affect
the Diffuse and Specular components of an object
(depending on its material definition). Here this logo
is lit with two lights you can see that its just about
adequate, but certainly not great.

You may want to add some more lights to a

2 scene like this one, so as to catch some more


highlight on the object and give it more definition.
However, even when using fall-off, extra lights can
overexpose the scene.

3 In most 3D programs each light will have an


option to disable either its Specular or Diffuse
illumination, which means that you can place special
highlight lights. The purpose is to add Specular
reflections only, and not to illuminate the Diffuse
portion of the scene.

Part 3: Light Exclusion Lists


And you can also choose which areas are to be affected by extra lights
Excluding lights
Other applications have similar
Exclusion Lists. In LightWave
you can use the BRDF shader to
exclude lights on a surface-bysurface basis.

Another related feature is the Light Exclusion


(or Inclusion) list. In the example shown above,
you can see that the teapot and the floor are lit with
a simple three-light set-up.

2 We can progress by adding further Fill lights

to lighten the underside and add a bit of a kick,


but they are also casting light on the floor, which is
something we dont really want.

To prevent these four lights affecting the floor,

3 weve entered the floor into each of their

Exclusion Lists in ElectricImage. When we render


now, only the teapot is affected by the extra lights.

February 2001

67

2/1/01

1:38 pm

Page 68

3D

ART54.3dsk

Part 4: Lighting without lights


Bizarre as it sounds, you dont actually need lights for some lighting tasks
Luminosity
Luminosity maps are particularly
useful for creating lit windows in
buildings or for faking radiosity
in interior scenes.

This section of the lighting sign, which you


might recognise from last months issue, uses
a special technique for its illumination. This render
actually has no lights at all.

2 To create this effect we used luminosity maps

and reflectivity to create the illusion of a


luminous sign. To create lettering, we rendered
the model face on with 100 per cent luminosity.
This render was then taken into Photoshop.

3 Next, a selection was created from the letters

(Command-click a channel), and the text was


blurred to create the effect of backlight illumination.
The image was then cropped exactly to the extents
of the text and resaved.

The orange lozenge was a bit more involved.

4 Back in our 3D app the texture was applied

to the Luminosity channel of a new material,


which in turn was applied to the front face of the
lettering. Because we cropped the image to this
extent, we could use the Fit to Object command
(Automatic Sizing) to make it line up perfectly.

7 These were both applied in the Luminosity

channel of a new material. Their relative


intensities could be adjusted to get the right effect.
In XL 6 we used Smells Like Almonds Fusion Shader
to blend the textures. In other apps where you can
stack textures in a material, you can do this directly.

68

February 2001

5 The sides of the text were given a reflective,

chrome-like material, while the back face


was set to 100 per cent luminosity and moved
backwards slightly so the sides would catch the
reflection. A quick render shows that the full effect
can be achieved very quickly.

6 It has to simulate its own backlighting, but

also receive light spilled from the back of the text.


Reflectivity cant do this on its own, so it was back
to Photoshop to construct a luminosity map. Two
maps were made one for the internal lights, and
the other blurred text for the spill.

8 The neon arrow was created in exactly the

same way, blurring a luminous render of the


neon tube. This was applied to the arrow backboard
to simulate the illumination from the neon light.
The tube itself had a Fresnel Shader applied to
the Luminosity channel, so that the luminosity
would fall off at its edges.

The final effect was applying a glow to each

9 of the materials in varying degrees, to simulate


the glare youd expect to see from a bright sign. The
final image is a powerful combination of lights. ca

You might also like