Page MenuHome

Lattice - mesh outgrows lattice object when resolution is changed (U, V, W) in Lattice options after undo.
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 1660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.12

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-06 20:48, hash: rB85637311c28f
Worked: (optional)
I believe you can reproduce this in 2.80 but I'm not sure if it's because there is a problem on my system or not so I'm reporting this with 2.81 build only to be sure.

Short description of error
When lattice is on an object (lattice deform) which is made of multiple meshes (joined together ctrl+j), in edit mode lattice vertices adjusted to same shape and then the resolution on lattice is changed or the undo is used (undo definitely messes things up heavily and regularly, not sure if resolution change is just a result of undo or not - check the step 11. for details below in steps to reproduce please) the mesh outgrows the lattice bounds significantly (it stretches the part of meshes which are in bounds of lattice, the part of mesh outside is not stretched but still influenced by lattice to a small degree (deformed a bit). Changing (adding/reducing) the resolution in U (or V or I assume W too) messes up with the mesh inside lattice (sometimes the mesh changes it's entire scale to 1/4 of the entire lattice, sometimes it just grows out of bounds even more (there is about 1/3 of the entire mesh out of the lattice object in my example file).

If you select the mesh instead and enter edit mode, the mesh is back to it's scale (it behaves normally as if not influenced by lattice mode so the mesh itself seems to be fine), you can reset this lattice behaviour by changing resolution down to 1 and then go back to what you want but that resets all changes for lattice so you have to shape your lattice in edit mode again (and make sure you never change resolution or go back in history durign this process again).

(To be clear, undo definitely messes thigns up after you change the resolution or make changes to the lattice in edit mode - here I'm not sure how to 100% reproduce the problem other than the steps below with undo, without undo it's kind of random but it still might be connected to some undo operation which firstly didn't look like it made any problems which occured later.)

You can take this file to 2.80 and reproduce the same problem too.

In the attached file I used my work file where the first bug happened, I also added another large lattice with a cubes where I followed the steps below to showcase the problem better, I tried to search for this bug and discussed it with some other people as I'm still pretty new to Blender and I was told to try to report it so I hope it is a bug, if it's a feature then I'm sorry for opening this thread.

Screenshot to showcase how the meshes grew out of lattice bounds:

Exact steps for others to reproduce the error

  1. Add a cube, change the shape in edit/object mode (changing shape is not neccessary).
  2. Apply transformations if any.
  3. Add an array modifier, change count to 7 and relative offset in x direction to 1.1 (to have some space in between).
  4. Add another array modifier, change count to 5, x relative offset to 0, y relative offset to 1.1.
  5. Apply modifiers (and set origin to geometry if you want but it doesn't change anything).
  6. Add a lattice object and scale it up so your entire object you create in steps above is inside the lattice.
  7. Parent the object to lattice as lattice deform.
  8. Select lattice, set add resolution to U (4) and V (3), go to edit mode and make a few changes to the lattice shape (mesh should now properly change itself according to lattice)
  9. Change the resolution (U 4 -> 7).
  10. Use undo (ctrl + z), it should change how the mesh looks (make it smaller, larger, something. If it doesn't work for you try to first make a few changes to the lattice shape and then try ctrl + z (undo) again.

(11. Because I'm not sure if this is related to undo or not as when I was working I'm not sure which one triggered it and when I try it now undo definitely triggers it right away but I saw changes after adding resolution too but I can't say it's not related to some previous undo because sometimes undo doesn't make any changes other than it undos previous change but then a few lattice changes later I change resolution and it messes up the mesh again, undo is the most straightforward way to reach this but I can't tell if there is more or if it's all related to undo in edit mode of the lattice).