Illuminating a Scene

Exclusive offer: get 50% off this eBook here
Building 3D Models with modo 701

Building 3D Models with modo 701 — Save 50%

Learn the art of next generation 3D content creation with step-by-step instructions from a real-world pro with this book and ebook

$26.99    $13.50
by Juan Jiménez García | October 2013 | Games Open Source

This article by Juan Jimenez Garcia, the author of Building 3D Models with modo 701, covers the main aspects of illuminating a scene. You will learn the different types of light, and how/when to use them, along with some tips to get a good illumination according to your scene.

Our main concerns will be the following:

  • Working with lights
  • Types of light
  • Illuminating a scene
  • Tips on lighting

(For more resources related to this topic, see here.)

Working with lights

Before starting to explain about lights, we need to learn how to create and manipulate them. Once you know how to handle them, you will be ready to start learning the who-is-who in the lightning stage. Let's start with the basics.

Adding a light

Lights are handled in modo just like regular items. You can move, rotate, and scale them, and of course, tweak their properties.

By default, a newly created scene has got a default light already. You can use it, change its type, or add as many as you need. In order to add a new light you should go to the Item List tab, and then click on the Add Item button. In the drop-down menu go to Lights, then choose the type of light you want.

The other way to do this is by using the top menu. Navigate to Item | Create Light and choose the type you want.

Setting the type of a light

You can always change the type of the light just created (or change an existent light). In the Item List tab, right-click the light you want to change, and from the menu click on Change Type, then choose the type you want for your light.

Placing lights

As said previously, lights are like all other regular items. So you can move, rotate, and scale them as you need. You will have the following two ways of placing a light:

  • Direct manipulation: Working in item mode, click on the light on any of the viewports—or directly in the Item List tab— and use the corresponding tools (W for moving, R for scaling, or Y for rotating).
  • Subjective manipulation: A more interesting and practical way to move a light is by changing the viewport to light view mode. Once you change it, your view will be literally inside the light, so the direction you are facing will be the direction of the light. In this view, use your standard viewport controls to orientate the light.

Enabling/disabling lights

Usually, there are occasions when you need to turn off a light, or a number of them. The first thought would be turning its intensity value to zero, but there is a more practical way to temporarily disable a light.

If you take a look at the items list, you will see a column on the left of the panel showing a little eye icon. That column shows the visibility state of each item. The eye means that it's visible, and you can click on that icon to totally disable the light (or any item, in fact), and click on it again to enable it back.

Of course you can do rest of the basic operations with the lights, as with other kinds of items including enabling/disabling them, grouping them in a single folder, and so on.

Building 3D Models with modo 701 Learn the art of next generation 3D content creation with step-by-step instructions from a real-world pro with this book and ebook
Published: October 2013
eBook Price: $26.99
Book Price: $44.99
See more
Select your format and quantity:

Types of light

Now that you know the basic operations you can do with the lights and how to handle them, let's take a look at the different kinds of lights you can work with. This will not be an in-depth guide of each type, but a recommended list of what types of lights will be more useful to you in order to work in a real scene, along with some recommendations about when and how to use each of them.

Spot Light

A Spot Light works as a torch, meaning the light coming from it travels in the shape of a cone. This kind of light will light everything that comes inside the cone, leaving the rest unlit.

It's got its own properties panel—as with every item in modo—where you can tweak various aspects. The panel for Spot Light looks like the following screenshot:

There are plenty of options, but for a beginner, you should look at the following basic settings:

  • Radiant Intensity: This is the power of the light source. The greater the intensity, the more powerful will be the light.
  • Cone Angle: This controls how big the base of the cone is. With a low number, you will get a narrow lit area, while it gets bigger as you raise this value.
  • Soft Edge: Leave it set to zero if you want totally sharp edges of the lit area. Increase it to make that area blurry.
  • Volumetrics: Enable the Volumetrics checkbox to get a nice "God's rays" effect, as if you were casting light through fog. You can then tweak the height value to make the effect more or less strong.

