next up previous contents
Next: 5.8 Rendering Text Up: 5 Texture Mapping Previous: 5.6 Transparency Mapping and

5.7 Billboards

 

It is often desirable to replace intricate geometry with simpler texture mapped geometry to increase realism and performance. Billboarding is a technique in which complex objects such as trees are drawn with simple planar texture mapped geometry and the geometry is transformed to face the viewer. The transformation typically consists of a rotation to orient the object towards the viewer and a translation to place the object in the correct position . For the case of the tree, an object with roughly cylindrical symmetry, an axial rotation is used to rotate the geometry for the tree, typically a quadrilateral, about the axis running parallel to the tree trunk.

For the simple case of the viewer looking down the negative z-axis and the up vector equal to the positive y-axis, the angle of rotation can be determined by computing the eye vector from the model view matrix M
displaymath7561
and the rotation tex2html_wrap_inline7563 about the y axis is computed as
eqnarray656
where
eqnarray666

Once tex2html_wrap_inline7563 has been computed a rotation matrix R can be constructed for the rotation about the y-axis (tex2html_wrap_inline7573) and combined with the model view matrix as MR and used to transform the billboard geometry.

 

table853

To handle the more general case of an arbitrary billboard rotation axis, an intermediate alignment rotation A of the billboard axis into the tex2html_wrap_inline7573 axis is computed as
eqnarray681
and the matrix transformation is replaced with MAR. Note that the preceding calculations assume that the projection matrix contains no rotational component.

In addition to objects which are cylindrically symmetric, it is also useful to compute transformations for spherically symmetric objects such as smoke, clouds and bushes. Spherical symmetry allows billboards to rotate up and down as well as left and right, whereas cylindrical behavior only allows rotation to the left or right. Cylindrical behavior is suited to objects such as trees which should not bend backward as the viewer's altitude increases.

Objects which are spherically symmetric are rotated about a point to face the view and thus provide more freedom in computing the rotations. An additional alignment constraint can be used to resolve this freedom. For example, an alignment constraint which keeps the object oriented in a consistent fashion, such as upright. This constraint can be enforced in object coordinates when the objective is to maintain scene realism, perhaps to maintain the orientation of plume of smoke consistently with other objects in a scene. The constraint can also be enforced in eye coordinates which can be used to maintain alignment of an object relative to the screen, for example, keeping annotations such as text aligned horizontally on the screen.

The computations for the spherically symmetric case are a minor extension of the computations for the arbitrarily aligned cylindrical case. First an alignment transformation, A, is computed to rotate the alignment axis onto the up vector followed by a rotation about the up vector to align the face of the billboard with the eye vector. A is computed as
eqnarray693
where tex2html_wrap_inline7587 is the billboard alignment axis with the component in the direction of the eye direction vector removed
displaymath7589

A rotation about the up vector is then computed as for the cylindrical case.


next up previous contents
Next: 5.8 Rendering Text Up: 5 Texture Mapping Previous: 5.6 Transparency Mapping and

David Blythe
Thu Jul 17 21:24:28 PDT 1997