Académique Documents
Professionnel Documents
Culture Documents
Page 1 of 5
I. Basics
standard version | .blend files
Introduction
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. I've divided this tutorial into 5 parts I'd like to cover: 1. Basics 2. Interior Lighting 3. Exterior Lighting 4. Studio Lighting 5. Car Studio 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...
Lamp Types
Lamp - point/sphere light Nothing to add really, can be used for all kinds of light bulb based sources. Point Light: hard shadows, soft 2, soft 4
Attributes: falloff - how distance affects the energy (inverse squere is the "physically accurate" one) samples - if 1, light acts as a simple point light, if above 1 it will be a sphere light soft size - radius of the sphere Hints: 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.
Sun light Simulates direct lighting of the sun and can't be used for anything else really. It lits the whole scene evenly, so only the lamp's direction counts (can be placed anywhere in the scene)
Attributes - similar to point light: samples - if 1, throws hard shadows, above 1 will cast blurred shadows soft size - sun size
Spot Lamp/Light 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.
Spot Light: hard shadows, hard shadows with halo and halo with soft shadows
Attributes (raytraced shadows only): falloff - how distance affects the energy (inverse squere is the "physically accurate" one) samples - if 1, hard shadows, if above 1 will cast soft shadows soft size - size of the light source (for soft shadows) SpotSi - the angle of spot light's beam SpotBi - controls the blurring of the beam's edge (0 - no blurring, 1 - gradient from the center to the edge) Halo - enables volumetric lighting (HaloInt controls the intensity of the lit volume)
file:///C:/Users/kmlim/AppData/Local/Temp/L6COJ2L5.htm
15-Dec-13
Page 2 of 5
Hints: 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. And basically if You don't have to light the whole environment it's best to use spot lights.
Area Lamp/Light 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 ;)
Attributes (raytraced shadows only): Hints: 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. Scaling an area light affects it's energy, so if you need to change it's size use the size property. Gamma 0.5 gives good results in general if you're going for physical accuracy. shape - rectangle / square size (X/Y) - dimensions of the area light gamma - similar to falloff in other light sources samples (X/Y) - if 1, acts like a simple point lamp, if above 1 will be an area light
Ambient Occlusion
Ambient Occlusion is the most basic (yet really powerful) way of faking indirect illumination. It uses the distance between objects to brighten or darken the scene (the longer the distance from surrounding faces the more an object is illuminated). This means it doesn't depend on the lights setup of the scene at all and as such wont give realistic results by itself, but it's good enough to get satisfying results. Because of that it's widely used in animations, it's faster than most Global Illumination algorithms such as Photon Mapping or Path Tracing. Recently an even faster algorithm for AO has been added to Blender called Approximate Ambient Occlusion, which doesnt use raytracing for finding distances and produces no noise, which makes it perfect for animations, where lighting precission isn't as crucial as in stills. Blender's AO controls are quite similar to every other light source's properties (energy, samples, falloff). So I'll focus on the differences. max distance - maximum shading distance, lenght of the shadow falloff - controls the gradient of the shadow, when off gradient is exactly linear, higher strength values will cause the shadow to brighten quicker with distance (similar effect: choosing inverse square for lamps falloff) add/sub/both - controls how AO is applied to the image, both means that it'll subtract under and add over 50% AO intensity. plain/sky color/sky texture - controls the color of the AO illumination (plain = white) 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: You might want to lower the max distance to about 3-5 (it will of course depend on the scene scale) for performance HDRI + AO set to sky texture gives very realistic sky dome lighting so You might want to consider it while making exterior scenes. 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
file:///C:/Users/kmlim/AppData/Local/Temp/L6COJ2L5.htm
15-Dec-13
Page 3 of 5
Sky
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. Good: 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. I would say that images are good in 2 cases: if You want to fit a 3d model into a 2d image of the environment if You're whole scene is the object You want to show Hints: 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...) 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 JPG, renders wont look the same because You loose a lot of contrast but the result is much less grainy and still acceptable.
file:///C:/Users/kmlim/AppData/Local/Temp/L6COJ2L5.htm
15-Dec-13
Page 4 of 5
Finishing touches 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
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,RGB curves, hsv, brightness/contrast). Most of the work was done by RGB curves to play with contrast and colors, all the channels were used to get it just right.
file:///C:/Users/kmlim/AppData/Local/Temp/L6COJ2L5.htm
15-Dec-13
Page 5 of 5
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. Base Render, Gamma, Gamma+RGB Curves, Final
file:///C:/Users/kmlim/AppData/Local/Temp/L6COJ2L5.htm
15-Dec-13