Fit Lattice

by Mark Kingsnorth in Addons


Installation

  1. Go to Edit -> Preferences.
  2. Select the Add-ons tab on the left if it is not already.
  3. Select the Install... button along the top.
  4. This will open a file dialog where you should navigate to where you have downloaded the "Fit Lattice" zip file.  This file should not be unzipped.
  5. Then, click the "Install add-on from file" button.
  6. Search for the add-on by typing "Fit Lattice" in the search box if it does not already appear.
  7. Make sure the checkbox next to the Add-on (Mesh: Fit Lattice) is ticked.


For fit_lattice_presets.zip:

This is an optional step if you wish to load some pre-configured presets.

Depending on your operating system, navigate to one of the following directories.

  • If you are on Linux, navigate to ~/.config/blender
  • On a Mac: /Users//Library/Application Support/Blender/
  • If you are on Windows, navigate to: %APPDATA%\Blender Foundation\Blender

Once there you should see folder(s) corresponding to the version(s) you currently have, for instance the 4.0 folder.  Within that folder, go to scripts/presets/operator/ and create the folder mesh.fit_lattice. Unzip the contents of the .zip file to that location.

You should then be able to access a set of pre-configured presets when using the operator.  

IMPORTANT: When moving Blender versions, make sure you have backed up this directory as it contains any presets you have saved.

How it works

The add-on works out the size and position of the bounding box(es) of the object(s) you select and then creates a Blender lattice object that fits to that size.  It then adds a 'Lattice Modifier' to the original object (or objects), and then automatically links that modifier to the lattice object.

Use

Adding the Lattice:

Object Mode

  1. Select the object or objects (by pressing shift + click) you want to fit the lattice around.
  2. Either:
    • Go to Object -> Fit Lattice.
    • Right click in the viewport and select Fit Lattice -> Fit Lattice.
    • Access the tool by pressing F3 and then start to type Fit Lattice.
  3. The lattice object should appear around the object(s), ready for editing by pressing the tab key.

Edit Mode

  1. Enter edit mode (by selecting the object and pressing the Tab key) and select the faces/edges/vertices you with to manipulate.
  2. Either:
    • Go to Mesh-> Fit Lattice.
    • Right click in the viewport and select Fit Lattice -> Fit Lattice.
    • Access the tool by pressing F3 and then start to type Fit Lattice.
  3. The lattice object should appear around the object, ready for editing by pressing the tab key.

When the lattice object is first created, you can also configure the lattice object segments at the time through the side menu, described below.

Removing the Lattice:

To remove the Lattice including the associated modifier and vertex groups in one go:

  1. Select the lattice you want to remove
  2. Press F3 and search for the "Remove Fit Lattice" command.
  3. The lattice should be removed along with the modifier and vertex group.


Options

When you run Fit Lattice, a side menu will appear in the bottom left of the 3D viewport. Configure the lattice object being created by expanding the menu that appears:



Operator Presets

You can load, edit or save a selection of pre-prepared configurations.  Press the '+' and '-' keys to add or delete entries.

The presets contained in the fit_lattice_presets.zip file contain the following presets, although you can add more:

  • 2x2x2: a lattice split into 2x2x2 segments.
  • 3x3x3: a lattice split into 3x3x3 segments.
  • 4x4x4: a lattice split into 3x3x3 segments.

Lattice/Mesh:

Choose between creating a lattice (the default) or by creating a Mesh object with a Surface Deform modifier attached.

U, V, W:

These settings control the the subdivisions of the lattice in the x, y and z direction.

You can change the parameters of the Lattice or the Lattice modifier after it has been created.  See the Blender documentation for Lattices and the Blender Lattice Modifier.

Rotation:

The Rotation parameter allows you to set a rotation for the lattice, which will then shrink to wrap around the boundary of the object or sub selection.

Interpolation Type (Lattice mode):

You can choose how the deformation of the lattice affects the object:

  • Linear: This is the most basic form of interpolation, where the deformation between control points is calculated in a straight line. The result is a more rigid and less smooth transition. It's useful when you need precise control and less smoothing between points.
  • Cardinal and BSpline: These types introduce more smoothness into the deformation, with Cardinal providing a moderate level of smoothness and BSpline being even smoother. These methods use mathematical formulas to create a curve that passes near or through the control points, resulting in more natural and fluid transitions.
  • Catmull-Rom: This interpolation type provides a balance between smoothness and control, offering a smooth transition while still closely adhering to the path defined by the control points. It's useful for achieving organic deformations that need to closely follow the lattice structure.

Scale Mesh (Mesh mode):

In Mesh mode, this controls the relative scale of the generated surrounding mesh.  Sometimes, the Surface Deform modifier may not bind all the surrounding vertices.  Setting this Scale Mesh parameter to something slightly bigger to increase the size of the mesh reduces this effect.

Bind (Mesh mode):

Perform the Surface Deform modifier bind operation.  This can slow down Blender and make the application appear to temporarily freeze, and therefore is switched off by default.

Any Questions?

Do not hesitate to get in touch with me if you have a question, a new feature suggestion, or an image you'd like to share.  You can contact me by clicking the 'Ask a Question' button or by emailing [email protected].

Discord

Share your work and get support through the Configurate support channehere.

Choose a product version:

Sales 1500+
Customer Ratings 19
Average Rating
Dev Fund Contributor
Published over 5 years ago
Blender Version 4.1, 4.0, 3.6, 3.5, 3.4, 3.3, 3.2, 3.1, 3.0, 2.93, 2.92, 2.91, 2.9, 2.83, 2.82, 2.81, 2.8
License GPL
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message