next up previous
Next: Phase Functions Up: A Flexible Framework Previous: Density Functions

Transfer Functions

Transfer functions in our framework use color-maps as well as special algorithms like iso-surface or region boundary algorithms to map scalar density values to renderable properties. Again, only a single interface function is needed - $getColor(X)$, which returns a color for each point $X$ in space, using the underlying density function. In order to combine different transfer functions, 2 additional functions, taking transfer functions as arguments and presenting themselves again as transfer functions, are used. The first transfer-function-combination-function is called $GeneralTransfer$. It is quite powerful and allows for the combination of an arbitrary number of transfer functions with associated weights. The values at each point $X$ are scaled by their associated weight and then summed up. The result is a new transfer function which is a weighted sum of other transfer functions:

\begin{displaymath}
GeneralTransfer.getColor(X) =
\sum_{i=1}^n{w_i (f_i.getColor(X))}
\end{displaymath}

where $w_i$ is the weight associated with the i-th density function and $f_i$ is the i-th transfer function. The second functions is called $MappedTransfer$ and allows for the selection of a single transfer function out of a set of transfer functions, depending on the value of a density function. This sounds quite complicated, so here is an example: if a density function $cloud$ is used to model a cloud, then perhaps it would be a nice effect to use different emission or scattering functions for the cloud depending on the density at a point $X$. MappedTransfer functions are defined similar to color maps. Given a density function $d(X)$ and a number of $(density_i, transferfunction_i)$-pairs, the mapped transfer functions return an interpolated color value:

\begin{displaymath}
MappedTransfer_{d(X)=d_i}(X) = color_i
\end{displaymath}

or, for in-between values, colors are again linearly interpolated:

\begin{displaymath}
MappedTransfer_{d_i < d(X) < d_{i+1}}(X) =
\frac{d_{i+1}-...
...1}-d_i}color_i +
\frac{d(X) - d_i}{d_{i+1}-d_i} color_{i+1}
\end{displaymath}


next up previous
Next: Phase Functions Up: A Flexible Framework Previous: Density Functions

2000-04-06