ART54.3dsk

5
Illustration: Simon Danaher Email: [email protected] 64 February 2001 3D ART54.3dsk 2/1/01 1:38 pm Page 64

description

3d

Transcript of ART54.3dsk

Page 1: ART54.3dsk

Illu

stra

tio

n: S

imon

Dan

aher

Em

ail

: sda

nahe

r@on

etel

.net

.uk

64 February 2001

3D

ART54.3dsk 2/1/01 1:38 pm Page 64

Page 2: ART54.3dsk

65February 2001

3D

3D

Ski

lls

Strategies forlightingIn the second of our two-part series, we take alook at the intricacies of more advanced lightingtechniques, and offer you tips and alternativemethods for illuminating 3D scenes…

he technicalities of lighting can be highly involved, butunderstanding the nature ofeach light type in 3D apps

can help you create better lighting set-ups. Last month we covered some of thegeneral guidelines you need to follow –now we’ll take that a step further.

Like many aspects of 3D programs, thevirtual objects and tools are designed toclosely mirror their real counterparts. Sowe have spot, point and distant lights, aswell as area and tube lights which help

mimic the properties of light in the realworld. But as any experienced 3D artistknows, getting imagery to look right oftenrequires lighting set-ups that would beimpossible to achieve in reality.

The best way to learn is to experiment– you may need to place lights insideobjects, link them to animated objects,bury them in walls or under floors. So fireup your 3D program and get started.

T

Artwork and expertise supplied by SimonDanaher, [e] [email protected] If youmissed any of our previous tutorials, you can find them all in our online archive by heading to [w] www.computerarts.co.uk/tutorials

ART54.3dsk 2/1/01 1:38 pm Page 65

Page 3: ART54.3dsk

Part 1: The anatomy of a ‘spot’ lightSpot lighting is by far the most commonly used light type. Let’s take a more detailed look at some of its properties…

The main property the cone has is its angle.This is the measure of the spread of the light’s

illumination. Most of the time you’ll use spot lightsthat have angles within a 10 to 90-degree range.Here a spot’s been set with an angle of 175 degrees(the limit in Cinema 4D XL 6), where it acts like apoint light with a hemispherical illumination pattern.

This is because, as you can see here, the spotlight casts a cone of light. It’s essentially a

directional, point light source. Because it has thiscone of illumination we can access some of itsparameters and alter the look of the lighting.

Here’s a typical scene that’s been lit by spotlighting. The light, off to the top-left of the

image, casts an elliptical illuminated area on thefloor, and the shadows are also elongated.

Depth maps 1The 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 2Increasing the resolution of

the depth map render can help

to sharpen the edges of depth-

mapped shadows. This will

increase render times and

memory requirements.

66 February 2001

3D

By viewing the scene through the spot lightyou 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 cone angle of a spotlight determines the viewing angle for the depth map render.

Therefore, by previewing the scene through thelight (an option in many applications), you cantroubleshoot problems you may have with depth-mapped shadows. Here’s a typical example – notehow the shadow is fuzzy and indistinct.

The cone of a spotlight has another importanteffect. Depth-mapped shadows can be

calculated from spotlights in most 3D apps. Theseare renders that store the depth information of ascene, in the form of a greyscale image from thelight’s location. Here in ElectricImage you canactually see a shadow map being rendered.

The soft-edged spot appears more natural 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 theway to the centre of the cone. Your 3D app may alsohave a secondary fall-off factor control, to adjust therate of the fall-off at the edges of the cone, usedhere in ElectricImage to create a soft look.

Another property of the cone is the softness 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. Hereare two spot lights, one with a hard edge (inner andouter angles the same) and one with a soft edge(smaller inner angle).

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 lightcloser and/or narrowing the cone angle, the shadowbecomes increasingly sharper, without needlesslyincreasing the depth map resolution.

12

3

4 5

6

7 89

ART54.3dsk 2/1/01 1:38 pm Page 66

Page 4: ART54.3dsk

67February 2001

3D

To make the fall-off more dramatic you can decrease the Maximum Distance setting

and increase the light intensity. As shown here, the light doesn’t even get to the figure’s left hand.Conversely, by increasing the Maximum Distanceand lowering the intensity the fall-off effect willbecome much less noticeable.

You can see in the previous step that althoughthe figure is nice and bright, the floor (much

further away from the light) is dimly lit. Along withthe Inverse Square setting we’ve also set MaximumDistance. This is the point away from the light atwhich its illumination becomes zero. In this case, it’sfour times further from the light than the figure is.

Another aspect – one we touched on last issue – is illumination fall-off. A real light’s

illumination decays by the inverse square of thedistance from it. If at 1m away the light intensity is100, at 2m the intensity becomes 25 (100x1/22),and at 4m it’s 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.

1011 12

Part 2: Selective illuminationYou can choose which lights contribute to which shading property…

In most 3D programs each light will have anoption to disable either its Specular or Diffuse

illumination, which means that you can place special‘highlight’ lights. The purpose is to add Specularreflections only, and not to illuminate the Diffuseportion of the scene.

You may want to add some more lights to ascene 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 canoverexpose the scene.

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 logois lit with two lights – you can see that it’s just aboutadequate, but certainly not great.

1

23

Part 3: Light Exclusion ListsAnd you can also choose which areas are to be affected by extra lights…

Excluding lightsOther applications have similar

Exclusion Lists. In LightWave

you can use the BRDF shader to

exclude lights on a surface-by-

surface basis.

Inverse Square 1The 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 ratesNot all 3D apps support this fall-

off rate, and you’ll find that some

offer alternative rates such as

Linear and Inverse Cubes for

slower or faster decays.

To prevent these four lights affecting the floor,we’ve entered the floor into each of their

Exclusion Lists in ElectricImage. When we rendernow, only the teapot is affected by the extra lights.

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 issomething we don’t really want.

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 witha simple three-light set-up.

1 2 3

ART54.3dsk 2/1/01 1:38 pm Page 67

Page 5: ART54.3dsk

Part 4: Lighting without lightsBizarre as it sounds, you don’t actually need lights for some lighting tasks…

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 extentsof the text and resaved.

To create this effect we used luminosity mapsand 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.

This section of the lighting sign, which youmight recognise from last month’s issue, uses

a special technique for its illumination. This renderactually has no lights at all.

LuminosityLuminosity maps are particularly

useful for creating lit windows in

buildings or for faking radiosity

in interior scenes.

68 February 2001

3D

The orange lozenge was a bit more involved. It has to simulate its own backlighting, but

also receive light spilled from the back of the text.Reflectivity can’t do this on its own, so it was backto Photoshop to construct a luminosity map. Twomaps were made – one for the internal lights, andthe other blurred text for the spill.

The sides of the text were given a reflective,chrome-like material, while the back face

was set to 100 per cent luminosity and movedbackwards slightly so the sides would catch thereflection. A quick render shows that the full effectcan be achieved very quickly.

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 thelettering. Because we cropped the image to thisextent, we could use the Fit to Object command(Automatic Sizing) to make it line up perfectly.

The final effect was applying a glow to each of the materials in varying degrees, to simulate

the glare you’d expect to see from a bright sign. Thefinal image is a powerful combination of lights. ca

The neon arrow was created in exactly thesame way, blurring a luminous render of the

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

These were both applied in the Luminositychannel of a new material. Their relative

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

12 3

4 56

78

9

ART54.3dsk 2/1/01 1:38 pm Page 68