Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lattice Deformer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Pin ups   Members   -  Reputation: 148

Like
0Likes
Like

Posted 30 July 2012 - 12:37 PM

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 ?

Sponsor:

#2 RobTheBloke   Crossbones+   -  Reputation: 2342

Like
0Likes
Like

Posted 02 August 2012 - 06:31 AM

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!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS