Getting Lattice points coordinates

The Lattice modifier is used to simplify the process of deforming high-poly meshes using simple wireframe objects with a few points – lattice. The lattice is superimposed on the mesh and associated with it, after which, by manipulating its point, we can deform the mesh itself. We can access the coordinates of the lattice points with the Blender Python API through its “points” property.

Let’s add a sphere to the scene (shift + a – Mesh – UV Sphere).

Next, add a lattice object (shift + a – Lattice) and increase its size so that it covers the entire sphere.

Append the Lattice modifier to the sphere. In the “Object” field of the modifier, set the previously added lattice object

Now we can access the lattice object from the UV Sphere mesh – the currently active object.

The list of points of the Lattice object can be obtained through its “points” property.

Walking through the list of the Lattice object points, we can get a list of their coordinates:

For exporting or another use.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Inline Feedbacks
View all comments