Using Environment Shaders

The Environment shader is used to set the attributes of the model's surroundings when you render. This can range from a simple colored background to simulating 3D space.

The Environment shader can be used for reflection mapping onto surfaces with BLINN or PHONG shaders when a scene is raytraced, or when it is raycast with the shader's Refl. Background option set to ON. The environment is used to compute the color of rays reflected from the surfaces

Tip: By default, an Environment shader is always loaded, and there can only be one loaded at any time. Store Environment shaders to create a library for future use by selecting the Save or Save as menu items from the File button at the bottom of the Multi-lister.

How to create a 3D environment

  1. Double-click the Environment icon in the Multi-lister to open the associated Control window.

  2. In the Environment Control window, click the Map... button to the right of the Color heading to display the Texture Procedures window.

  3. In the Texture Procedures window, click the black arrow to the left of the Environments heading to display the Environment texture maps.

  4. Select the desired Environment texture to use as the background. Once the Environment texture has been selected, it is displayed on the Environment icon in the Multi-lister, a 3D texture icon is automatically created, and the associated texture Control window is displayed. The texture parameters can then be customized to suit your particular needs. The following shows how the Sky Environment texture is represented in the Multi-lister.

    See the section on Environment Textures for more information.

Reflection Mapping a Shader

  1. If you want to use an Environment texture as a reflection map, double-click on a shader icon in the Multi-lister to display the shader's Control window.

  2. Select a BLINN or PHONG Shading Model for the surface and set all applicable shading parameters to suit your needs.

  3. Click the Map... button to the right of the Reflection heading to display the Texture Procedures window.

  4. In the Texture Procedures window, click the black arrow to the left of the Environment heading to display the Environment texture maps.

  5. Click to select the Environment texture that you want to map. Once the Environment texture has been selected, it is displayed on the Shader icon in the Multi-lister, a 3D texture icon is automatically created, and the associated texture Control window is displayed. The texture parameters can then customized to suit your particular needs.

    The following shows how the Sky Shader texture is represented in the Multi-lister.

Environment Shader Control Window

To edit the Environment shader, double-click the Environment icon in the Multi-Lister. The Environment Control window is displayed.

By default, the Background and Pix File Backdrop parameters are displayed. Click the black arrow to the left of the other parameter headings to display the window containing the associated parameters.

Background Parameters

The Background parameter is used to control the backdrop color for either a pix file, procedural texture, or an environment texture.

Color

To select a color for your background, click the arrow to display the Color Editor.

Pix File Backdrop Parameters

Backdrop

This is the name of pix file to be used as 2D backdrop to rendering. If you click the Browse button, the ALIAS File Requestor is displayed. You can retrieve an existing file from the File Lister to use as your backdrop file.

Sequence

If set to ON, the frame number is appended to the backdrop filename.

Fog Parameters

Fog Type

Click to the right of the heading to display the following Fog Type menu.

OFF specifies that you do not want to use environmental fog.
CONSTANT specifies that the fog is constant (the same thickness all the way through).

Layered Fog Parameters

If you select LAYERED, the Layered Fog Parameters window becomes available.

AltitudeMin

This value is used to set the lower boundary for the fog.

AltitudeMax

This value is used to set the upper boundary for the fog.

Column

This value determines which column in a pix file will be used for layered fog. This is most useful when animating fog, and having layers of fog appear, disappear, recombine, and move.

Tip: By animating the column position between 0 and 1 (the left and right sides of the texture file), you can vary the layers of fog over the duration of a scene. Use a file or ramp that has some variation across the file. By taking advantage of the variations, fog layers can appear to move or be made to appear and disappear.

Density Map

Sets image file used to create fog layers. Use a two-dimensional texture procedure such as Ramp or File. Ramps should be either vertical or diagonal. Since vertical columns are chosen, a horizontal ramp produces the same result.

Hints on Using Layered Fog Parameters

