Lattice Deformer

Started by
0 comments, last by RobTheBloke 11 years, 8 months ago
Hello,

I have been turning over the concepts of lattice deformers, with a little glass of Vodka and have been musing a while turning the ideas over and kind of thinking them through.

So, from what I understand, a lattice deformer changes the coordinate system of the local geometry, i.e changes the volume of the local coordinate system and the lattice dictates the shape of the coordinate space.

And when a deformer is applied to an object that exists in model space some type of process is applied to the objects in order to translate relative coordinate space from the lattice volume to model space. Model space being projected into World space.

Or are we talking, deforming world space ?

So, the question is : how accurate is my understanding, is this about right or not quite so right ?

And, would it be possible to create a lattice deformer within Direct X ?
Advertisement
You define an undeformed volume in space, usually box shaped (although it can be any volume shape that you can parameterise, eg a cone, cylinder, etc). Using a box shape is easiest so it's best to start there. If you define the box using nothing but a transform matrix (using scale to denote the size, and the box will be centered at [box.pos + box.xAxis/2 + box.yAxis/2 + box.zAxis/2]). Invert the transform, and then multiply all vertices by it. If each of the vertex components are within the range 0 -> 1 (i.e. x,y,z are contained within the box), then plug the value into the parametric equations for the deformed lattice. The result is your new point location.

Performing an FFD on the CPU is fairly straightforward, if a little slow. You may be able to move the computation to the GPU, although vertex normals may be fun to compute!

This topic is closed to new replies.

Advertisement