Lattice with Armature modifier not updating correctly
Open, ConfirmedPublic

Description

This happen in 2.79 and master ... I'm 90% sure is only happens with the New Depsgraph.

I'm attaching a blend file which contains part of the rig of Spring.

What happens is that when you rotate or move the bone head_def_3, the lattice starts jumping around. This seems to happen only if the if the armature that deforms the lattice is actively deforming it, it doesn't happen if the armature is in rest pose.

Ok, so now I'll describe the setup.

You have 3 objects:

  1. RIG-Spring
  2. side_hair_rig
  3. LATTICE_SIDE_HAIR_L

So, the lattice is deformed by "side_hair_rig" with an armature modifier, and both objects are parented to the "head_def_3" bone in the Rig-Spring object. When you manipulate head_def_3, the lattices jumps around. In other words, the problem seems to occur when you manipulate the parent rig, not if you directly manipulate the deformation rig.

Details

Type
Bug
Philipp Oeser (lichtwerk) triaged this task as Confirmed priority.Tue, Apr 17, 1:41 PM

I can only get it to fail with new depsgraph.

Not sure it helps (and if the order of logging is reliable), but here is an output of two jumping frames with --debug-depsgraph:

deg_evaluate_on_refresh: layers:5120, graph->layers:5120
BKE_animsys_eval_animdata on OBRIG-Spring (0x7fd15bba9208) at time 4.000000
BKE_animsys_eval_animdata on OBside_hair_rig (0x7fd15bba9808) at time 4.000000
BKE_pose_eval_init on OBRIG-Spring (0x7fd15bba9208)
BKE_pose_eval_init_ik on OBRIG-Spring (0x7fd15bba9208)
BKE_pose_eval_bone on OBRIG-Spring (0x7fd15bba9208) pchan head_def_3 (0x7fd153ebfc88)
BKE_pose_bone_done on head_def_3 (0x7fd153ebfc88)
BKE_object_eval_local_transform on OBLATTICE_SIDE_HAIR_L (0x7fd15bba8c08)
BKE_pose_eval_flush on OBRIG-Spring (0x7fd15bba9208)
BKE_object_eval_local_transform on OBside_hair_rig (0x7fd15bba9808)
BKE_object_eval_parent on OBside_hair_rig (0x7fd15bba9808)
BKE_object_eval_done on OBside_hair_rig (0x7fd15bba9808)
BKE_object_eval_uber_data on OBLATTICE_SIDE_HAIR_L (0x7fd15bba8c08)
recalcdata LATTICE_SIDE_HAIR_L
BKE_object_eval_parent on OBLATTICE_SIDE_HAIR_L (0x7fd15bba8c08)
BKE_object_eval_done on OBLATTICE_SIDE_HAIR_L (0x7fd15bba8c08)
Depsgraph updated in 0.000539 seconds.

then the next:

deg_evaluate_on_refresh: layers:5120, graph->layers:5120
BKE_animsys_eval_animdata on OBside_hair_rig (0x7fd15bba9808) at time 5.000000
BKE_animsys_eval_animdata on OBRIG-Spring (0x7fd15bba9208) at time 5.000000
BKE_pose_eval_init on OBRIG-Spring (0x7fd15bba9208)
BKE_pose_eval_init_ik on OBRIG-Spring (0x7fd15bba9208)
BKE_pose_eval_bone on OBRIG-Spring (0x7fd15bba9208) pchan head_def_3 (0x7fd153ebfc88)
BKE_pose_bone_done on head_def_3 (0x7fd153ebfc88)
BKE_object_eval_local_transform on OBside_hair_rig (0x7fd15bba9808)
BKE_pose_eval_flush on OBRIG-Spring (0x7fd15bba9208)
BKE_object_eval_local_transform on OBLATTICE_SIDE_HAIR_L (0x7fd15bba8c08)
BKE_object_eval_parent on OBLATTICE_SIDE_HAIR_L (0x7fd15bba8c08)
BKE_object_eval_done on OBLATTICE_SIDE_HAIR_L (0x7fd15bba8c08)
BKE_object_eval_parent on OBside_hair_rig (0x7fd15bba9808)
BKE_object_eval_done on OBside_hair_rig (0x7fd15bba9808)
BKE_object_eval_uber_data on OBLATTICE_SIDE_HAIR_L (0x7fd15bba8c08)
recalcdata LATTICE_SIDE_HAIR_L
Depsgraph updated in 0.000568 seconds.

notice how recalcdata LATTICE_SIDE_HAIR_L is not last in one occasion?