World-Space Modifiers
 
 
 

World space modifiers (WSM) affect objects in world space instead of in the object's local space like an ordinary modifier. A WSM is a combination of non-rendering object and modifier. A WSM affect other objects in the scene based on the position and orientation of the other objects that are bound to the object. For example, the Ripple Space Warp applies a sine wave deformation to objects bound to it. Other examples of WSMs include things like explosions, wind fields, and gravity.

The main difference between a regular object space modifier and a WSM modifier is that WSM modifiers usually have a reference to the WSM object's node and are applied after the object has been transformed into world space.

WSMs are created in the Creation branch of the command panel. WSMs can also affect particle systems. For example, a force field can be applied to a particle system by a space warp. The force field provides a function of position in space, velocity and time that gives a force. The force is then used to ompute an acceleration on a particle which modifies its velocity. A collision object can also be applied to a particle system by a space warp. The collision object checks a particle's position and velocity and determines if the particle will collide with it in the next period of time. If so, it modifies the position and velocity.

A WSM has two components: A WSM object and a WSM modifier. A WSM object is an object derived from WSMObject. It exists in the scene and can have modifiers (including other WSMs) applied to it. When an item is bound to a WSM object, a WSM modifier (derived from Modifier or WSModifier) is created and inserted in the object's history. A WSM object is like a derived object (IDerivedObject).

World space modifiers are very similar to regular object space modifiers -- in fact, they are derived from the same base class: Modifier. They are referenced from a modification context in the pipeline, but WSM modifiers aren't instanced. When a user binds more than one object to a WSM object at once, a unique WSM modifier is created for each object. This is done because a WSM modifier may contain parameters specific to that application of the modifier. For example, the Ripple world space modifier has a 'Flexibility' parameter which allows the affect of the Ripple to be scaled on a per application basis.

A WSM modifier references its corresponding WSM object's node so it can get the node's world space transformation matrix. It uses this matrix to transform the points of the object it is deforming into the space of the WSM object where it actually performs the deformation. After the deformation is applied, the points are transformed back to world space. This is similar to the way object space modifiers transform their points into the space defined by the ModContext transformation matrix -- however this space is defined by the WSM object's node. So in general, if an object's node is moved, the object appears to move through the deformation field defined by the WSM object it is bound to. If the WSM object moves, a similar effect is apparent. If an object and the WSM object it is bound to move together (if one is a child of the other, for example) then the affect appears to be more like an object space modifier.

There are two places where WSM user interface parameters can appear: