Page MenuHome

Modifier must be applied after posing
Closed, ArchivedPublic

Description

If an armature modifier is added to a mesh object, bones can deform the mesh. As the result of the deformation depends on the position of the mesh object, that position must be computed first. If a bone of an armature is the parent of a mesh object, the pose of the armature influences the position of the mesh object. Consequently, the posing of the armature must be performed _before_ the deformation can be computed. Currently, Blender deforms the mesh object before any posing has been applied, but as posing changes the position of the mesh object, this is not correct.

In the simple file attached, just rotate the single bone in pose mode and watch the deformation of the sphere. The sphere is deformed as if it kept it's position, but actually it has been moved. That motion due to posing must be taken into account before deformation is applied - or maybe modifiers in general are applied. The expected result is that the sphere is not deformed.

Blender 2.64
Win7/64

Event Timeline

Willi (willi) edited a custom field.Dec 4 2012, 7:45 PM
Willi (willi) attached 1 file(s): F24340: Test4.blend.

This isnt a bug, at least the way you're scene is setup just isn't supported (in the way you are expecting).

for useful results you'll typically want to use either 'modifier only' or 'bone parent only', not both.



Campbell Barton (campbellbarton) changed the task status from Unknown Status to Archived.Dec 4 2012, 8:46 PM

An object can not be at two locations at a time. At one location it is deformed, and at the other location we see it. This does not make sense, and it is contradictional behavior. That's why it is a bug, not only "not supported".

I don't think this is an issue in the order of operations, the object's transformation is always computed before its modifiers. Try this: rotate the bone, then clear the mesh parent and keep transform. Note how the result is still the same.

In this setup you're basically rotating the mesh twice with the same bone, once through parent, and once though the modifier. That doesn't really make sense, you need to pick one or the other.

The way armature deform works is that if the bone was rotated X degrees from its rest position, it will apply an X degree rotation to the mesh regardless of how that mesh is positioned w.r.t. to the bone. Since you are using bone envelopes however, the mesh position relative to the armature does affect which vertices are deformed and by how much, and this is in fact being computed in the right order as far as I can tell.

I would not consider this a bug.

"...the object's transformation is always computed before its modifiers."

Unfortunately, not completely. Posing also influences the position, and this part of the transformation seems to be ignored before deformation. Though I will check what you wrote again.

"In this setup you're basically rotating the mesh twice with the same bone, once through parent, and once though the modifier."

No, the modifier does not rotate the object.

In any case, as long as the actual (spatial/rotational) relation between the mesh and the deforming bone does not change, the mesh must not be deformed. And it does not change, though it deformed.

I've attached another, maybe more speaking example (test5.blend) than the abstract first one: Just rotate the right lower leg (the bone called "Unterschenkel.R"). You will see the right foot gets deformed. This should not happen. It is only deformed by the front bone of the foot (named "Fuss.R.Vorne"), and that is intended. Just by rotating the lower leg, the foot must not be deformed. The back foot bone (called Fuss.R.Hinten) is the parent of the foot, but that's how it is to be.

(I've checked the issue several times before posting a bug report; I'm a programmer, (too))

I'm sorry, I can't attach the mentioned test5.blend because, after uploading, I get the error "missing parameters". When I try again, i get "error - double submit". I'll try again later.

Attaching another file doesn't work. You can download it from here instead:
http://www.file-upload.net/download-6888739/Test5.blend.html

In the attached example Foot.R is not parented to any object? It has an armature modifier, which incorrectly has Bone Envelopes enabled. This is not needed because the mesh already has vertex weights, after disabling this the deformation it seems to work fine. (In Blender 2.65 we disabled Bone Envelops by default because they can be confusing)

"In any case, as long as the actual (spatial/rotational) relation between the mesh and the deforming bone does not change, the mesh must not be deformed. And it does not change, though it deformed."

If we forget about bone envelopes for a moment, then the spatial/rotational relation between the mesh and bone does not influence how much the armature will deform the mesh. The armature modifier doesn't know or care, and there also wouldn't be any good way for the armature modifier to even know how a bone is aligned to a bunch of vertices which have no intrinsic rotation.

I can understand there may be a use case where you want a parent bone to affect the object transformation and its child bones the mesh vertices. But it's not going to work this way, I think what you'd want then is a way to specify in the armature modifier a bone from which only the children deform the mesh.

As I respect this place to report bugs and not as a discussion forum in general, I finally only provide the link to the discussion that started before reporting the issue: (maybe it will continue there)
http://blenderartists.org/forum/showthread.php?274068-Unexplainable-deformation

Thanks guys for all your work!
(though I consider it a bug...)