Sign in to follow this  

Lattice Deformer

Recommended Posts


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 ?

Share this post

Link to post
Share on other sites
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!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this