The following figure will show you how different settings create different effects:

From left to right:

  • Wide cone angle, soft edges
  • Narrow cone angle, hard edges
  • Volumetrics enabled

Point light

Point lights act as bulbs. Think of them as spheres casting light in all directions. Due to their own nature, they cannot be oriented in any way, only positioned. You will recognize them by the particular shape of the shadows they generate. Look at the following figure:

I have put a point light in the center of a group of teapots. It casts light to all directions, so the shadows all converge to the same point, where the light is. The use of it will be, obviously, creating light bulbs.

The settings available for this kind of lights is the same as that for the Spot Lights (of course, no cone angle, fuzzy edges, and so on). You can tweak its intensity, color, and Volumetrics in the same way.

Area light

Area lights are a bit more advanced lights. They can generate what we call diffuse lightning . This means they generate shadows that soften in a very natural way, making them perfect to mimic indirect light, avoiding that sharp look from the rest of the light.

They are square-shaped panels that emit light. So you can control the size of the panel to make them cover a larger area.

The following figure shows the nice shadow effect you can generate with these kind of lights:

The area lights are a perfect solution to place in a window, if you want to simulate indirect light coming from outside. It's important to take a look at one important property of it, which is samples.

The samples value controls the quality of the light. The fewer the samples, the more noisy will be the shadows. If you increase the samples, you will get finer and cleaner shadows, but it will take more time to render. Find the right balance for your scene. The following figure shows the difference:

The figure on the left was rendered with a value of 5 samples. It took 4 seconds. That's fast, but with a very noisy result.

The figure on the right shows a value of 500 samples, so it's got really fine shadows, but it took 20 seconds to render. That's 5 times slower. The general advice is that you increase your samples till you don't get visible noise in the render.

Cylinder light

I personally love cylinder lights. These kind of lights emit a very particular illumination, making them really useful to mimic fluorescent tubes.

We could say that cylinder lights are an area version of the point lights in some way. They are shaped like a tube, so they cast light from a cylinder in all directions. The effect will be like placing a point light, but emitting diffuse lightning.

In the following figure, there is a cylinder light placed in the center of the teapots group. See how the shadows converge like with a point light, but with that soft and nice shading of the area light.

As for the area lights, you can control the amount of samples to balance the result correctly. Remember, more samples means finer shadows, but a longer render time.

Portals

When dealing with interior scenes, portals are a great tool to help the light do its work more efficiently.

In short, a portal is a photon magnet. This means that, what a portal does, is that it attracts the greatest amount of light possible around it, and casts it through itself in one direction. The following figure shows how you can benefit from a portal, using the scene in the previous figure:

I have rendered the same scene at a very low quality, so you can see the differences. The top figure shows the result of opening a hole in a wall (as if it were a window) and allowing the outside light to come into the room. You can notice how noisy the result is. That's because it's very hard for the light to reach the interior of the room. And this is when portals show their potential.

In the bottom figure, I have placed a portal in the window. With the exact settings, you can see how the results are way better, even at a low sample setup. The portal is attracting the outside light and casting it directly into the room. That's how you can benefit from the portals in a practical situation.

You may think about the differences between using a portal and using an area light. Why don't you just put an area light to make that work? The answer is about effectiveness.

If you use an area light, you will have to set up an intensity value for it, and also a color to make it match the outside light. On the other hand, portals are automatic. So, you place a portal, and automatically it will get the same intensity and color of the outside. Just place it, and let it do its work. An area light will do the same thing, but you will have to set it up, so portals will ease your life, as compared to area lights.

Building 3D Models with modo 701 Learn the art of next generation 3D content creation with step-by-step instructions from a real-world pro with this book and ebook
Published: October 2013
eBook Price: $26.99
Book Price: $44.99
See more
Select your format and quantity:

Illuminating a scene

Knowing the different kind of lights, now we are able to decide which kind of lights we will need, depending on whether we want to simulate indirect light from the outside, a light bulb in the ceiling, a fluorescent in the wall, and so on.

