This is a tutorial to show how to use lattice. Home address for
source code of meditor is:
Lattice is a effector, i.e., it is an object but it is not
a scene object, it does not appear on rendered scene. This object allows
to apply deformations on meshes. The basic idea is that to deform meshes
but if the lattice has a child object, i.e., the relationship parent/child
is necessary to know what meshes will follow deformation of parent lattice.
Lattice appears as a box shaped mesh with points connected and it defines
a box shaped volume initialy. In order to deform any mesh, the lattice should
be changed. Deformations are computed from default shape of lattice to currently
deformed shape. In order to know how to apply this deformations on meshes,
all vertices in meshes are checked using non deformed lattice. If one vertex
is inside one "cell" of the lattice, and this cell is changed, same change
is applied on that vertex. If one changes the relationship parent/child for
lattice and meshes, this will disable deformation and so the meshes should
appear as undeformed.
Lattice is expected to work for animation. I mean,
this effector will work if one created a lattice and deform it in different
time frames. Next image indicates in command window, the button to create
Please, notice it is a box shaped object. The lattice can
have more points if one subdivides it using 'z' command. One could also
control how many divisions in proper lattice command window.
This is a particular object which needs to have a relationship
with child objects, so the child meshes will follow parent object deformation.
This relation ship should be created in control window as indicated in next
image. One should push lattice and so apply the 'parent' command. Next one
should unselect all and select the child mesh and apply 'child' command.
This creates relationship called parent/child for lattice. This also can
be used among meshes but one MUST void ring like connections because this
is a endless loop, i.e., -don't- connect one child to a parent in one already
connected sequence. This is commonly used to apply same changes using parent
references to child meshes. Just imagine to create a leg composed by 3 parts
(foot+limb+thigh) but foot motion is child of limb and lib is child of thigh.
Once one move/rotate thigh, children will follow and apply same motion to
its own child.
I created a box shaped mesh in layer 0 and I subdivided
it using 'z' command. Main window should look as next image in layer 0.
I also created a box in layer 10 to be the 'child' object.
I can access both using actors window in layer 10. If I need to select different
objects, I can push 'update list' to get whole list and updated one. That
list is not updated automaticaly so one -must- use 'update list' button. That
list can be selected using mouse and that list allows to have several or
none selected object as indicated in next image.
If I click left hand side mouse button on lattice in listbox,
that should look as next image.
If one selected mesh object in list, the command window
should look as next image.
If I return to layer 10 ('F9') I can see both objects as
next image. Please, notice I also selected points of mesh.
I used the right arrow key to create a new time frame as
indicated in next image.
I move those selected points upwards for lattice, so this
is a deformation created in frame 2. That should look as next image.
I created a 3rd frame and I deformed again the lattice.
The main window should looks as next image.
I returned to first frame using left arrow key. I have
a time sequence of frames and I also have objects and I create parent/child
relationship. That is not indicated so one must believe me. Next image shows
first frame so both objects are undeformed yet.
If I move to next time frame using right arrow key, the
mesh is deformed trying to follow deformation of lattice. One should notice,
the lattice could have a low number of divisions but mesh could have more
points but this is a simple example. One should notice, deformation was
only applied after one used left/right arrow key, i.e., changed time frame.
If one has parent/child relation ship and want to see deformation produced
by lattice, one can use '\' key to compute changes directly.
Lattice is a very interesting object because one can delete
parent/child relationship and after re-computation of time frame, all meshes
will return to default shape if no deformation were applied directly to
meshes, i.e., this is a 'non-destrutive' deformation, i.e., it preserves
the original object. One should also notice, this can be also used to control
face changes or even a fish like motion. One should also notice, duplication
service will act over deformed mesh, so once duplicated, the new created
mesh will not recover deformation and it is not a child of same parent lattice.
That is all folks!