Layered fog has a density that varies with the altitude. In a mountain scene viewed from above, the valleys may be filled with fog while the peaks are crystal clear. In fact, there may be several layers of fog with clear air between them (see the following).

The Alias system lets you create a one-dimensional table of values to use for layered fog by using a column of data from an image or mask file. If you don't specify a file, a smooth ramp is used to create the fog.

If you specify a file, you can also specify a column, which indicates the horizontal position for the column. By animating the column position between 0 and 1 (the left and right sides of the texture file), you can vary the layers of fog over the duration of a scene.

Use a file or ramp that has some variation across the file. By taking advantage of the variations, fog layers can appear to move or be made to appear and disappear. The height of the column corresponds to values between AltitudeMin and AltitudeMax, the lower and upper boundaries of the fog. Outside of this range, fog is assumed to be absent.

Max/Min Fog Parameters

If you select MAX_MIN, the Max/Min Fog Parameters window becomes available.

These slider values represent the fog distances from the camera.

Fog Color

To set the color for Fog, click the arrow to display the Color Editor.

Tip: Since fog is usually white, it defaults to white. Set it to other colors for other effects, such as smog, or to create the illusion of great distance.

Fog Depth

Click the arrow in this field to display the Color Editor from which you determine how far you can see through the fog by changing the Range values.

A value of 0 produces a thick fog through which nothing is visible; the greater the number, the less fog there is. By 1.0, most objects are visible - this depends, however, on the distances in your scene. Small scenes require higher numbers to show the same atmospheric effects of large-scale scenes.

Amult

This value represents the scaling factor for layered fog density.

Aoffset

This value represents the offset factor for layered fog density.

Hints on Using Environmental Fog Parameters

Atmospheric effects like fog describe what happens to a ray of light travelling between surfaces. In a perfect vacuum, the ray travels without being reduced, and no light is scattered along the path of the ray from the light sources. This is typically the case in most computer graphics images resulting in the characteristic clear, hard-edged look.

However, in real life, dust or smoke particles float in the air; they obscure distant objects and scatter light to produce a mist color. The appearance of the atmospheric effects depends on several factors.

One factor is the distribution of particles in the atmosphere. A column of smoke has an evident concentration of particles in particular locations. Distinct puffs are visible. This type of atmospheric effect can be emulated by using the sCloud procedural texture or particles. See sCloud for further information on using this procedure.

Two important distributions of particles that you can use are constant density fog and layered fog. Constant density fog has equal densities of particles at all locations in space: distant objects fade equally in all directions. The view in any direction blends to a constant color if there are no obstructing surfaces.

In the fog procedure, the color for infinite distances is defined by selecting a Fog color. The relative scattering of light is controlled using the Fog Depth slider. Fog depth, roughly speaking, is the distance away that a surface must before it has half its light is scattered by the intervening air. For an outdoor scene during the day, the fog color should be white. For smog, try using a high layered fog and a brownish color.

Tip: To create a scene with the impression of great distances, give distant objects a blue tint by using a light fog colored blue.

Shader Glow Parameters

The Shader Glow parameters determine the type of effect achieved when a shader's Glow Intensity is non-zero.

Note: The individual parameters within the Glow, Halo and Radial Effects sections are similar to the light Glow and Halo parameters. See Glow Parameters and Halo Parameters for more information.

Glow Type

Click to the right of the Glow Type heading to display a menu from which you can choose LINEAR, SPECTRAL or RIM_HALO glows used to define the type of glow used by a shader with a non-zero Glow Intensity, or to turn the Glow Type OFF.

Halo Type

Click to the right of the Halo Type heading to display a popup menu from which you can choose LINEAR, SPECTRAL or RIM_HALO glows used to define the type of halo used by a shader with a non-zero Glow Intensity, or to turn the Glow Type OFF. See Common Active Effects Parameters, Halo Options for more information.

Auto Exposure

Auto Exposure evaluates the rendered result, and based on the maximum intensity found, automatically computes the intensity/exposure adjustment to the shader glows. The default is ON.

