[Maya] Modify Initial Lattice Points without Affecting the Deformed Object?

Hi,

Is there a way to modify the initial Lattice Points without Affecting the Deformed Object?

By default, when you creating a Lattice Deformer, it will confirm to a default world-axis bounding box figure.

You can see the illustration of the problem here (15 sec video):
https://www.dropbox.com/s/p73ot7ph02w2s76/mya079_modify_initial_ffd_to_match_deformed_object.mp4?dl=0

Regards,
Ben

When creating a lattice, you can set a custom matrix. So you can input your own. You just have to make sure you set the matrix of both the lattice and its base.

import pymel.core as pm

selection = pm.selected()
for mesh in selection:
    matrix = mesh.matrix.get()

    lat = pm.lattice(divisions=[2,2,2])
    for x in lat[1:]:
        x.setMatrix(matrix.matrix)
        x.scale.set(x.scale.get()*100) # the scale is just the conversion to meters, since my Maya is set to meters

I found this a really long time ago, which might also be of interest to you.

And if you want to make a “custom lattice”, have a look at Maya’s wrap deformer :slight_smile:

Hope that helps!

1 Like

If you select both the lattice and the base together you can translate, rotate and/or scale them to fit as you like.

1 Like

@Faranell @kavedawg

Apologies for the late response.
Thanks for the reference link and suggestion.
Both options are viable.