Professional Documents
Culture Documents
print version | .blend files
Hello, I'm Marek Skrajnowski (some might know me as Kroni/Kronos from forums) and I've
been using blender as a hobby for about 3 years now. I'd like to share my knowledge about
lighting in Blender Internal using new features in SVN (after v.2.45) - so you should grab an
SVN build from graphicall.org. It's not a beginner's tutorial, you have to know the basics of
Blender's UI and how to get around, as I don't want to make a click-here-click-there tutorial,
instead I've attached all the .blend files used in the tutorial.
This part of the tutorial will cover basic info about lighting in blender, light types and their
properties and usage, Ambient Occlusion, compositing with nodes to speed up the setup. Ok,
enough introduction ;) let's get started...
c
Point Light: hard shadows, soft 2, soft 4
c
Nothing to add really, can be used for all kinds of light bulb based sources.
Attributes:
°Y falloff - how distance affects the energy (inverse squere is the "physically accurate" one)
°Y samples - if 1, light acts as a simple point light, if above 1 it will be a sphere light
°Y soft size - radius of the sphere
Hints:
°Y The custom curve falloff can prove useful if you need a small light source (such as
christmas tree lamps) to light objects relatively far away without overexposure of close
objects.
Spot Light: hard shadows, hard shadows with halo and halo with soft shadows
jcc
Probably the light source with most added features. Very good for animation purposes due to
buffered shadows (I won't cover them here though). Very good for placing a highlight on an
object.
°Y falloff - how distance affects the energy (inverse squere is the "physically accurate" one)
°Y samples - if 1, hard shadows, if above 1 will cast soft shadows
°Y soft size - size of the light source (for soft shadows)
°Y SpotSi - the angle of spot light's beam
°Y SpotBi - controls the blurring of the beam's edge (0 - no blurring, 1 - gradient from the
center to the edge)
°Y Halo - enables volumetric lighting (HaloInt controls the intensity of the lit volume)
Hints:
°Y If you're going for a standard 3 point lighting setup this is your weapon of choice. You
might want to give the fill lights a very soft shadow.
°Y And basically if You don't have to light the whole environment it's best to use spot lights.
Area Light: size 2, size 10
cc
Invaluable for studio lighting and interiors to give very soft shadows and as such are perfect fill
lights. Apart from that they can be used for non-standard light sources such as TV's and various
other displays/screens, some neons. My personal favourite ;)
Hints:
°Y Area lights default settings will always cause overexposure, so first thing you'll want to
do is lowering the distance value to about 1 so you don't have to use tiny fractions as base
energy.
°Y Scaling an area light affects it's energy, so if you need to change it's size use the size
property.
°Y Îamma 0.5 gives good results in general if you're going for physical accuracy.
Blender's AO controls are quite similar to every other light source's properties (energy, samples,
falloff). So I'll focus on the differences.
AO is the tool You will use for sky dome lighting (exteriors) and for faking indirect illumination
(interiors), and for basic fill lighting so You can reveal the whole scene. So as You can see it's a
very simple yet very useful tool.
Hints:
°Y You might want to lower the max distance to about 3-5 (it will of course depend on the
scene scale) for performance
°Y HDRI + AO set to sky texture gives very realistic sky dome lighting so You might want
to consider it while making exterior scenes.
°Y if You want to render a 3d model onto a photo (a car for example) You might want to use
the same photo stretched for the sky and choose sky texture AO, which should give
realistic results.
AO distance 5, distance 1
j
Now something has to be said about skies in general, when what to use. First off I'm talking
about the sky visible to the renderer (reflections/AO mainly) and not the final background for
Your 3D scenes, because these may (and probably will) differ. So basically the choice is
obvious: simple color, gradient or image (also HDR or LDR).
I would say that in general it's good to use a simple gradient for the sky as it's easy to set up and
use, and it should give good results. Let's take a simple clear sky, we can fake it by making a
vertical blend texture and using it as sky (as shown on the screen). Using a gradient is also very
flexible compared to image or plain color, with just changing the gradient a bit You can change
the mood of the scene (time of day for example) or completely change it like I did with a kind of
dark studio setup.
In some cases using a complicated sky is useless... and I don't mean the obvious case when the
sky isn't visible at all ;) eg. interiors, the viewer will only see the sky through windows behind
which You'll probably put a plane with an image of a realistic background so setting the sky to a
simple sky blue color is probably a good choice (or even white to get stronger reflections of the
sky). Using a solid color instead of gradients and images will also make sky based AO less
noisy.
The last option is using an image as background (probably an angular map of the environment).
As everything it has it's good and bad sides.
Îood: combined with AO gives very realistic results,
Bad: image based AO is quite noisy (especially if using HDRI), quite hard to find the perfect
image and probably even harder to set it up right.
Hints:
°Y when using a gradient as sky take into account that the visible horizon isn't exactly at the
center of the gradient, because You can't make an infinite plane (would be a nice small
feature though...)
°Y as i said earlier HDRI based AO is really noisy, because of the color range of a HDRI, so
it's a good solution to tonemap it and save it to a JPÎ, renders wont look the same
because You loose a lot of contrast but the result is much less grainy and still acceptable.
c
Obviously You're not gonna use a single light source for the whole scene, so let's take a quick try
using some light sources to light the example scene. A very common sollution is a clear sky day
illumination, which is quite easy to set up so I'm going to start with it. The first question You
should ask yourself is what generates light in Your scene. In a bright summer day there are 2
basic light sources, the sun and the sky (and a lot of indirect illumination which we'll skip for
now).
j
This is a bit more tricky, but I'm gonna go for a simple and fast solution of using AO with a
blueish color. This way the sky dome will cast very soft lighting and fill the shadows of the sun.
The real problem of the setup is the energy balance between the sun and AO, because we don't
want the scene overexposed, the shadows have to be visible yet quite bright. This part is mostly
trial and error, I always start with a sun lamp energy of 1 and AO at 2 and decrease the values to
get acceptable results. As far as color balance is concerned a fully lit ground plane should be
white, so the yellow color of the sun must be balanced by the blue sky dome. You shouldn't
spend too much time with it because a raw render like that won't look good no matter what You
do, because AO will darken the edges. To get rid of that (or just make the effect less obvious) I
use composition nodes.
°Y gamma - i set it to around 0.5 to brighten the shadows (You loose contrast and saturation
though)
°Y RÎB curve - to fix contrast after gamma mostly and also for color balance
°Y hue/saturation/value - to fix saturation after gamma
°Y brightness/contrast - final touch ;)
X
If You're happy with the result here's Your final render. Sometimes though it's impossible to fix
everything with nodes so You have to get back to the light balance step, refine the lights, maybe
change color a bit, re-render and refine the nodes. Most of the time You should see what's wrong
with the first render, for example if You can't get the right sun shadow brightness without
overlighting the rest You should lower the energy of the sun lamp
I used the spot lamp as the ky light with the same setup as earlier, fill light is a big blueish area
on the left and a bit of ambient occlusion to fill the darkest spots (energy 0.2 so it's barely
visible).
But as You can see it looks far from what's o the header, most of the mood work was done with
Nodes. Simple setup I wrote earlier (gamma,RÎB curves, hsv, brightness/contrast). Most of the
work was done by RÎB curves to play with contrast and colors, all the channels were used to get
it just right.
Before the rgb curve is a standard gamma 0.5 filter to show the darker places, which i'm going to
darken later but using my own rgb curve for good control. HSV wasn't used in this one and
brightness/contrast was used for final contrast adjustment as it's easier to use than rgb curve and
as such is great for such final touches.
That would be all for the first, general lighting part. I hope it was helpful and if You have
comments & feedback I'd love to hear from You, send me a PM at blenderartists (kroni) or email
(m.skrajnowski@gmail.com).
Next parts will be more in-depth and focused as we're moving to specific solutions. First in these
is interior lighting, so prepare for area lights, AO and lots of composite nodes ;)