Search form

'Poser 8 Revealed': Adding Scene Lighting - Part 2

Kelly L. Murdock talks about enable shadows and ambient occlusion from Poser 8 Revealed.

Buy Poser 8 Revealed by Kelly Murdock here!

ENABLE SHADOWS AND AMBIENT OCCLUSION

Within the Properties palette for lights are two options for enabling shadows and ambient occlusion. Shadows can add a lot to the realism of the scene and learning the various shadowing options will give you better control over how shadows appear in the scene. Ambient occlusion is a render property that can simulate the dark corners of objects that are surrounded by walls and other objects.

Enabling Shadows

Shadows are computed when the scene is rendered and two methods exist for creating shadows[md]ray trace and depth map. Raytrace shadows have a sharp edge and are much more realistic because they are created by following each light ray as it bounces about the scene, but the drawback is that they can take a considerable amount of time to render. Depth-map shadows are blurrier, but they can be rendered very quickly.

Raytrace shadows will be rendered only if the Ray Tracing option is enabled in the Render Settings dialog box.

[Figure 7-10] Shadows can be blurred.

Blurring Shadows

You can set the amount of blur that a shadow has using the Shadow Blur Radius setting. The Shadow Min Bias setting prevents the scene objects from casting shadows on themselves. Another way to think about the Bias setting is that it defines the accuracy of the shadows where low values (usually less than 1) have better results. However, extremely low Bias values can create lighting anomalies to object shadows. Lower Bias values also require longer render times. Figure 7-10 shows two rendered images side by side in the Render panel with Shadow Map shadows with different Blur Radius settings. Notice how the left half of the figure has a blurry shadow and the right half is clean.

If you select to use Raytrace shadows, don’t set the Bias value to 0.

If multiple lights are included in a scene, only enable shadows for one light in the scene.

Reusing Shadow Maps

If you select the Depth Map Shadows option, the Shadow Map is computed the first time you render the scene, but the shadow map is automatically saved and reused on subsequent renders to save time. To have Poser reuse the computed shadow map, enable the Render, Reuse Shadow Maps menu option.

To force Poser to render the shadow maps again, select Render, Clear Shadow Maps. Shadow maps should be re-rendered whenever the scene objects move or if the lights move or change parameters.

When a light object is selected, the Parameters palette includes a Map Size value, which sets the size in pixels of the computed shadow map. Larger shadow maps take up more memory, but have a finer resolution.

[Figure 7-11] Ambient occlusion

Enabling Ambient Occlusion

Ambient light, as specified for the various surfaces in the Material Room, is a general lighting that lights all scene objects without radiating from a particular source. It occurs naturally by light that bounces off the surfaces of objects. Ambient light in particular affects shadows. Ambient occlusion is an effect that diminishes ambient light from the scene, thus causing shadows to appear darker and providing more contrast for the rendered image. When an object is surrounded by walls or other objects, the amount of light that can bounce about the object is reduced, causing more shadows to appear in areas close to the obscured area. Figure 7-11 shows a figure rendered with and without ambient occlusion.

Ambient occlusion will be rendered only if the Ray Tracing option is enabled in the Render Settings dialog box.

[Figure 7-12] Scene Ambient Occlusion Options dialog box

The Strength value sets how dark the ambient shadows are in the scene. In addition to the Strength value, you can open the Scene Ambient Occlusion Options dialog box, shown in Figure 7-12, using the Scene Ambient Occlusion Options button in the Properties palette. This dialog box includes three additional values[md]Max Distance, which defines the distance that raytraced rays are allowed to travel; Bias, which defines where the light rays originate from; and Number of Samples, which determines how many light rays are cast into the scene. Generally, the Max Distance value sets how large the cast shadows are. If this value gets too big, then all objects could be shadowed. Increasing the Number of Samples will make the shadows shaper and less blurry.

Using high Max Distance or Number Samples values can result in a very long rendering time.

[Figure 7-13] Rendered figure with shadow

Enable Shadows 1.         Open Poser with the default man visible.

2.         Select Lights, Light 1 from the Actor List at the top of the Document Window.

3.         Select Window, Parameter Dials to open the Parameters/Properties palette, if it isn’t already open. Click the Properties tab and disable the Shadows option to turn off shadows for this light. Repeat this step for Light 3.

4.         Select Light 2 and enable the Shadows option in the Properties palette. Then select the Depth Map Shadows option and set the Shadow Blur Radius to 5.0.

5.         Click the Render button in the Document Window.

The scene is rendered and the rendered image is displayed in the Document Window with shadows, as shown in Figure 7-13.

6.         Select File, Save As and save the file as Figure with shadow.pz3.

[Figure 7-14] Ambient occlusion shows shadows around objects close to each other.

Enable Ambient Occlusion 1.         Open the Sitting at table.pz3 file from the Chap 07 folder.

2.         Select each of the lights in turn in the Actor List and disable the Shadow option in the Properties palette.

3.         Select Light 2 and enable the Ambient Occlusion option. Set the Strength value to 2.5.

4.         Select the Render, Render Settings menu command to open the Render Settings dialog box. Select the Manual Settings option and enable the Raytracing option. Then click the Save Settings button at the bottom of the dialog box.

5.         Click the Render button in the Document Window.

The scene is rendered and the rendered image is displayed in the Document Window, as shown in Figure 7-14.

6.         Select File, Save As and save the file as Sitting at table-ambient occlusion.pz3.

[Figure 7-15] Light material values

PROJECT A TEXTURED LIGHT

If you look closely at the Properties palette when a light is selected, you’ll notice that there is a button labeled Advanced Material Properties. Clicking this button opens the Advanced panel in the Material Room with the selected light’s nodes visible. Although you can set a light’s color and intensity in the Light Controls, the Material Room offers many more options for controlling the look of a light. The material room advanced options are covered in Chapter 8, “Creating and Applying Materials.”

Accessing Light Material Properties

If you select a light from the Actor List in the Material Room, you can view a node listing all the light’s material values in the Advanced panel of the Shader Window, as shown in Figure 7-15.

[Figure 7-16] Light projected image

[Figure 7-17] Results of a light projected image

Projecting a Textured Light

If you change a light’s color, the entire scene is affected by the light color and the light color is mixed with any diffuse surface colors, but using the light material values, you can also have the light project a texture. This effect is like shining a light through a semi-transparent image. To create such an effect, simply add a texture to the Color channel of the light material. You can do this in either the Simple or Advanced panels of the Material Room. Figure 7-16 shows a texture image added to a light in the Simple panel of the Material Room.

Figure 7-17 shows the resulting rendered image. Notice how the light areas of the texture show through like a normal light and the dark areas block the light.

[Figure 7-18] Projected texture light

Project a Textured Light 1.         Open Poser with the default man visible.

2.         Select Lights, Light 2 from the Actor List at the top of the Document Window.

3.         Select Window, Parameter Dials to open the Parameters/Properties palette, if it isn’t already open. Click the Diffuse IBL option to make the selected light an image-based light.

4.         With the Light 2 object still selected, click the Material tab to open the Material Room.

5.         Select the Simple tab in the Shader Window and click the image area under the color swatch. In the Texture Manager that opens, click the Browse button and load the Banana Husk.tif image. Then, click OK.

6.         From the Document Window’s pop-up menu, select the Render option.

The scene is rendered and the rendered image is displayed in the Document Window, as shown in Figure 7-18. Notice how the figure is colored using the texture image for a light source.

7.         Select File, Save As and save the file as Projected texture light.pz3.

[Figure 7-19] The Library includes several image-based

lights.

USE IMAGE-BASED LIGHTING

If you’re using only three lights to light the scene, your results probably aren’t as realistic as they could be. If you stop and take a look at the light sources that are lighting the current room, chances are that they come from multiple sources, including the sky above, an open window, light from a room down the hall, and so on. Poser provides a way to include all these sources as a way to light the scene.

Image-based lighting (IBL) uses a specific type of image, called a light probe, to simulate an environment’s diverse set of light sources. These images are then wrapped about the scene and its values are used to light the scene it surrounds. Several sample IBL files are included in the Library in the Lights category, as shown in Figure 7-19.

The Firefly rendering engine supports another lighting option called Indirect Light. This lighting solution computes the scene lighting realistically by keeping track of how light bounces off the object surfaces. You can learn more about the Indirect Light option in Chapter 16, “Rendering Scenes.”

Enabling Image-Based Lights

One of the available light types is the Diffuse IBL light. This light type lets you add a loaded image or texture as the light source. The controlling shader tree can even be animated to show effects like a flashing light or a disco-ball light. The Wacros panel includes a preset for loading textures for an IBL light.

Because image-based lighting has multiple light sources, it is best to enable ambient occlusion instead of shadows.

A scene lighted with IBL lighting also has no highlights. Adding a single key light to provide shadows and highlights to an IBL scene is a good solution.