Important Note!

While Auto Exposure is very useful, we do not recommend its use during an animation. This is because each frame could end up with a very different intensity/exposure adjustment, and the end result could be a constant glow flicker between frames. To avoid the glow flicker, you can turn Auto Exposure OFF, but you will have to adjust the Color and/or Intensity of the Glow and Halo to get the result you want.

Another method is to use Auto Exposure during an animation and follow these steps:

  1. Render one frame to your satisfaction with Auto Exposure turned ON.

  2. Read the outfile generated from the rendering. There are two lines produced:
    Glow intensity normalization factor = 0.0117758.
    Halo intensity normalization factor = 0.0238476.

  3. Type these values into the Glow or Halo Intensity value fields and turn Auto Exposure OFF, then render the animation.
This way, the glow results will be what you expected without any glow flicker during the animation.

Quality

This value is used to control the resolution of the glow map. The default value is 0.5. Raise this value to avoid very small glow sources from vanishing when rendered.

Threshold

Sets the threshold value at which point shader glow effects will be visible. Threshold defines the minimum brightness at which surfaces will glow. The brightness is the value of a any point on a surface in a given rendering situation. If threshold is set to 0.5, only regions of surfaces with a rendered intensity over 127 (255*.5) will have Shader Glow applied to them.

Environment Glow Parameters

Glow Color

To select a color for the glow, click the arrow to display the Color Editor.

Intensity

The Intensity value acts as a multiplier to the glow colors for shader glow. It also eliminates the glow flicker if Auto Exposure is turned ON. The default is 1.0.

Spread

This value is used to control the general size of the glow effect. Negative values can have odd but useful effects. For example, if the Spread is set to -6.0 and the 2D Noise= 1.0, an image of a fiery bubble is created. The valid range is -· to ·.

Eccentricity

This determines how focused the glow effect is. A low eccentricity value will create a concentrated glow with a fast decay. A high eccentricity value will create a ball-like glow.

Note: The degree to which a glow effect will focus towards the center is limited. For very low values ( 0.01 ) the quality parameter should be increased for the best effect. Generally, however, it is best to use a glow with a low spread value with a halo effect that is more spread out.

Radial Noise

This value is used to simulate starburst effects and eyelashes refracting light. The valid range is -· to ·. The default is 0.0

Tip: Negative values will create a thicker noise. Use the Noise Freq. parameter in the Radial Glow Effects window to adjust the smoothness of this effect.

Star Level

This value is used to simulate camera star filter effects. The valid range is -· to ·. The default value is 0.0.

Tip: This is often effective when combined with a high value of Radial Freq. Use Star Points in the Radial Effects window to set the number of points on the star. If the Star Points is set to 1.0, comet like effects are possible. The star can be rotated by using Rotation.

Opacity

Used to allow a shader glow to obscure objects. The range is -· to ·. The default value is 0.0.

Environment Halo Parameters

Color

To select a color for the halo, click the arrow to display the Color Editor.

Intensity

The Intensity value acts as a multiplier to the halo colors for shader glow. It also eliminates the halo flicker if Auto Exposure is turned ON. The default is 1.0.

Spread

This value determines the general size of the glow effect. The Spread value also affects the size of the RIM_HALO. Halo Spread is generally greater than the spread of the glow when the values are the same.

Eccentricity, Radial Noise, Star Level

The Eccentricity, Radial Noise, and Star Level parameters operate the same way as they do in the Glow window except the values that are set are used to produce different halo effects. See the description of the Environment Glow Parameters for details.

Lens Flare

The Lens Flare parameter is used to simulate a bright light source illuminating the surfaces of several camera lenses. The intensity of the flare is determined by the halo Intensity. The size of the circles created is relative to the field of view of the camera. See Using Lens Flare in Common Active Effects Parameters for more information.

Radial Effects Parameters

Rotation

