The design and implementation of an Open Source animation tool.

July 14, 2007

Geometric Transformations

There are two types of geometric transformation which you can apply to assets in a Moing scene:
  1. Uniform
    A subset of affine transformations, uniform transformations include translation, rotation, and uniform scaling. You don't get stretching, flipping, or skewing. These are usually controlled by manipulating the peg used to position the asset, and are rendered by applying an affine transformation to the asset as a whole. They are applied after any non-uniform transformations have been taken into account.
  2. Non-Uniform
    Everything you can't do with a uniform transformation: flipping, skewing, perspective transformations, and so on. Non-rigid and rigid-as-possible distortions fall into this category. They are generally controlled by manipulating additional pegs attached to the asset, parented to the asset's peg by default. Generically, they are rendered by dividing the asset into triangles, transforming the triangle mesh, and then rendering each triangle using the affine transformation relating the pre- and post-transformation triangles. More optimal rendering methods may be employed for particular combinations of asset type and transformation. They are applied before any uniform transformations are taken into account.
Both types of transformation can be applied to all asset types. If you want to distort an embedded video asset, go for it (I just won't promise fast rendering). It's also important to note that, for vector-based assets, apparent stroke width is not affected by either type of transformation.

1 comment:

mgsloan said...

We might treat uniform/non-uniform and their pegs as the same.

In the case of a single peg, it is like a uniform transformation. As soon as multiple (sibling?) pegs are involved in a group, the deformation becomes non-uniform.

Perhaps this depends on the animation types - whether pegs may be rotated (or should we use two for situations like this?), and whether one peg will produce a uniform transformation. I think it should, really.