Using Light Probes

The most effective images to use for image-based lights are light probes. Light probes are created using a reflective sphere that can capture a full range of the surrounding environment. Figure 7-20 shows a sample light probe taken from the Poser library. The warped shape of the light probe image straightens out nicely when wrapped around the current scene.

[Figure 7-20] A sample light probe

Loading HDR Image Maps

Poser can also load High Dynamic Range (HDR) images and use them as light probes. HDR images use a larger range of values to designate light values. The result is an image that is much richer in light information and perfect for image-based lighting.

Enable Image-Based Lighting 1.         Open Poser with the default man visible.

2.         Select Lights, Light 2 from the Actor List at the top of the Document Window.

3.         Select Window, Parameter Dials to open the Parameters/Properties palette, if it isn’t already open. Click the Diffuse IBL option to make the selected light an image-based light.

4.         Click on the Advanced Material Properties button at the bottom of the Properties palette to open the Material Room.

5.         Open the Wacros panel and click the IBL button.

6.         In the Texture Manager dialog box that opens, click the Browse button and locate the Light Probes folder located at Runtime/Libraries/Light/Image Based Lighting, where Poser is installed. Then select a light probe image and click the Open button.

7.         The next dialog box asks if you want to activate ambient occlusion. Click the Yes button.

8.         Click the Render button at the top of the Document Window.

[Figure 7-21] Image-based lighting

The light probe image is added as an image map to the shader and the resulting render using the image-based lighting is displayed in the Document Window, as shown in Figure 7-21.

9.         Select File, Save As and save the file as Image-based lighting.pz3.

Chapter Summary

This chapter covered how lights can be used to not only highlight the scene objects, but also to create a mood for the scene. Along the way, it covered the Light Controls and all the various light properties including light color, intensity, shadows, ambient occlusion, and attenuation. You also learned about several ways to position and point lights at objects in the scene. The chapter concluded by showing how textures can be projected into the scene using lights and how image-based lighting can be used to increase the realism of rendered images.

What You Have Learned

In this chapter, you:

•         Established a basic 3-point lighting design.

•         Explored lighting design such as rim lighting and under lighting.

•         Learned about the different light types.

•         Used the Light Controls to create new lights, position lights, and change a light’s color and intensity.

•         Altered the light falloff with the Attenuation setting.

•         Pointed lights at specific scene objects and parented lights.

•         Enabled and configured shadows for the selected light.

•         Enabled and configured ambient occlusion for a light.

•         Projected a texture onto the scene as a light.

•         Used image-based lighting to create a realistic lighting environment.

Key Terms from This Chapter 

•         3-point lighting. A basic lighting design that consists of a key light, back light, and fill light.

•         Ambient occlusion. An effect that diminishes ambient light from the scene, thus causing shadows to appear darker and providing more contrast for the rendered image.

•         Back light. A light positioned behind the scene to cast light on the edges of the scene objects.

•         Depth-map shadows. Shadows that are calculated and the shadow information is saved in a depth map, resulting in shadows with blurred edges.

•         Fill light. A secondary light used to fill in the gaps of the scene.

•         High Dynamic Range (HDR) images. An image format that captures more detail about the lighting of the environment.

•         Image-based lights (IBL). A light that illuminates the scene by recording all light information into an image map.

•         Infinite light. A light that simulates shining from an infinite distance so all light rays are parallel.

•         Key light. The main light in a scene used to cast shadows.

•         Light probe. An environment image taken of a reflective sphere that holds lighting information about the entire environment.

•         Point light. A light that projects light rays in all directions equally.

•         Raytrace shadows. Shadows that are calculated using an accurate raytracing method that results in sharp edges.

•         Shadow map. A bitmap that includes all the computed shadows for the scene. Shadow maps can be reused to speed up rendering.

•         Spot light. A light that projects light within a cone of influence.

•         Textured light. A light that projects a texture map onto the scene.

Kelly L. Murdock has more than 15 years experience in the computer graphics arena, especially in the area of 3D graphics. Included in the experience is a variety of tasks from high-end CAD product design and architectural pre-visualization to virtual reality and games. Kelly is best known for his international best-selling books on graphics including the 3ds max Bible, Illustrator Bible and Naked Maya. He also is the author of Poser 6 Revealed and Poser 7 Revealed as well as Edgeloop Character Modeling for 3D Professionals. Kelly currently works as a freelance designer for Logical Paradox Design, a company that he founded with his brother.