Once you have placed your lights in the proper position, and adjusted their intensity and color, you will want to have a clear idea of what your render will look like. Years ago, this task was very tedious and time consuming, but now we have the option of having a low quality render, that you can use as a preview of the final image in real time. Let´s take a look at the different options available to use the preview window.

Working with previews

Inside modo, you have what we call a Preview window, which is a floating window, showing your render in a very fast way, without the need to render the entire scene with full quality, thus saving a substantial amount of time.

Have in mind that the Preview window will show the result of the camera view, so you will have to first place the camera, then launch the Preview window. It is available from the Render | Open preview render, or by pressing F8 on your keyboard.

You can keep your Preview window open while working, so if you move your camera, change something in the scene, move objects, and so on, it will be reflected in the preview, giving a constant real-time approach of what your final render will look like.

Preview modes

In the upper-left corner of the Preview window you will see a button called Options. If you click on it, a drop-down menu will appear with many options you can choose to set up the preview. We will focus on two of the options, Quality and Full Resolution.

Quality

This sets the quality of the preview. The higher the quality, the more precise the preview will be, but slower. You can choose the following three different levels:

  • Draft Quality: This shows a preview with a very little quality. This is not suitable as an approach to the final render, but it's fine to check light intensities, general setup, and so on.
  • Final Render Quality: This makes a preview with the settings stated for your scene. The preview will show the same quality of the final render, but it's still not suitable as a final render itself.
  • Extended Refinement Passes: This one is a bit more advanced preview mode. What it does, is calculate pass after pass, to refine the image more and more, even over passing the settings on your scene. It will continue refining the preview forever, until you stop it. This mode is suitable for a final render. Just launch an Extended preview, and let it work. Eventually it will reach a level of refinement suitable to use as a final image.

Full Resolution

The Full Resolution option must be checked if you want your preview the same size as your final render. If it's not checked, the preview will be resized to fit the area of the Preview window. It's good to have it enabled if you want to use an Extended preview as a final render.

The RayGL view

There is a second option to have a preview of your scene. It´s a bit different than the Preview window, since it shows it directly into the visor, regardless of the view you're using, so you will not have to use the camera view if you don't want to.

The RayGL view also shows the preview preserving the wireframe view, so you will be able to check the shading and illumination of your scene, and the topology of it at the same time, but always with a very low quality.

You have the following two options for it:

  • Fast: The preview will show just a basic approach of the render. Basically just lights and shadows, so you can have a quick look at the overall setup.
  • Full: The preview shows everything, including indirect lights, and all the extended features.

To enable it, click on the Ray GL button located in the upper-left corner of every visor. In the drop-down menu, choose the option you want for it (Full or Fast).

Cool and warm

We will now focus on the principles of colors of light. Choosing the color of a light is always important, since they will give us different kind of moods in the scene, and will re-create different kind of light sources, depending if we're working with sunlight, fluorescent, incandescent, and so on.

First of all you need to know how to change the color of a light. As for every other item, the lights have their own properties panel where you can control all the values available. In the Shading panel, Item List tab, you can click on the light you want to change, then in the properties panel, go to the Texture layer tab where you will see a clickable field labeled as Color. Click on that field, and you will see a panel like the one shown in the preceding screenshot.

Inside that panel you can choose between three different kind of color modes. Since we are working with colors of light, we must choose the Kelvin mode, which is a color picker based on the light's temperature.

So, how do we choose the right color? The Kelvin color picker shows only a gradation from red to blue. And that's the only option available for this palette. Lights can be warm (more reddish), or can be cool (more bluish). My advice is that you use a Kelvin table to decide the color of your light, depending on its nature. There are plenty of Kelvin tables available online. The following figure shows one of them, taken from http://university.maxlite.com:

As you see, it's easy to choose the correct Kelvin value for your light, if you know what kind of light it will be. Also, you don't have to eyeball the color on your palette, of course. Just fill the Kelvin field with the number indicated and it's done.

