VR-Vantage 2.8 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
7.9 - Effects

Table of Contents

The DtEffectModel is used to display a variety of special effects in VR-Vantage, such as flames and track histories.

Effects come in three major types: ribbon and decal effects, particle effects, and animation effects. The type of effect is determined by the schema used for its model definition. The DtEffectModelInstance creates different types of geometry depending on the schema name and parameters provided.

7.9.1 Ribbon Effects

A ribbon effect is a flat "ribbon" that stretches out behind a moving scene object. It can be colored, textured, faded out, and moved, depending on the model definition schema used to define it. The OSG node classes in vrvOsg that inherit DtOsgRibbon are all implementations of ribbon effect variants. Ribbons are located in the scene graph under the effect root node and contain a reference to the scene object that owns them. At each frame, the ribbon finds the location of its scene object and extends itself, if necessary.

The most basic ribbon effect is the DtOsgTrackHistoryRibbon, which is a simple colored quad strip with a line along each edge. It is created for the ribbon model schema. Track history effects position and size themselves automatically according to the bounding box of the scene object that they are attached to. Therefore, it is important to add track history effects to a scene object after its main model is added. Track history ribbons have a maximum length parameter to prevent them from growing too large for fast-moving scene objects. Quads that are beyond this length are quickly faded out.

The DtOsgDecalRibbon is similar to the track history ribbon, with the addition of a texture. The width and relative position of a decal ribbon must be specified in its model definition, with the PointA/PointB parameters. If PointC/PointD are also specified, a DtOsgMultiRibbon is created instead, which is a composite of two decal ribbons. This technique is used, for example, to create the default missile trail effect. Like track history ribbons, decal ribbons use a maximum length to limit their size.

The most complex ribbon effect is the DtOsgParticleRibbon. Particle ribbons look similar to decal ribbons, with the addition of motion and lifetime-based fadeout. The ParticleVelocity parameter specifies the speed in meters per second at which each horizontal pair of points moves apart. The AlphaVelocity parameter sets the change in segment alpha per second, and thereby determines the time in seconds that it takes for a pair of points to fade out. The particle ribbon is used for the default wake effect, which spreads and fades out over time.

7.9.2 Particle Effects

VR-Vantage uses the osgParticle package to create particle effects. Each particle effect model instance has a particle emitter node that is added to the parent scene object, and a particle geometry node that is placed under the effects root. This allows the particles, once emitted, to move independently from their parent scene object. Particle effects are usually loaded from files. These files can be created programmatically or with an editor such as the Delta3D particle system editor. Particle effects use the effect schema.

7.9.3 Animated Effects

Animated effects are used by VR-Vantage to create particle-like effects with less use of resources. An animated effect is created by setting the filename parameter in an effect with the effect schema. This file is loaded at the location of the effect's parent scene object. Animated billboards are loaded as animated effects for default detonations.

[<< Props] [Home] [Top of Page] [Grid Lines >>]



Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)