Introduction to Dynamic Effects (EN)
(страница из оригинальной справки. NDL Gamebryo 1.1)
(страница из оригинальной справки. MaxImmerse.chm )
Dynamic Multi-Texturing in MaxImmerse: An Introduction
The dynamic texture effects supported by MaxImmerse include projected light maps, projected shadow maps, and environment maps. Each of these effects is specified by a light in Max since, just as with normal lights, dynamic texture effects are applied to the whole scene unless an "Include" list is used to limit which parts of the scene are affected. Each Max light can only be converted into one NetImmerse light or dynamic effect. In other words, a Max light is converted to either a NetImmerse light, a projected light map, a projected dark map, or an environment map, never more than one. To create both a normal light and a dynamic texture effect, two Max lights will be needed (one for each).
Unlike static textures, dynamic multi-textures do not take their texture coordinates directly from the objects to which they are applied. Dynamic multi-textures work by computing their texture coordinates on-the-fly by transforming and/or projecting either the object’s vertex positions or surface normal vectors. As a result, dynamic multi-textures can be more expensive than static multi-textures, but the effects tend to be more dramatic.
Like static multi-textures, there are several basic types of dynamic multi-texture, and each dynamic multi-texture has settings that control its coordinate clamping and texture filtering. Also, there are settings that determine how the texture coordinates are generated. The NetImmerse interfaces place no limits on the number of dynamic multi-textures that may be applied to an object, although performance issues or renderer limitations may do so.
Introduction to Dynamic Effects
NiDynamicEffect objects represent localized and global visual phenomena such as lighting, fogging, reflection, and shadowing. NiDynamicEffect objects represent both the geometry and the scope of effect. As a subclass of NiAVObject, these effect objects reside in the scene graph in order to localize and orient them in the game world. As will be seen, NiDynamicEffect objects also have a unique connection to other scene graph objects as well – scoping. Scoping is the binding between a dynamic effect and the sections of the scene graph it affects.
Transforms
In order to allow effects to be "attached" to objects in the scene and to move with those objects, the NiDynamicEffect class is a subclass of NiAVObject. The position and orientation of an effect is specified in the NiDynamicEffect object's model coordinate system. Thus, an effect's position and orientation are transformed by its model-to-world transformation.
Scoping
An NiDynamicEffect object's "scope", or the sections of the scene graph that it affects are completely independent of the effect's parent-child relationship. They are capable of affecting any set of subtrees in a scene graph, even the subtree that contains the effect itself. Objects that are to be affected by a dynamic effect are registered with that effect using the AttachAffectedNode method. This method causes the effect to affect the entire subtree rooted at the given object. This complete independence of effect positioning and scoping is important to avoid "overloading" the concept of parent-child in the scene graph. Any number of objects may be added to an effect's scope (or affected object) list.