|

Simulating Real
Lighting using a Parametric Light Setup
While there are many different ways to create realistic lighting setups
using raytraced solutions, these techniques are very slow to render and
for real-world animation productions such render overheads are
prohibitive. This tutorial overviews how comparable lighting setups can be
created using the simplest of lights in maya.
In analysing real world lighting you should ask yourself the following
questions;
For Key Lights 1) What are the Key Lights? (the
sun, atmospheric reflection/scattering of the sun, artificial lights
etc...) 2) What is the nature of the key lights (directional, point,
spot) 3) What is the position and orientation of the key lights 4)
What are the qualities of the key lights (direct unfiltered, sun or open
lamp, indirect filtered light: through a diffuser, clouds, lampshade
etc) 5) What is the colour/temperature of the key (remembering that
colour and temperature are interrelated). 6) What is the key
Intensity 7) Are the shadows soft or hard
For secondary Lights and Fills: The same points should
be noted as above. The secondary lights are not so crucial to the mood and
context of the scene: but these details are where the realism creep
in.
For Bounced Light: 1) Where is the centre
of energy/origin of light that will be bounced? 2) What is the colour
of the surface that light is being bounced off of? 3) What is the
nature of the bounced light (normally fairly diffused scattered light that
casts very soft if any shadows)
The following is a step by step analysis and synthesis of several
different lighting scenarios
Scenario 1: An Incandescent Lamp
 |
n this scene we have a roof, two walls and a
floor with an omnidirecitonal light on the roof to simulate a
typical lighting setup of a room having an incandescent light globe
on toward the roof.
Rendering this scene we can now see that the
distribution of light is not at all typical of a light globe.
The light cast on to the roof is minimal and the light on the floor
and roof is much too great given their distance from the light.
An artificial light source usually follows and
inverse square rule. |
Intensity of illumination of the light source decreases
exponentially with its distance from the light source.
The roof should be very bright (distance = 1)
ie 100% illumination
At the bottom (distance = 9) the light should be considerably duller
ie 1% illumination
 |
We can adjust this by making the decay
rate of the point light Quadratic and adjusting its intensity
accordingly (~35).
Also lets make the light a more yellowish to
make it look more like a real light
Dealing with Radiosity.
In real lighting situations we will have some
of the light that hits each surface be bounced off and add to the
overall room illumination.Note: the bounced light is the unabsorbed
light from the light from the key light hitting the surface, so it
should be the same colour as that of the surface (after all light
absorption is what gives things colours in the first
place). |
Note also that bounced light won’t create specular hightlights so it is
best to make the spots emit diffuse only.
The most simple solution to create this light bouncing would be to
create a light source having the correct bounce colour and place it under
the strongest point of illumination. The images below show the
positioning and penumbra setup for the blue bouncelight. The colour
is the same blue as the floor and the intensity it 0.2
| |
|
|
|
|
|
|
|
(a) Fill from Floor Bounce |
(b) Blue Bounce combined with Key light |
(c) Extra two bounce lights from opposing
walls |
Now we just have to
repeat this lighting setup for the remaining sources of bounced
light (the two side walls) and our bounced light setup is complete.
Note that because the hotspot of the wall bounce is higher up the
wall the bounce lights will also have to be higher up on the wall.
As a final touch, create a sphere and position
it over the key incandescent light, and scale it to suit.
Create a shader for it that has the same colour as the key light,
and a 50% grey incandescence as well as a 0.5 glow. Apply the shader
to the sphere and you should get the following.
You will of course have to add other bounce
lights if your scene had more walls. |


|
Scenario 2: Light from a window. Using Area Lights for
light bouncing
This scene is the same as the previous scene only that the source of
light is different. We have an external light source (probably
through a window) casting light into our scene. As there are no
other lights in our scene all the other geometry appears black.
The rest of the scene will be illuminated by bounced light. The
problem is that the concentration of light on the floor isn’t the same as
for the previous example. So a spot light, whilst it would do some
of the job, it wouldn’t capture the nature of light scattering from the
square hotspot. Even if we include the exponential dropoff the
effect still isn’t convincing.
|
|
|
|
|
(a) Light from outside |
(b) bounced light from a spot light
source. |
(c) bounced light from a spot using
exponential decay |
|
Alternatively we can use an area light.
Area lights create a softer more scattered light than spot
lights. Create an area light and position/scale it to the
hotspot. Have it facing the roof. You should get the
following rendering.

|
 |
The light is a bit intense so adjust the intensity of the area light to
your taste.
Now we just need to account for the bouncing of the bounced light and
our scene is about finished. This can be taken care with using three
extra spot lights positioned as we did for our first example.
 |

Roof Secondary Bounce
Intensity = 0.3
Colour - White (like the roof)
Wide penumbra
|
 |

Back Wall Secondary Bounce
Intensity = 0.3
Colour - White (like the roof)
Wide penumbra
|
 |

Side Wall Secondary Bounce
Intensity = 0.3
Colour - White (like the roof)
Wide penumbra
|
And that gives you a fairly good approximation!
Rendering note: this solution takes 1 second to render… To
achieve the same illumination results using a photon tracing solution may
take up 30 times longer!
Scenario 3: Textured Floors.
What would we do if there were say a rug on the floor of our room in
the previous example? Here we are faced with a more complex problem
of light bouncing.
 |
 |
| |
|
|
Unfortunately we can’t get away with the simple
solution of a straight colour for an area light. We need to
bake the light from the floor into an area light.
To do this we first need to bake the lighting
(and shadows if there were any) into our floor plane.
Select all the surfaces except the ground plane
and turn their primary visibility off
Windows > General Editors > Attribute
Spreadsheet
Render Tab > Primary Visibility – Turn to
off (enter 0 for all the surfaces)
Now change the render globals to render a
256x256 image and then render from the top viewport. Save this
image as RugAreaLight.iff
Turn the primary visibility back on for the
surfaces.
Now we are going to recreate a similar area
light as before only have it cover the entire floor space.
In the attribute editor, click on the colour
swatch and choose a file texture. Load the RugAreaLight.iff
file and render.

The result isn’t that fabulous. We need
to introduce a little trick. Select the area light and change
its scale in Z to –2 and re-render. Now its too bright, so
change the decay rate to quadratic and the primary bounce is looking
nice. |
 256x256
Image rendered from top viewport

|
| |
|
|
 |
 |
 |
(a) No scaling
|
(b) Scale Z = -2 |
(c) Quadratic Decay rate. |
| |
|
|
We can now repeat the process we saw in the prior two examples to
introduce the secondary fills to the scene (noting that the secondary
fills will again be of the same colour as the walls they hit).


|