Having some color variation in the lights is always a good advice to enrich the look of your scene.

Key lights

When lightning a scene, it is important to know some rules about positioning the lights for the shot. Different colors will give you different moods, and the positioning will contribute the scene, revealing details or making it more interesting. We will now discuss a classical three point lightning, which will make you understand the basics of using lights. So, let's begin with the key light.

What you see in the preceding figure is an object taken from the presets library, and a standard studio background. The illumination here is very basic, since there is only one light in the scene.

I chose an area light to use it as key light, because of its diffuse nature, casting very soft shadows and also giving an interesting shading of the volumes.

The mission of the key light is to point directly at the object you want to light, showing its general shape and volume, so it's better to set a white color to it, so it shows the object in a neutral way.

So, now that we have our key light, let's move on to the next stage.

Fill lights

The next step will be setting the fill lights. Once the key light is done, there are usually areas that are not covered, typically behind the object. That causes it to blend somehow with the background, losing the silhouette of it, and in some way making it to look not well defined.

That's the point of creating fill lights, while not contributing directly to the shading of the object, they in fact state a separation between the object and the background, adding information to the image, and giving it a deeper look.

I also gave it a warm color to give it a more pleasant background.

Contours

This third stage of the illumination is a very interesting phase. In the previous stages, I have put soft lights to get a nice pleasant atmosphere. Now we're going to go in the opposite direction.

What you see in the previous figure is a typical setup of two lights enhancing the contour of the object. I chose spot lights to give it a sharper look, contrasting with the softness of the rest of the lights. They are placed behind and pointing to the object, each one of different temperature, to get a richer variation in the general mood. These lights will help to define the object even more, and also give a nice variation in the general softness, which is usually something that pleases the viewer.

Now that we have seen the light setup independently for each light, the following figure shows you the final result, when combining all the lights involved:

And here you have a classical three point light setup, with its key light, fill light, and contours applied. Notice the richness that the shot shows, well lit frontally, with a nice warm background, subtle but visible, and two different contours, cool and warm, giving it a nice variation in the shading, and a very interesting look.

This applies to situations when you need to light an object, for example, in a typical studio shot.

Summary

At the end of this article, you should have learned all the different types of lights you can use as the raw material for lighting.

Resources for Article:


Further resources on this subject:


About the Author :


Juan Jiménez García

Juan Jiménez García started to doodle with 3D software back in 2004, with Lightwave 6. He then started to specialize in modeling, specially hard surface modeling, such as cars, furniture, all kinds of machines and engineering related stuff, and so on. He joined a small broadcasting company in his town, as a camera operator, and in charge of all CG imagery. He also started to explore CG for architectural works. In his spare time, he joined forces with some video game modding groups dedicated to driving simulations, modeling several racing cars for games such as Rfactor and Nascar Racing.

Once he left that company during the middle of 2012, he started to try to make himself visible in the field of interior design, offering visualization services for interior designers. He then opened his own webpage www.factor3d.com, and brand named Factor3D, which he still develops in the market of CG visualization for several customers in his area, conducting live workshops, and giving private formation with the help of some old work companions, launching a formation center in his town to promote the use of modo.

Books From Packt


Blender 3D Basics
Blender 3D Basics

Cinema 4D R13 Cookbook
Cinema 4D R13 Cookbook

OGRE 3D 1.7 Beginner's Guide
OGRE 3D 1.7 Beginner's Guide

Cinema 4D Beginner's Guide
Cinema 4D Beginner's Guide

OGRE 3D 1.7 Application Development Cookbook
OGRE 3D 1.7 Application Development Cookbook

Microsoft XNA 4.0 Game Development Cookbook
Microsoft XNA 4.0 Game Development Cookbook

3D Game Development with Microsoft Silverlight 3: Beginner's Guide
3D Game Development with Microsoft Silverlight 3: Beginner's Guide

Away3D 3.6 Essentials
Away3D 3.6 Essentials


No votes yet

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
8
M
n
F
1
q
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software