Radiosity

From ShadeCamp

Jump to: navigation, search

Shade features a Radiosity rendering option, which provides more realistic lighting effects by implementing indirect radiation (diffuse reflectance from objects) in addition to direct radiation. Since the influence of indirect radiation can be accurately calculated without having to use a virtual light source, you can express soft light and shadows, and obtain more realistic rendering result, by combining this Radiosity with Ray Tracing, or with any other rendering technique.

Note: Radiosity Pro, available in Shade 9 Professional, offers the following additional features:

• Uses the result of the Radiosity calculation with Scan Line rendering • Saves the result of the Radiosity calculation • Exposure is adjustable using a slider. Modulates lights • Supports multi-threaded Radiosity calculation

Contents

Using Radiosity

First, let’s take a brief look at how to use Radiosity.

Step 1) Opening the Radiosity window Select Radiosity from the View menu to open the Radiosity window.

Step 2) Defining the display parameters for the Radiosity window.

Click the Options Show/Hide button in the Radiosity window to display the Radiosity Options, and click the Display tab to specify the display parameters for the Radiosity window. Make the settings as needed.

Note: For details on these settings, refer to the Shade Reference.

Step 3) Defining the Radiosity calculation parameters Click the Solution tab to specify the Radiosity calculation parameters. Make these settings as needed.

Note: For details on these settings, refer to the Shade Reference.

Step 4) Performing the Radiosity calculation

Click the Start button at the bottom of the Radiosity window to perform the Radiosity calculation.

The resulting images, consisting of subdivided surfaces, are displayed sequentially in the Radiosity window. While the calculation is in progress, the calculation indicator (upper-left corner) blinks, and the progress indicator (upper-right) starts from 100% and counts down toward 0.

The result of the Radiosity calculation is displayed as an image in the Radiosity window.

Step 5) Stopping the Radiosity calculation

You can click the Stop button to terminate the calculation when it has proceeded to a sufficient level. The speed of change of the progress indicator will become very slow when the calculation has proceeded far enough, telling you that you can stop the operation. If the size of the data is small, the Radiosity calculation completes in a short period of time without requiring your intervention. When the calculation completes, the calculation indicator stops flashing, the Stop and Abort buttons are disabled, and the Start button is enabled.

Step 6) Correcting color

After the light exposure adjustment task completes, you can perform color corrections by opening the Correction window. This window allows you to adjust the gray balance (highlights, neutral gray, and shadows) and the color balance by modifying the Gamma value. The results of adjustments in the Correction window affect the rendering in the Image window. The settings in the Correction window are implemented based onreal color (32-bit RGB), resulting in no deterioration of quality. We recommend you make the most of this feature.

Step 7) Specifying Camera settings

You can select options for a Camera and adjust the perspective of the image to be rendered. Because the Radiosity calculation is performed based on the positional relationships between the light sources and surface objects, the ettings for a Camera can be made independently of the calculations and their results.

Step 8) Specifying Rendering options for Radiosity - 1

In the Rendering Options, select the rendering method, click the GI tab, and choose Radiosity in the Global Illumination pull-down menu. Now you can use the result of the Radiosity calculation.

Note: Using radiosity with Scan Line rendering is available in Shade 9 Professional only.

Step 9) Specifying Rendering options for Radiosity - 2

Similarly, with the GI tab selected in the Rendering Options, you can specify how the Radiosity result is to be used with the Energy pull-down menu.

- When Indirect Energy is selected, only the data related to indirect light is extracted from the result of the Radiosity calculation and used for rendering. The data for direct light, that is, rays of light incident on surfaces from light sources, is retrieved from the shadows of the Ray Tracing or Shadow Map instead of the Radiosity result. This method provides rendering of sharper shadow edges with light sources such as Infinite Distance Lights, Point Lights, and Spotlights. However, the drawback is that the reflections of Area Light sources are processed as those of Point Light sources for Ray Tracing or Scan Line rendering.

Note: Shadow Maps with Ray Tracing or Path Tracing rendering are only available in Shade 9 Professional.

Note: When Total Energy is selected, the data related to both indirect light and direct light in the result of the Radiosity calculation is used for rendering. This method accurately reproduces the diffuse reflections of area lights, and reduces rendering time because shadows are not calculated. However, the disadvantage is that some of the surfaces may not be displayed.

Step 10) Rendering

