Blender 3D: Noob to Pro/Lighting Suzanne: Introductory one lamp lighting

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Lighting Suzanne: Introductory one lamp lighting[edit | edit source]

If you have followed all these tutorials you now have quite a library of images: A simple figure with a hat, a penguin, a volcano, a jeep and several goblets, not to mention dice, a head and a house! To show them off to best effect, you need to experiment with lighting.

Lighting is a complex subject, as any photographer can tell you. Blender allows many different arrangements and numbers of lamps to be used in combination to light your image. For this introductory tutorial, let us consider single lamp lighting and do some experiments to see how it works. (In later sections more complicated lighting is covered: Lighting Rigs.)

Suzanne, Our Star[edit | edit source]

We need an object to light. Who better than Blender's favorite resident simian, Suzanne! Open the default startup page. Delete  X  the default cube. Be sure the 3D cursor is at the origin. Add a plane. Add>Mesh>Plane, scale it up nice and large  S  2KEY  0KEY , and in the Properties panel (which by default is the lower right panel) add a material Blender255MaterialContextButton.png color such as light blue that will render well. In that same panel be sure that under SHADOW the Receive box is checked.

Now Add Suzanne, the famous monkey. Add>Mesh>Monkey. Move her up about 1.5 Blender units so she is above the plane but close to it.  G  Z  1KEY  .KEY  5KEY . Rotate her around the Z axis so she is facing the Right View.  R  Z  9KEY  0KEY . Add a material Blender255MaterialContextButton.png color such as red (red is my favorite color).

The default light[edit | edit source]

Default Quad view
First Render

Now lets change to the Quad view, which you should refer to extensively throughout this tutorial. Press  CTRL  ALT  Q  to bring up this view. You now have the TOP, FRONT and RIGHT ORTHO views. In the top right you will see your camera view. Suzanne should be seen in 3/4 profile just above the plane. If not, rotate and scroll in or out until she is. Then I suggest you bring up the object panel  N , scroll down to View and put a check next to Lock Camera To View.

In the outline panel, select Lamp. You will see the default lamp position. In Ortho Quad view, we can see that the default lamp is up, in front of and slightly to the right of Suzanne as she now faces. If you don't see it, scroll out in each view window until the lamp shows up as a point with a double dashed circle around it.

When your screen looks like the screenshot, render for the first time to get a good image of Suzanne and her shadow.

Types of lamps[edit | edit source]

Lamp should still be selected in the Outline panel. In the Properties panel, click the Blender-2.5 lamp radio button.png button to see the properties of the light. The default lamp is a POINT lamp with ENERGY 1.000. Let's experiment with those settings. First, click in turn each of the different kinds of lamp, SUN, SPOT, HEMI and AREA, and render after each one. You can see that each of the light types has its own characteristics. With the light in the default position, your images should look like this:

Comparison of light types.

Point lamp[edit | edit source]

This is the default type. The light rays are assumed to originate in a single point and spread from there. At the default value of ENERGY 1.000 is not very bright and covers a limited area. It casts a good sharp shadow. Point is the basic general purpose lighting in Blender. Advanced lighting rigs will frequently use several point lights with different settings.

Sun[edit | edit source]

The sun is assumed to be infinitly high in the sky so its rays are all parallel. It puts out a bright light and casts heavy shadows. It is the lighting type of choice for outdoor scenes but can also be used to good effect indoor.

Spot[edit | edit source]

The Spot lamp behaves very much like a theatrical spotlight (DUH). It casts a limited circle of light. Within the circle it is bright and casts a heavy shadow, but outside the circle all is dark. (Note: Under the Shadow setting, the Spot lamp is the only one that can cast a Buffer shadow. The distinction is subtle but important in some more advanced applications.)

Hemi[edit | edit source]

The Hemi lamp resembles lights photographers choose for indoor shots. It is the only kind of light that does not cast shadows. It gives a very bright lighting that is relatively even over the entire picture.

Area[edit | edit source]

This light behaves more like a flood light, as if the area is flooded with it. It is extremely bright and casts a very heavy shadow.

Light Energy[edit | edit source]

