Title | Previous | Next

depthcue

Set the parameters for depth cueing.

Synopsis:

depthcue option = value [, option = value, ...]

Arguments:

option

An option for depth cueing. See table below.

value

A value associated with the matching option . See table below.

Option

Value

Value Meaning

Default Value

type

off, fast, nice

off disables all depth cueing. fast enables an approximate method, and nice enables an exact method. Note that for very complex datasets, nice may be faster when using the software renderer

off

equation

linear, exp, exp2

This sets the mathematical equation used for determining the color of an element. linear describes a linear falloff, exp is an exponential function, and exp2 is the square of the exponential function

exp2

fade

positive real number

This is the amount of fade used in the exp and exp2 equations. Typical values range from 0.5 to 10.

3.0

start

real number, 0<=start<=1

start < end

A distance from the viewer as a floating point percentage when the linear equation is used. No cueing is applied at a distance closer (lower) than this value.

0.3

end

real number, 0<=end<=1

start < end

A distance from the viewer as a floating point percentage when the linear equation is used. Past this distance, no objects can be seen.

0.7

Description:

Depth cueing fades objects into the background more if they are farther from the viewer. This enables objects closer to the viewer to be seen with more clarity, to hide distractions of objects farther away, and to give an impression of depth.

Depth cueing is disabled by default, but you can enable it by passing fast or nice as the type. fast looks good enough for most purposes, but nice is recommended for speed when using the software renderer on very complex datasets.

You can control both the style and degree of depth cueing by the equation and its parameters. The following equations determine the clarity of the object based on its distance from the viewer (z):

linear:

exp:

exp2:

In the following diagram, the vertical axis represents the clarity of the drawn objects, and the horizontal axis represents distance from the viewer (0=closer). The dashed line represents the linear function, the solid line represents the exp function, and the dotted line shows the exp2 function:

Using the linear equation and its start and end parameters, the depth cueing can be finely controlled. For a smoother look and simpler control, use either of the exponential equations, controlling the amount of cueing by the fade parameter. The exp2 equation gives a steeper, sigmoid-like slope and is the default equation.

Examples:

depthcue type=fast # enable depth cueing

depthcue equation=linear start=0.5 end=0.501

# sharply cut off everything halfway

depthcue equation=exp fade=1.5

# apply a little fade

depthcue equation=exp2 fade=5

# show only the closest objects

See Also:


Title | Previous | Next

MeshTV@viper.llnl.gov
Copyright © 1998, U.S. Department of Energy. All rights reserved.