Stretch To constraint breaks scaling in Transform constraint #29940

Closed
opened 2012-01-20 22:40:54 +01:00 by Anna Celarek · 9 comments

%%%See attached file. Rotate Master2 (small bone on top) and watch how Child1 (left green bone) illegaly elongates.

Master2 (small bone on the top) is used to control Child1 (left green bone) as Transform source (1st) and StretchTo target (2nd).
The Transform constraint tansforms the X-rotation of Master2 to Z-scale of Child1. This works well as long as there is no StretchTo constraint below (or is turned off).
When there is a StretchTo, then the X rotation of Master2 causes a Y-scale of Child1 additionaly to the Z-scale. This Y-scale is not linear, it is stronger in the positive rotation direction.

I also tried to switch the constraints and put Transform after StretchTo, see Child2 (right green bone). Now the StretchTo loses its effect on Y-scale of Child2 completely (it behaves like TrackTo). This is somehow logical, as the Y-scale is set to 1 in the Transform constraint and apparently overrides any scaling caused by StretchTo.

But the other way around, with StretchTo after Transform, I see no reason why the Y-scale of Child1 should be affected by rotation of Master2.

Windows 7
2.61.0 r43212
2.61.3 r43565%%%

%%%See attached file. Rotate Master2 (small bone on top) and watch how Child1 (left green bone) illegaly elongates. Master2 (small bone on the top) is used to control Child1 (left green bone) as Transform source (1st) and StretchTo target (2nd). The Transform constraint tansforms the X-rotation of Master2 to Z-scale of Child1. This works well as long as there is no StretchTo constraint below (or is turned off). When there is a StretchTo, then the X rotation of Master2 causes a Y-scale of Child1 additionaly to the Z-scale. This Y-scale is not linear, it is stronger in the positive rotation direction. I also tried to switch the constraints and put Transform after StretchTo, see Child2 (right green bone). Now the StretchTo loses its effect on Y-scale of Child2 completely (it behaves like TrackTo). This is somehow logical, as the Y-scale is set to 1 in the Transform constraint and apparently overrides any scaling caused by StretchTo. But the other way around, with StretchTo after Transform, I see no reason why the Y-scale of Child1 should be affected by rotation of Master2. Windows 7 2.61.0 r43212 2.61.3 r43565%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%In fact, Transform is not involved in the problem – it’s only Strech To: you will have the same effect by disabling Transform, and scaling up/down along the bone Z axis…

The same goes with objects. I’ll try to have a look at the code, to see whether this is intended or really a bug.%%%

%%%In fact, Transform is not involved in the problem – it’s only Strech To: you will have the same effect by disabling Transform, and scaling up/down along the bone Z axis… The same goes with objects. I’ll try to have a look at the code, to see whether this is intended or really a bug.%%%

%%%Yeah, definitively think it was a bug.

Fixed in svn43578, thanks for reporting! :)%%%

%%%Yeah, definitively think it was a bug. Fixed in svn43578, thanks for reporting! :)%%%
Author

%%%Thanks! It also fixed another of my reported bugs btw. %%%

%%%Thanks! It also fixed another of my reported bugs btw. %%%

%%%The fix recently committed breaks other models. I use the popular "Sintel Lite" model for a number of things, but must scale her rig 5x to match other characters and props. The eyelid bones use StretchTo constraints to make a perfect rim of bones along the eyelids.

With the recent patch, the eyelid bones are 5x overlong. Similarly, scaling the armature to 0.2x original size, the eyelid bones have gaps.

There seems to be a bit of matrix stomping going on in this code. For armatures especially, StretchTo length must be considered in local space, not global space. Simply forcing or normalizing scale is not going to work well.%%%

%%%The fix recently committed breaks other models. I use the popular "Sintel Lite" model for a number of things, but must scale her rig 5x to match other characters and props. The eyelid bones use StretchTo constraints to make a perfect rim of bones along the eyelids. With the recent patch, the eyelid bones are 5x overlong. Similarly, scaling the armature to 0.2x original size, the eyelid bones have gaps. There seems to be a bit of matrix stomping going on in this code. For armatures especially, StretchTo length must be considered in local space, not global space. Simply forcing or normalizing scale is not going to work well.%%%

%%%Did you try with a build later than rev43662 ? My first fix for this bug was indeed wrong, but the new one should be good ([#29962]).

Previous behavior, as well as current one, is to make the bone/object insensible to scale along its Y axis (it’s just that previous code was wrong, making scaling completely unreliable with rotated objects).

Also, I see no stretch to constraint for eye lid bones, in this rig ?%%%

%%%Did you try with a build later than rev43662 ? My first fix for this bug was indeed wrong, but the new one should be good ([#29962]). Previous behavior, as well as current one, is to make the bone/object insensible to scale along its Y axis (it’s just that previous code was wrong, making scaling completely unreliable with rotated objects). Also, I see no stretch to constraint for eye lid bones, in this rig ?%%%

%%%
Bastien, thanks for the quick reply. I did fetch SVN again last night, and rebuilt when I saw your note. Sintel_Lite looks good at 5x and 0.2x now. I hope Anna Celarek above still finds success.

As for Sintel_Lite, the rig has a lot of hidden bones. It took me a while to find it, and there was a weight-painting error as well. (I am assuming it's all the same as Durian Sintel, but maybe it's been revised.) Enable the second to last armature layer, see bones like MCH-lid.009.%%%

%%% Bastien, thanks for the quick reply. I did fetch SVN again last night, and rebuilt when I saw your note. Sintel_Lite looks good at 5x and 0.2x now. I hope Anna Celarek above still finds success. As for Sintel_Lite, the rig has a lot of hidden bones. It took me a while to find it, and there was a weight-painting error as well. (I am assuming it's all the same as Durian Sintel, but maybe it's been revised.) Enable the second to last armature layer, see bones like MCH-lid.009.%%%

%%%Oki, good, then closing again :)

Sorry for that first buggy-fix.

And yes indeed, that’s a rig… Makes me feel small, small… ;)%%%

%%%Oki, good, then closing again :) Sorry for that first buggy-fix. And yes indeed, that’s a rig… Makes me feel small, small… ;)%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#29940
No description provided.