Each type of light has its own brightness. This is controlled mostly by the ENERGY setting of the light. Obviously less energy reduces the amount of light, more energy increases it. Still in the Properties panel, try different settings for ENERGY and see how it affects the image.

Begin with energy increased to 2.000. Render each type of lamp. We can see that reacts differently to the energy settings. Area is almost too bright at Energy 2.000, while Point and Spot are just reaching nice bright levels. Sun is ... Sun. Remember that it is infinitely far away and its rays are parallel. Little changes with the Sun. Now reduce energy to 0.300 and render each type of lamp. Point and spot at these settings are way too dim, while Area becomes a very useable setting.

Lighting varying energy settings

Distance and Height[edit | edit source]

The distance of the lamp also affects brightness and its position affects several things, particularly including the shadows. In the quad view, grab the default lamp and raise it up quite high, say to Z=25. The light falls off with distance, so point becomes very dark. The spot area increases with distance so the circle in the spot example is now quite large. The Sun ... well, the sun was infinitely far away already, remember? The shadow cast by the sun does not change, and hemi still casts no shadow. But the shadow cast by the other three lights moves considerably and is now almost directly under Suzanne.

Lower the lamp to Z=3, placing it almost directly at a level with the subject. Both the distance and the angle of light change. The brightness increases, the size of the spot circle shrinks, and now the shadow is long and far behind the subject, except, of course, for the Sun which remains infinitely far away and casts parallel rays.

Effects of height on lighting

Rotation[edit | edit source]

Effects of Rotation on lighting

The last setting we will consider in this lesson is Rotation. The Point light cannot be rotated since it is equal in all directions. Each of the others reacts differently to being rotated.

The Sun finally shows a different effect when rotated. I am not sure how Blender interprets the difference between location and rotation for the Sun. It seems rather counter intuitive. The sun when rotated seems to me to behave as if it has been moved. But in any case you can see that the shadow and the lighting show a distinct difference.

The Spot behaves very much like a real spotlight. Its circle of light moves with the rotation and frames whatever it is pointed at.

The Hemi lamp also finally shows a bit of difference. Even pointing it entirely way from the subject still lets light leak through it and give that same shadowless flat lighting.

The Area lamp has its characteristic brightness over a large field, and then suddenly cuts off in to total blackness. The contrast is very striking.

Experiment![edit | edit source]

You can experiment with other placements of the light, and see the effects on the illumination and the shadow. There is an almost infinite variety of ways to light a Blender image, and this is just with a single lamp. Multiple lamp setups increase the variety many fold as will be seen in the Advanced portion of this tutorial.

Note on Transparency[edit | edit source]

Where does that shadow come from?
Plane Shadows set to Receive Transparency

A special case of lighting is transparent objects. What sort of a shadow do transparent objects cast? You can try an experiment. Click on Suzanne to select her. Now in the Material panel Blender255MaterialContextButton.png scroll down to Transparency and put a check in the box. Just below that is the Alpha setting, which controls the amount of transparency, with 1.000 being fully opaque and 0.000 being completely transparent to the point of invisibility. Lets try setting it to 0.200 for an almost glassy effect. Render your view, and then ask yourself, why does this glassy object still cast a thick black shadow in the render?

The answer is not in Suzanne, but in the settings for the plane which is her background. Recall that we checked Receive under shadows for that plane. But go back to the properties panel for the plane, and notice that there is another check box under Shadows that says Receive Transparent. By default, to save rendering time, Blender assumes that all objects block light equally. Only if that box is checked does it make a check for transparency in the object casting the shadow. Now render your view and you will see that the shadow is suitably glassy.

Experiment with this one. Try different types of lamp (Area is so strong that transparent objects effectively disappear) and different values for the alpha setting. You might want to remove the color material from Suzanne and see what effect that has.

Note on World Lighting[edit | edit source]

It is not absolutely necessary to use any lamp source. In the World panel Blender255WorldContextButton.png you will find several lighting settings that simply produce light throughout the scene without any particular source. Experiment with Environment Lighting and Indirect Lighting and see the effects they produce.