Click the Render button in the Image window to start rendering.

Note that you cannot perform rendering while the Radiosity calculation is in progress.

About Radiosity Calculations

Stopping and Completing the Radiosity Calculation

The Radiosity calculation completes when the remaining amount of data to be calculated, indicated by the value of the progress indicator, falls below the percentage specified in the Convergence text box in the Solution dialog box. In the Radiosity calculation, surfaces associated with higher energy, such as those that catch rays of direct light, are first processed, and then surfaces with lower energy are computed. Therefore, the visual changes in the objects or surface development in the window become less conspicuous as the calculation proceeds. When performing the Radiosity calculation, check the progress indicator to find out whether the Radiosity calculation has reached a sufficient level, so that you can stop the calculation. The value of the progress indicator shows the amount of not-yet-emitted energy within the entire mount of energy. The entire amount depends on how objects and light sources are defined in the image. The light energy from a light source is emitted to objects, which determines the brightness of those objects. Then rays with smaller amounts of light energy are emitted from those objects onto other objects until certain rays of light have bounced off of every single object. In the course of these interactions, the amount of light energy emitted from each object becomes smaller and smaller according to the Law of Energy Conservation. This energy transfer will continue until the amount of not-yet-emitted energy falls below the percentage specified in the Convergence text box in the Solution dialog box.

Re-Executing the Radiosity Calculation

You have to update the Radiosity calculation by clicking the Start button after you change the settings for the positional relationships between objects and light sources, light sources, surfaces, or subdivision of surfaces, or after you have performed a transformation. However, you don’t need to update the Radiosity calculation when you have only modified Camera settings.

Brightness Correction

When the Auto Exposure checkbox is on, the data from the Radiosity calculation is converted into the 24-bit RGB color space using certain related parameters before the image is displayed in the Radiosity window. This conversion is based on a combination of settings and parameters, such as the Diffuse Color and the Texture average color in the Surface window, the Diffuse parameter in the Solution dialog box, and the result of the Radiosity calculation, as well as the related parameters. These parameters work together to produce the image so that the color of every pixel fits within the 24-bit color space when the total energy is uniformly allocated to the scene. This function is similar to the automatic exposure adjustment feature included in conventional cameras. Thus the image is displayed in the Radiosity window so that most objects are visible even if the scale or brightness values of some objects are inappropriate. However, the brightness of objects will remain unchanged when the scene contains only one light source and you have modified the brightness of it. For example, with the Radiosity feature, you cannot change the brightness of objects in the scene containing multiple light sources by switching on/off one or more of those sources. This limitation can be worked around by calculating the Radiosity with the Auto Exposure checkbox off or by manually correcting the brightness the image after the Radiosity processing.

Correcting the Brightness

You can correct the surface color of the rendered objects through the Radiosity calculation using one of the following methods:

Adjusting the Radiosity Pro Exposure

Radiosity Pro is not provided with the Auto Exposure checkbox in the Radiosity window. To adjust the exposure with Radiosity Pro, select the Exposure tab in this window to display the Exposure dialog box. To manually adjust the exposure level, drag the slider in the Exposure dialog box. When you increase the exposure index by 1, the light energy doubles. The Auto checkbox in this dialog box works the same as the Auto Exposure checkbox located at the top of the Radiosity window, and when this checkbox is selected, the automatic adjustment of exposure is enabled. Therefore, you can create various test images for the same scene by modifying the settings of light sources when the Auto Exposure checkbox is off. Also, if you display an interior scene containing an opening toward the exterior, the effect of natural light emitted from the opening onto the objects inside will be suppressed, preventing over-brightening of the interior objects.

An interior scene containing three light sources with the Auto Exposure checkbox off. The first shows the scene with all three lights enabled, the second with the two lights near the front enabled, and the third with only one light near the front. Because the Auto Exposure is disabled, the third one is underexposed. The three scenes show clearly the different effects of illumination.

The Diffuse Parameter in the Surface Window

Using this parameter, you can correct the color of each object or light source. After you change the settings, you need to update the Radiosity calculation.

The Diffuse Parameter in the Solution Window

This parameter is specified in the Solution window displayed by clicking the Solution tab in the Radiosity options. This parameter affects all the settings for the Diffuse parameters in the Surface window. After you change the value, you need to update the Radiosity calculation.

Objects and Radiosity

