| Tutorial #2 / Natural Lighting

Introduction | The goal of this tutorial is to set up the lighting
for a room which is illuminated by a sunlit window.
I'll show you how to create several bouncelights
in order to achieve a natural lighting appearance.
Please note that this tutorial is for 3DStudio Max,
but it should work for other 3D packages accordingly.

Step 1 | Here is our typical indoor scene: a room with a table
infront of a window. You can downlaod this scene
here: tut-room.zip.

And this is what it looks like when you hit the
renderbutton. Yuck!

rendering | 3DStudioMax default lighting

Step 2 | First of all let's have sunlight shining through
the window. Create a DirectionalTargetLight,
give it light blueish color like the sky and set it
to cast raytraced shadows.

top view | sunlight

front view | sunlight

With a multiplier of 1.2 it should render to such
an image:

rendering | with sunlight

Please take note which parts of the scene are hit
by the light and which parts remain black, because
next we are going to create "bouncelights" for the
illuminated objects in order to fake light which
they reflect back into our room.

Step 3 | We see the pale blue sky in the window and also
the wall, floor and table being hit by sunlight.

Let's begin with some light bouncing off the floor.
Create an OmniLight and place it near or even
inside the floor. Make sure to exclude the floor
from this light and give it the green color of the
floor material. A multiplier of 0.3, which is one
quarter of the sunlight's multiplier value, should be
okay. Adjust the attenuation. Setting attenuation
parameters is very important to achieve a natural
lighting appearance. I suggest using the "Far
Attenuation" spinners for easy handling. Set
FarAttenutionStart=0.0, FarAttenuatioinEnd=600.0,
as this span fairly includes all of the scene.
Make sure to toggle off the "affect specular"
option, we want diffuse bounce lighting only.

As the floor is being hit by sunlight in the top
third sector move the light somewhere into that area.

top view | bouncelight floor

front view | bouncelight floor

With the floor bouncelight the scene renders
like this:

rendering | plus bouncelight floor

Step 4 | Now let's have a bouncelight for the front wall
accounting for light being reflected back into
the room off the front wall. Simply clone the Omni
you created for the floor, but give it the yellow
color of the wall material. It has a multiplier of
0.3, the sun's multiplier value divided by 4, just
to give you a rule of thumb. Remember to exclude
the front wall from this light (do include the floor),
and place it close to or even inside the front wall,
somewhere in the lower third sector, as this is
where the wall is mainly being hit by the direct
sunlight. Make the light cast shadowmaps, bias=0.1,
size=256, smp.range=16 for soft shadows.

top view | bouncelight front wall

front view | bouncelight front wall

The rendering should look quite like this:

rendering | plus bouncelight front wall

Step 5 | Clone yourself another attenuated bouncelight for
the window showing the pale plue sky. The pale sky
sheds quite some light into the room, so assign a
multiplier value of 0.6, which is half of the sun's.
Exclude the window from this light, but do include
the rest of the scene. This light will make nice
shadows: shadowmap bias 0.1, size=256, smp.range=32.
Place the light somewhere in the middle of the window.
As with all other bouncelights, do keep the "affect
specular" switched off.

top view | bouncelight window

front view | bouncelight window

This doesn't look too bad, don't you think?

rendering | plus bouncelight window

Step 6 | Now for next touch: light bouncing off the table.
Once more add or clone an attenuated Omni, exclude
only the table and give it the table's redish color.
Beware and use this red table bouncelight very subtely,
or it will tint your whole scene red quite strongly.
Dim it down to a mutiplier of 0.2, that should be fine.
Place the bouncelight onto the table and render.

top view | bouncelight table

front view | bouncelight table

The rendering now looks like this:

rendering | plus bouncelight table

Step 7 | Okay, we are almost there. To further enhance our
lighting we will add just a few more bouncelights
accounting for the light that has been bounced around
in the previous steps thus now being reflected off
the ceiling and the remaining walls.

Create a bouncelight for the ceiling. Same procedure
as before, with this light having a white color.
Thinking about it, one should perhaps dim down the
multiplier value a bit, as the ceiling is reflecting
only the small amount of light which has already
been bounced around. But then again the ceiling has
got a white color, which might make it more reflective
than the walls. Consider this, when adjusting bounce-
lights in your scenes. For the ceiling let's keep the
bouncelights multiplier value at 0.3, cast shadowmaps
bias=0.1, size=256, smp.range=32.

top view | bouncelight ceiling

front view | bouncelight ceiling

So this is how it looks like now:

rendering | plus bouncelight ceiling

Step 8 | The last bouncelight we are going to create is
the one for the left wall. Yes, there still remain
two walls which will have no bouncelight, but let's
be lazy and not overdo it. Same cloning procedure as
before, yellow wall color for the light, exclude wall,
shadowmaps as before. As this is a secondary bounce-
light we should dim it a bit down to multiplier 0.2.

top view | bouncelight left wall

front view | bouncelight left wall

And here is the next rendering:

rendering | plus bouncelight left wall

Final | Here comes the final touch, the cream on top.
Did you notice the windowframe being a bit dark?
Our bouncelights mainly lit the inside of the
room, but the windowframe, which actually sits
in bright sunlight, didn't recieve much from this.
So let's take care of the window. Make a copy of
the sunlight, deactivate the shadowcasting and
include the window only. Hit the renderbutton.

rendering | final

Congratulations! You made it! Don't you think this
looks good? For the full effect scroll back to the
top of this tutorial and be horrified by the first
rendering ;-)

By the way, this is how the same scene is rendered
with a true radiosity program like Lightscape:

rendering | lightscape

Well, our bouncelights do come close, don't they?

Thank you | For your convenience you can download the lights created
in this tutorial here: tut-lights.zip.

This completes my tutorial on Natural Lighting.
I hope you enjoyed reading it and found it useful, too.

For questions or comments please e-mail me.

(c) 2001 Michael Scholz