DirectX SDK

Clouds, Smoke, and Vapor Trails

Clouds, smoke, and vapor trails can all be created by an extension of the billboarding technique (see Billboarding). By rotating the billboard around two axes instead of one, your application can enable the viewer to look at a billboard from any angle. Typically, your application will rotate the billboard around the horizontal and vertical axes.

To make a simple cloud, your application can rotate a rectangular primitive around one or two axes so that it faces the viewer. A cloud-like texture can then be applied to the primitive with transparency. For details on applying transparent textures to primitives, see Texture Blending. The cloud can be animated by applying a series of textures over time.

Applications can create more complex clouds by forming them from a group of primitives. Each part of the cloud is a rectangular primitive. The primitives can be moved independently over time to give the appearance of a dynamic mist. This concept is illustrated in the following figure.

The appearance of smoke is displayed in a manner similar to clouds. It typically requires multiple billboards, like complex clouds. Smoke usually billows and rises over time, so the billboards that make up the smoke plume need to be moved accordingly. More billboards may need to be added as the plume rises and disperses.

A vapor trail is just a smoke plume that doesn't rise. However, like a smoke plume, it does disperse over time. The following figure illustrates the technique of using billboards to simulate a vapor trail.