The Radiosity calculation is performed on all objects, whether or not they are currently selected.

Some objects in the scene can be excluded from the Radiosity calculation to save time and memory in the following ways:

Using the Suppress Rendering Symbol (#)

The objects and parts whose names are preceded withthe Suppress Rendering symbol (#) will be excluded from the Radiosity calculation. This symbol is effective for all the objects or parts residing at any level of the hierarchy.

Using the Render Checkbox in the Browser Window

The objects or parts whose Render checkbox is unchecked in the Browser window, as well as their child objects and parts, will not be rendered. These objects or parts will be excluded from the Radiosity calculation.

Deselecting Objects

After deselecting the objects you wish to exclude from the Radiosity calculation, click the Start button in the Radiosity window while holding down the Ctrl key (Win) / option key (Mac). The Radiosity calculation will be performed on only the currently selected objects.

Mesh Size on Objects During the Radiosity Calculation

The Radiosity calculation is based on the individual meshes for which size (the distance between the mesh borders) is determined by the measurement units you have specified in the sub menu that appears when selecting the Units command in the Figure menu. If you change the measurement units to a smaller value, an insufficient memory condition may be encountered because a great number of meshes must be processed during the Radiosity calculation.

Radiosity and Surface Attributes

For the Radiosity calculation, the values of the Diffuse Color, Transparency, and Texture Mapping properties are used.

For Texture Mapping, the Average Color of the Texture is Used.

Surfaces rendered after the Radiosity calculation:

• In the Global Illumination window of the Rendering Options, when Indirect Energy is selected from the Energy pull-down menu, all surfaces will be rendered.

• When Total Energy is selected from the Energy pull-down menu, the Bump mapping feature is not available. The Mask and Transparency mapping features will not correctly render projected shadows on other objects.

Light Sources

For the Radiosity calculation, the values of the Point Light, Spot Light, Area Light, Infinite Distance Light Source, and Natural Light (sunlight and sky light)properties are used. The ambient light of the Infinite Distance Light Source, and the intensity of the background light source are not used.

Point Lights and Spotlights

For the Radiosity calculation, the values/settings of the Intensity text box, the Lumen checkbox, the Spotlight checkbox and the Angle text box in the Object Info window for light sources, as well as the Diffuse Color setting in the Surface window, are used. Point lights, spotlights, area lights, and linear lights can be categorized as “artificial lights.”

Area Lights and linear Lights

The value of the Intensity text box and the states of the Lumen and Visible checkboxes in the Object Info window for line objects, and the Diffuse Color setting in the Surface window, are used for the Radiosity calculation.

Infinite Distance light Sources and Sky Lights

The values or settings for the intensity, direction and color, and the settings for the skylight specified in the Distant Light window, are used for the Radiosity calculation. No ambient light is used. The infinite distance light and its intensity can be interpreted as sunlight. Sunlight and sky light are sometimes referred to together as total daylight (or global luminance).

In the Radiosity calculation, the surfaces onto which mostly the total daylight (sunlight and skylight) is emitted are first calculated, followed by the surfaces receiving direct artificial lights (point lights, area lights and spotlights) and then the surfaces catching indirect light. For the calculation of indirect light, the surfaces that catch more light will be computed first.

With Radiosity, the intensity of a light source may affect other light sources. For example, imagine a scene that contains an exterior area under an infinite distance light with the intensity of several tens of thousands of lumens, and an interior illuminated by a point light, spotlight, or area light of several thousands of lumens. When the intensity of the infinite distance light is increased, usually the interior will appear darker, and the apparent brightness of the exterior area will remain unchanged.

The table below shows light types and their typical intensities.

Table: Typical intensities of lights (in lumens)

The total luminous flux of the sun and the average distance between the earth and the sun are as follows respectively:

1.967 x 1028 lumens 1.496 x 1011 m

The light intensities under direct sunlight and under indirect sunlight (fair sky) are considered to be approximately 100,000 lux and 10,000 lux, respectively.

Surface Subdivision and Energy Release

Surface Subdivision in the Radiosity Calculation

During the Radiosity calculation the surface subdivision task is performed in two steps. The first is to divide curved surfaces into multiple polygons for rendering. This task is performed in modes other than Radiosity. The first subdivision is executed according to the current definitions, such as the existence of a Suppress Rendering symbol (#) in front of the name of an object and the setting of the Surface Subdivision pull-down menu in the Rendering Options.

In the second step, colors at the vertices of the resulting polygons are compared to determine the differences. If the difference is too large, the polygon will be divided again into smaller polygons (meshes). You can define how to perform the second subdivision using the Solution window in the Radiosity Options.

Setting the Mesh Spacing

Here we will take a look at issues related to the Mesh Spacing settings and troubleshooting. Sometimes shadows with spacing narrower than the spacing defined in the Initial Mesh Spacing text box may not be recognized. The top is the image displayed in the Radiosity window, and the middle is the rendered image using the calculation result, where the shadows of the chair legs are too narrow to be recognized. In this case, the best way to solve this problem is to use the Ray Tracing technique. In the GI tab of the Rendering Options, select Indirect Energy from the Energy pull-down menu. The bottom example is the new rendered image.

When the Minimum Mesh Spacing value is too large, a “stepped” shadow appears. Reducing the value can solve this problem.

Energy Release

As the Radiosity calculation continues, sometimes the number of rectangles displayed in the progress indicator increases, and the calculation takes a long time to complete. In most cases this is caused by the fact that two or more objects are stacked up in the same location. This problem can be solved by slightly moving one of the objects, or deleting unnecessary objects.

Some Considerations When Using Radiosity

• Boolean rendering does not support radiosity.

• Backwards-compatible Shade files and .xmlshd files do not support saving the Radiosity calculation.

• When a low memory condition occurs during a Radiosity calculation, click the Delete button in the Radiosity window to release memory.

Creating Objects

There are some considerations when you create objects on which the Radiosity calculation is performed. Let’s take a look at the considerations while creating actual objects.

Avoid Intersecting Objects

1 Here we will use sample objects. Open the duplication.shd file from the Chapter 16 folder in the User Guide folder.

Two objects are crossing each other. Rendering theseobjects normally will cause no problem.

Now let’s start the Radiosity calculation. 2 Select Radiosity from the View menu to open the Radiosity window. Then, click the Start button.

3 Click the Options Show/Hide button in the Radiosity window to display the Radiosity Options, and choose the Display tab. Uncheck the Mesh checkbox in the listed setting items.

Shadow leak and light leak occurs where two objects intersect. The cause of this problem is that the position the objects cross is in the middle of the mesh.

In Radiosity, Smooth Shading is performed at the adjacent vertices by obtaining the intensity at the vertices of polygons.

In this example, since the front vertex of the vertical object is lighted while the next vertex is shaded, a shadow leak occurs at the front of the intersection when Smooth Shading is performed at these two points. The light leak also occurs at the lower part of the vertical object, which should have been fully shaded.

There are two ways to solve shadow leak and light leak. You will set a smaller Minimum Mesh Spacing, or model objects so that they do not intersect.

4 First, we will set a smaller Minimum Mesh Spacing. Click the Solution tab in the Radiosity Options and enter an appropriate value in the Minimum text box to set the Minimum Mesh Spacing. Here we will set the value to “10”.

It is important that the value entered for the Minimum Mesh Spacing is 5 to 10 times smaller than the Initial Mesh Spacing, and must be divisible.

Click the Start button to start the Radiosity calculation.

The mesh gets smaller

When you uncheck the Mesh checkbox in the Radiosity Options Display tab, you will notice less, but still remaining, shadow leak. By making the mesh smaller, the space between vertices is narrower and the shadow leak can be reduced. However, this approach results in large memory consumption and longer calculation times, especially for a huge amount of parts, say, a whole architecture perspective. Use this setting as the scene demands.

5 Next, we will look at how to create objects that do not intersect. First, return the value of the Minimum text box to 150 in the Solution tab of the Radiosity Options.

5-1 To easily see the difference, we will copy the crossing objects. Use Translate from the Copy tool and slightly drag them downward (toward you) in the Top view to duplicate them.

5-2 Make sure that the copy you just made is still selected, then make another copy at the same place. Choose Translate from the Copy tool and click anywhere in the Figure window. This will create a copy of each object at the same position, fully aligned with the original object.

5-3 Working with the first copy, display the control points of the closed line object representing the horizontal object. Select the two control points of the left side simultaneously and move them to the right until they intersect (align) with the vertical object.

5-4 The left side of the horizontal object is separated. Similarly, modify the right side of the horizontal object. Working with the second copy, select the horizontal closed line object and its two rightmost control points, and then shift them to the left until they intersect with the vertical object.

Now you have created a horizontal plate consisting of two objects.

5-5 Modify the vertical objects in a similar manner. Move the control points so that the ends of the two plates align with the horizontal objects at the original intersection point.

5-6 Click the Start button in the Radiosity window to start the Radiosity calculation.

By unchecking Mesh in the Display tab of the Radiosity Options, you can verify that no shadow leak or light leak can be seen.

The mesh always starts from the edges of the objects. Therefore, if objects are divided at the intersecting position, the mesh does not cross over that place, and no shadow / light leak occurs.

When objects are created neatly like this, you can obtain beautiful results in a shorter time even if the parameters are set roughly.

Avoid Surfaces That Come Into Contact

1 We will now use another sample object. Open the intersection.shd file from the Chapter 16 folder in theUser Guide folder.

When the file is opened, you will see three horizontal boards and ten vertical boards in a lattice shape.

2 Now let’s carry out the Radiosity calculation and check the result.

Some surfaces are blackened and have shadow leaks. Although no surface is flipped, the horizontal boards and vertical boards come into contact. Where the surfaces contact, it turns black or totally white, or causes a phenomenon where the Convergence value gets closer to 0% and then returns to 100% again

3 Let’s modify these objects.

First, double-click the Part containing the horizontal boards in the Browser. In the Name dialog box that appears, type “\” at the beginning of the name “Part”. (Note that the Boolean characters must be single-byte characters.)

“\” means logical sum. When a “\” object and another object (regardless of the hierarchical levels) intersect, the “\” object will be combined with the other object. The combined object appears the same, though the internally intersecting part will not be displayed. For this reason, the surfaces where vertical and horizontal boards intersect will not be shown in the rendering result, but the actual result of the Radiosity calculation is the same because Radiosity is not affected by Boolean rendering. Therefore, we have to perform Boolean modeling to identify the objects as a single polygon mesh.

4 With all objects selected, choose Boolean Modeling… from the Create tool. In the displayed Boolean Modeling Options dialog box, click the OK button without changing any of the default settings to execute the Boolean modeling.

The Boolean modeling is finished, and polygon meshes are created at the same place as the original objects.

5 In the Browser, if it is not already selected, select the BooleanResult part created with the Boolean modeling and click the convert button in the Toolbox. This operation creates a single polygon mesh from the polygon meshes created by the Boolean modeling. Now use Translate from the Move tool to move the new BooleanResult part down in the Top view, so that you will be able to see both it and the original part in the rendered image.

6 Now we have created an object whose surfaces do not contact each other. By performing the Boolean modeling, contacting surfaces have been combined. Execute the Radiosity calculation to check the result.

We can obtain a normal calculation result without blackened surfaces or shadow leaks.

Avoid Creating an Object Whose Area is Zero

When an object whose area is zero exists, the Radiosity will be incorrectly calculated.

1 We will now use another sample object. Open the 0.shd file from the Chapter 16 folder in the User Guide folder. When checking the closed lines one by one in the Browser, you will notice that some of the closed lines consist of four points and have no area. (They appear as a line in the Figure window. Select one of them and choose Modify Control Points from the Modify tool to display the points.)

2 Delete the zero-area objects.

In this situation, select a Part containing closed lines or the wall and click convert once again.

The wall object has been converted back into a Polygon Mesh. Since any no-area objects are automatically deleted before the conversion, the Radiosity will be calculated without problems.

3 Before the Radiosity calculation, let’s make another wall on the other side of the stairway. Select Translate from the Copy tool and move the wall object to duplicate it on the other side of the stairway.

The surface of the wall object copy is flipped when you see it from the inside of the wall.

4 To check whether the surface faces up or down, display a Quick Rendering (Shading) view and turn Single-sided on in the contextual menu to display only a single side of the surface. In this situation, the surfaces that do not appear will face down.

Now flip the surface. For the copied wall object, select the Flip Face check from the checkboxes in the right side of the Browser.

Since the surface has been flipped, now you can see it from the inside of the wall in the Quick Rendering view with the Single-sided checkbox on.

A proper result will be displayed now if you perform the Radiosity calculation.

5 Execute the Radiosity calculation to check the result.

We can verify that the normal calculation result is obtained. |

Personal tools