Used to rotate the various glow and fog noise and star effects about the location of the light. The valid range is -· to ·. The default is 0.0. The Rotation value affects the Star Level and Radial Noise Glow parameters.

Noise Freq.

Used to control smoothness of glow and fog radial noises. See the description of Radial Noise in the Glow window for more information. The valid range is from -· to ·. The default value is 0.5.

Star Points

Used to set the number of points on star filters (see the description of Star Level in the Environment Glow Parameters for more information). The valid range is 0 to ·. The default value is 4.0

Photo Effects Parameters

These parameters are used to define the qualities of two overall render effects.

Film Grain

Sets the level of graininess to simulate film stock.

Filter

Sets the color or texture to simulate a camera gel. This is applied as a post-render effect, altering the final render values of all pixels. Using white as the filter color means that no effect will be applied.

Master Lighting Control Parameters

These controls are used to set parameter multipliers for all the lights in the scene.

Intensity

This value is used to set the master lighting intensity. This parameter acts as a multiplier of the Intensity of every light in the scene. For example, setting Intensity to 2.0 will double the intensity of every light.

Light Color

This value is used to set the master lighting color. This parameter acts as a multiplier of the color of every light in the scene.

Environment Dynamics Globals Parameters

Dynamics Globals parameters define the environment in which the dynamic simulation operates. A simulation usually takes place on the surface of a planet, in some kind of atmosphere, and possibly indoors.

Gravity

This value represents the surface gravity of your planet. The units are in earth's gravity, so that earth surface = 1, moon =.18

Air Density

This is the density of the atmosphere of your planet. 1 = water, 10 = goo,.001 is fairly air-like. This value affects the buoyancy of objects, and air drag on objects.

Collision Walls Parameters

When you open the Dynamics Globals window, the Collision Walls and Turbulence parameters become available. Click the black arrow to the left of the headings to open the associated Control windows. The following Collision Walls parameters represent the characteristics of the object being rendered if it is in an enclosed space (such as a room).

The following toggles are used to determine if these properties exist in the room. If toggled ON, they do exist. To change one of the values, click in the numerical field to the right of the toggle box, type a new value and press Enter.

Floor

If there is a floor, the value determines at what point on the up-down axis it exists (Z for z-up, Y for Y-up).

Ceiling

If there is a ceiling, the value determines at what point on the up-down axis it exists (Z for z-up, Y for Y-up).

Left

If there is a left wall, the value determines at what point on the left-right axis it exists (X for z-up, Z for Y-up).

Right

If there is a right wall, the value determines at what point on the left-right axis it exists (X for z-up, Z for Y-up).

Front

If there is a front wall, the value determines at what point on the front-back axis it exists (Y for z-up, X for Y-up).

Back

If there is a back wall, the value determines at what point on the front-back axis it exists (Y for z-up, X for Y-up).

Wall Friction

This value represents the coefficient of friction for the walls. A value of 0 means no friction.

Elasticity

This value determines the damping of speed on collision with a wall. A value of 0 loses all speed, a value of 1 bounces back with same speed as before.

Environment Turbulence Noise Parameters

These parameters are used to determine the scale and speed of the air turbulence

Intensity

This is the maximum air speed due to turbulence. Scales the speed from the turbulence table. A value of 0 means no turbulence is used.

Spread

This value is used to scale the size of eddies in turbulence.

Persistence

This value is used to scale how quickly the turbulence changes.

Animated

If set to OFF, 3-D turbulence is created. If set to ON, 4D turbulence is created.

Environment Turbulence Table Parameters

These parameters are used to define the Fourier spectrum of the turbulence.

Space Res.

(Space Resolution) This is the size of 3D turbulence lookup.

Time Res.

(Time Resolution) This is the number of 3D turbulence lookup tables.

Roughness

This value represents the low pass cutoff for spatial spectrum.

Variability

This value represents the low pass cutoff for time spectrum.

Granularity

This value represents the high pass cutoff.





aliasdocs@aw.sgi.com
Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.