Chapter 14 Background Settings
From ShadeCamp
Settings for the background are made in the Background window. Here we will describe the settings in the Background window and how to blend the background and an image.
To open the Background window choose View > Background.
Background Window
Choosing Background from the View menu will display
the Background window.
Background Base Color Box
These color boxes are used to set the base colors for each of the Upper and Lower hemispheres. The pattern of the mapping color or the image is blended with this base color. You can set the synthesis technique in the Blend pull-down menu.
Load and Save Buttons
You can load Background window settings from a Background configuration file, and save them in a file.
Lighting Factor Slider and Text Box
The intensity of the background as the light source is specified by using a relative value. This setting is effective only when Path Tracing is selected in the Global Illumination pull-down menu of the Global Illumination tab in the Rendering Options.
From the left: Lighting Factor is set to 0, 1.5, and 3.0.
Distant Light is set to 0, for all.
Picture Box
This box previews the settings (selected area, background base color, selected layer and pattern,mapping color, density, and size), and is also used to load and display an image.
Layer Pull-down Menu
You use this to choose the number of the layer to which the pattern settings will be applied. You can map multiple layers (combine them) by setting the density Mapping of each layer to less than 1.00.
Multiple layers are mapped in this example. Cloud and two Hazes are set for the Upper Hemisphere, Ocean, Spotted, Cloud, and two Hazes for the Lower Hemisphere.
Pattern Pull-down Menu
You choose the pattern to set for the specified layer.
Cloud
Two-dimensional random pattern of colors. You can select Planar or Spherical 1 as the projection technique.
Ocean
An irregular crossing wavy pattern of colors. You can only select Planar as the projection technique.
Marble
A two-dimensional random pattern of colors. You can select Planar or Spherical 1 as the projection technique.
Spotted
A two-dimensional random pattern of colors. You can select Planar or Spherical 1 as the projection technique.
Checked
A two-dimensional checkerboard pattern of bicolor. You can select Planar or Spherical 1 as the projection technique.
Haze
A two-dimensional regular pattern of colors. The Ground color starts at the Eye point, and fades into the Mapping color as it gets farther away (closer to the horizon). This is similar to the “Fog” attribute of the Distant light. The difference is that Fog affects objects only, not the background. Haze, on the other hand, only affects the background, not objects. You can only select Planar as the projection technique.
Image
An image file of your choice is used for the background. You can select Planar, Spherical 1, or Spherical 2 as the projection technique. The image is loaded using the contextual menu for the picture box.
Mapping Color Box
You use this to set the color of the pattern that is blended with the background color, or, using the Crop Area Setting dialog box, you can set the color of the margins around an image.
Area Pull-down Menu
You can choose the Upper or Lower hemisphere,or Whole Sphere, to which the settings are to be applied.
The Upper hemisphere is the background above the horizon line (the “sky”), and the Lower hemisphere is the background below the horizon line (the “ground” or “floor”).
Projection Pull-down Menu
Here you select the projection method for mapping patterns on the background. The options are Planar, Spherical 1, and Spherical 2.
For the Spherical 2 projection technique, you can specify the climax in the pull-down menu that is activated just to the right of the Projection pull-down menu.
Planar projection (top image) and Spherical 1 projection (bottom image)
Note: To easily recognize the effect, the images are rendered with Panorama on in the Effects tab of the Rendering Options.
+X Pull-down Menu
This setting is effective only when Spherical 2 is selected in the Projection pull-down menu, allowing you to set the singularity direction of the mapping.
The result singularity direction when +X (top) or -X (bottom) is selected.
The result singularity direction when +Y (top) or -Y (bottom) is selected.
The result singularity direction when +Z (top) or -Z (bottom) is selected.
Note: To easily recognize the effect, the images are rendered with Panorama on in the Effects tab of the Rendering Options.
Premultiplied Alpha Checkbox
When the Premultiplied Alpha checkbox is on, the layer’s color is blended with the background base color or the lower pattern, and the layer’s alpha channel is ignored.
When the Premultiplied Alpha checkbox is off, the mapping slider value is Multiplied by the alpha channel value of each pixel. This checkbox is not activated when any pattern other than Image is selected.
Horizontal Flip, Vertical Flip and Switch Axes Checkboxes
You can change the orientation of the image mapping. (Note that these do not affect the preview image.)
Blend Pull-down Menu
Used to select the synthesis technique for multiple layers.
Note: For details on synthesis, refer to Chapter 13: Surfaces.
Normal
When the Premultiplied Alpha checkbox is on, the pattern is blended with the background base color or the lower pattern, according to the mapping slider value. When the Premultiplied Alpha checkbox is off, the mapping slider value is Multiplied by the alpha channel value of each pixel.
Alpha
When the Premultiplied Alpha checkbox is off, the image is blended with the background base color or the lower pattern, using the alpha channel as a mask. When the Premultiplied Alpha checkbox is on, the alpha channel will be ignored.
Add
When the Premultiplied Alpha checkbox is on, the pattern of a layer is combined with the background base color or the lower pattern, using additive synthesis. The result of the synthesis becomes brighter in most cases. When the Premultiplied Alpha checkbox is off, the mapping slider value is Multiplied by the alpha channel value of each pixel.
Subtract
When the Premultiplied Alpha checkbox is on, the pattern of a layer is combined with the background base color or the lower pattern, using subtractive synthesis. In this synthesis, the color of the layer’s pattern is inverted. When the Premultiplied Alpha checkbox is off, the mapping slider value is Multiplied by the alpha channel value of each pixel.
Multiply
When the Premultiplied Alpha checkbox is on, the pattern of a layer is combined with the background base color or the lower pattern, using Multiplicative synthesis. The result of the synthesis becomes darker in most cases. When the Premultiplied Alpha checkbox is off, the mapping slider value is Multiplied by the alpha channel value of each pixel.
Max
When the Premultiplied Alpha checkbox is on, the pattern of a layer is compared with the background base color or the lower pattern, favoring the brighter part. The result of the synthesis becomes brighter in most cases. When the Premultiplied Alpha checkbox is off, the mapping slider value is Multiplied by the alpha channel value of each pixel.
Min
When the Premultiplied Alpha checkbox is on, the pattern of a layer is compared with the background base color or the lower pattern, favoring the darker part. The result of the synthesis becomes darker in most cases. When the Premultiplied Alpha checkbox is off, the mapping slider value is Multiplied by the alpha channel value of each pixel.
Mapping Slider and Text Box
Drag the slider or enter an appropriate value in the text box to set the Mapping density for the pattern. The Blend pull-down menu is located to the left of this slider.
Density Slider and Text Box
Drag the slider or enter an appropriate value in the text box to set the density of the Cloud pattern. Lighter clouds appear with smaller values, and a clear sky appears as the value becomes zero. This slider does not affect any other type of pattern.
(Top) Density of 0.6
(Bottom) Density of 1.0
Size Slider and Text Box
Drag the slider or enter a value in the text box to set the ratio of the pattern.
Examples when the size is changed.
Anisotropic Slider and Text Box
Drag the slider or enter a value in the text box to set the orientation of the pattern.
From the top: Anisotropic is set to -1.0, 0, and 1.0.
Merging With an Image
The Merge button in the Image window and the Backdrop checkbox (which is only activated after you load an image into the preview box) of the Image tab in the Rendering Options enables you to use the alpha channel to blend a rendered image with a background image by means of additive synthesis. The background as referred to here is a part which is visible in those areas with no object present, or through a transparent object with no other objects behind it. This technique is different from simply rendering a background, in that the synthesis is processed two-dimensionally, and therefore the processing time is shorter. However, there may be cases in which the background is not appropriately reflected from an object, or light is not passed correctly to the image.
Images are centered in the middle of the Image window without changing their size. Repeated syntheses result in degradation of the anti-aliased parts. Also, a blended image cannot be removed. Merging another image with a synthesized image will execute additive synthesis without removing the already present (that is, synthesized) image. As for objects, no refraction or reflection will be carried out in transmission. Reflecting lights onto an object will result in different outcomes in the synthesis of glare.
1. A background image to be used for synthesis.
2. A rendered image to be used for synthesis. The bright part at the center is the glare of a distant light.
3. The alpha channel in the rendered image. No Alpha information is provided for the glare in the background.
4. The synthesized image. Although objects are processed with masking, the glare exhibits “white out,” due to going through a simple summation.
5. The result of rendering the background from the previous page.
Alpha Channel
Each of the rendered images possesses 8-bit R, G, and B data, along with another set of 8-bit data called the “Alpha Channel”. The alpha channel data is usually used for masking or transparency of objects. The value is 0 (black) where there is no object or where objects are completely transparent, and the value increases as the degree of transparency gets lower; until it reaches 255 (white) for complete opacity. A synthesized image can be created with ease by processing an image which was created by Multiplicative synthesis between a background image and alpha channel, and rendering an image with no background by means of additive synthesis.
In Shade, you can extract transparency data which are used to reflect anti-aliasing, transparency, and color information in the alpha channel.
Reflecting Anti Aliasing in the Alpha Channel
You can apply anti-aliasing to a rendered image to be blended with another image. An image rendered with anti-aliasing can be smoothly blended with another image by switching off the Premultiplied Alpha checkbox in the Misc. tab of the Rendering Options. By default, the Premultiplied Alpha checkbox is on, and the border between an image and the background (or black when there is no background to display) is processed smoothly. If you attempt to merge this image with yet another image, the antialiased border will reflect color elements from the original background, and your attempt will fail.
However, by switching off the Premultiplied Alpha checkbox, the R, G, and B channels of the image are set not to include color elements from the background in the anti-aliased borders. You can also use this function when you plan to use other software to merge the image with another image and blend the anti-aliased borders smoothly. If there is an object with transparency and reflection settings, or if you wish to remove unnaturalness in the transparent parts or reflections, you need to switch off the Reflect Background checkbox as well. When the Premultiplied Alpha checkbox is off, the border between objects and the background does not align. The Premultiplied Alpha checkbox should be left on when you will not be synthesizing the rendered image with another image.
1a. Rendering with the Premultiplied Alpha checkbox on, that is, the default. Objects blend correctly with the background if any background is present.
1b. Rendering with the Premultiplied Alpha checkbox on and no background present. Objects blend correctly with the black color.
2. Synthesis with a special background to emphasize the effect. The background is half black and half white.
3. Synthesis of the previous image without a background and the alpha channel. However, there is a defect in the anti-aliased borders, where they blend with the black in the background.
4. Rendered with the Premultiplied Alpha checkbox off. Although the effect of anti-aliasing on the borders is not apparent, the alpha channel is processed with anti-aliasing.
5. The result of synthesis. The defect in the antialiased part has been corrected.
6. To display the background, the outlines appear awkward as shown above, unless the Premultiplied Alpha checkbox is on.
Reflecting Transparency in the Alpha Channel
The Transparency Affects Alpha checkbox can determine whether or not to reflect transparency in the alpha channel. By default, this checkbox is on, meaning that the Eo value (intensity of the alpha channel) for an object with transparency will reflect that transparency. When this image is merged with another image, objects with 100% transparency but which appear opaque (because of highlights or mapping) will have an Eo value of 0, and therefore will not be displayed. By switching off the Transparency Affects Alpha checkbox, the Eo channel values of all objects will be set to 100% regardless of the transparency setting, so that objects with a transparency of 100% can also be displayed.
Sphere with a transparency of 1, and refraction.
Rendered image with the Transparency Affects Alpha checkbox on, the default. The alpha channel of the background which is reflected inside the object due to refraction is also generated.
When the Transparency Affects Alpha checkbox is off, transparent areas are treated as a mask.
Extracting Transparency Data to Reflect Color
The Render Transparency checkbox enables rendering color images of transparency. Color images of transparency are used to reflect the color of transparency when objects with a colored transparency setting are merged with an image, by using the alpha channel to which transparency is reflected. When transparent objects (Base Color: black, Transparency: 100%) with Transparency mapping or color of transparency set are used as color slides, a background other than black or a background object acting as a backdrop is required (think of a light table used to look at color slides). In this case, because the background is reflected on the transparent part of the object (white part in the Transparent mapping images), the transparent (or white in the Transparent mapping) part is inconvenient when merging with a background image. And, if the background is set to black, Transparency mapping and the color of transparency itself cannot be expressed. Rendering transparency with the Render Transparency checkbox on will only render the transparency color, instead of colors that are set as surface attributes. Combine the transparency color image and another image with Multiplicative synthesis, then use additive synthesis with the rendered image. The transparency color is then reflected in the synthesized image.
1. Each of the three spheres that touch the background has a Transparency setting of 1. The Premultiplied Alpha checkbox is off. We will blend this image with the background image while leaving the transparency colors.
2. Render with the Render Transparency checkbox on.
3. The image to be merged.
4. Multiplicative synthesis of the image with its transparency rendered and the background.
5. Apply additive synthesis with the original image (without background). Transparency colors now affect the other images.



































