Copy Rotation Constraint unexpectedly have numerical instability #102679

Closed
opened 2022-11-22 04:46:10 +01:00 by Carlo Andreacchio · 12 comments

Simplified Report

  • Add a reference object with rotation (X: 91, Y: 0, Z: 180).
  • Add an object with a Copy Rotation Constraint with the reference object as a target, constraint to the Z component.
  • Rotate the reference object very slightly along the Z axis.
  • Notice how it is unstable and inverts itself.
  • The copying happens from the global space to the global space, so such numerical instability in unexpected.

incorrectCopyRotationConstraint.blend

Original Report

System Information
Operating system: Windows 10, x64
Graphics card: GTX 1080

Blender Version
Broken: e05e1e3691, cac3e16cfb, 0759f671ce

Short description of error
Copy rotation from camera is inconsistant

Exact steps for others to reproduce the error

  1. Open attached blend file
  2. Press play
  3. Notice how the arrow, flips 180 degrees
  4. change teh target from asdfasd to Text.001
  5. notice how the arrow now is normal

Text.001 and asdfasd have linked animation, so they should essentially be the same.
constraintBug_v001.blend

## Simplified Report - Add a reference object with rotation (X: 91, Y: 0, Z: 180). - Add an object with a Copy Rotation Constraint with the reference object as a target, constraint to the Z component. - Rotate the reference object very slightly along the Z axis. - Notice how it is unstable and inverts itself. - The copying happens from the global space to the global space, so such numerical instability in unexpected. [incorrectCopyRotationConstraint.blend](https://archive.blender.org/developer/F13960400/incorrectCopyRotationConstraint.blend) ## Original Report **System Information** Operating system: Windows 10, x64 Graphics card: GTX 1080 **Blender Version** Broken: e05e1e3691, cac3e16cfb, 0759f671ce **Short description of error** Copy rotation from camera is inconsistant **Exact steps for others to reproduce the error** 1. Open attached blend file 2. Press play 3. Notice how the arrow, flips 180 degrees 4. change teh target from asdfasd to Text.001 5. notice how the arrow now is normal Text.001 and asdfasd have linked animation, so they should essentially be the same. [constraintBug_v001.blend](https://archive.blender.org/developer/F13958508/constraintBug_v001.blend)

Added subscriber: @candreacchio

Added subscriber: @candreacchio
Carlo Andreacchio changed title from Blender 3.2.1 - Copy Rotation from Camera inconsistant to Blender 3.2.1 - Copy Rotation Constraint from Camera inconsistant 2022-11-22 04:46:34 +01:00
Omar Emara changed title from Blender 3.2.1 - Copy Rotation Constraint from Camera inconsistant to Copy Rotation Constraint unexpectedly have numerical instability 2022-11-22 13:42:23 +01:00
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Thanks for the extra reference of this happening.

Whats even crazier, is with your extra file, if you select suzanne (that has the constraint). and then set the rotation to 4 degrees on the z axis... then it will invert.

Thanks for the extra reference of this happening. Whats even crazier, is with your extra file, if you select suzanne (that has the constraint). and then set the rotation to 4 degrees on the z axis... then it will invert.

Added subscriber: @ChrisLend

Added subscriber: @ChrisLend

Can confirm, there seems to be an edge case.
I'd assume it is euler locking but none of the rotation order options seem to do anything

Edit: On the other hand, this might be working as intended
it is a bit clearer when you switch the cube with a suzanne like in this file
incorrectCopyRotationConstraint.blend

Can confirm, there seems to be an edge case. I'd assume it is euler locking but none of the rotation order options seem to do anything Edit: On the other hand, this might be working as intended it is a bit clearer when you switch the cube with a suzanne like in this file [incorrectCopyRotationConstraint.blend](https://archive.blender.org/developer/F13962776/incorrectCopyRotationConstraint.blend)

potential duplicate: https://developer.blender.org/T79118
not closing because I am not 100% sure

potential duplicate: https://developer.blender.org/T79118 not closing because I am not 100% sure

My original report is not the same, if you follow my instructions, it works correctly if it copies off a mesh, but not correctly if its copied off a camera (same animation)

My original report is not the same, if you follow my instructions, it works correctly if it copies off a mesh, but not correctly if its copied off a camera (same animation)

sorry it makes no difference if the constraint points at the camera or not
the difference is that the rotation values between the two are different
camera: (91.1, -0.00..., z-animated)
text: (0,0, z-animated)

if you set the text to the same values you get the same result

sorry it makes no difference if the constraint points at the camera or not the difference is that the rotation values between the two are different camera: (91.1, -0.00..., z-animated) text: (0,0, z-animated) if you set the text to the same values you get the same result

I understand that yes your example doesnt matter if its on the camera or not. but my original report does not, which is the bug I am reporting.

I have copied pasted my example below for convience.

Exact steps for others to reproduce the error

  1. Open attached blend file
  2. Press play
  3. Notice how the arrow, flips 180 degrees
  4. change teh target from asdfasd to Text.001
  5. notice how the arrow now is normal

Text.001 and asdfasd have linked animation, so they should essentially be the same.
constraintBug_v001.blend

If the target is a mesh, it works fine. If the target is a camera, it does not. This is not the same as your report as your report doesn't matter if its a camera or not.

I understand that yes your example doesnt matter if its on the camera or not. but my original report does not, which is the bug I am reporting. I have copied pasted my example below for convience. **Exact steps for others to reproduce the error** 1. Open attached blend file 2. Press play 3. Notice how the arrow, flips 180 degrees 4. change teh target from asdfasd to Text.001 5. notice how the arrow now is normal Text.001 and asdfasd have linked animation, so they should essentially be the same. [constraintBug_v001.blend](https://archive.blender.org/developer/F13958508/constraintBug_v001.blend) If the target is a mesh, it works fine. If the target is a camera, it does not. This is not the same as your report as your report doesn't matter if its a camera or not.

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

In #102679#1451051, @candreacchio wrote:
I understand that yes your example doesnt matter if its on the camera or not. but my original report does not, which is the bug I am reporting.
[...]
If the target is a mesh, it works fine. If the target is a camera, it does not. This is not the same as your report as your report doesn't matter if its a camera or not.

@ChrisLend is right, though. The mesh object in your example file has a different rotation than the camera object, and thus the conclusion that the observed diffference must be caused by the object type (camera vs. mesh) unfounded. The difference in rotation is what matters here. Having a rotation such that one axis is (almost) mapped onto another (such as having X-rotation of 91°) is known to cause problems: Gimbal Lock.

I see this as a duplicate of #79118 indeed, in the sense that it is also caused by gimbal lock, and thus expected mathematical instability.

> In #102679#1451051, @candreacchio wrote: > I understand that yes your example doesnt matter if its on the camera or not. but my original report does not, which is the bug I am reporting. > [...] > If the target is a mesh, it works fine. If the target is a camera, it does not. This is not the same as your report as your report doesn't matter if its a camera or not. @ChrisLend is right, though. The mesh object in your example file has a different rotation than the camera object, and thus the conclusion that the observed diffference must be caused by the object type (camera vs. mesh) unfounded. The difference in rotation is what matters here. Having a rotation such that one axis is (almost) mapped onto another (such as having X-rotation of 91°) is known to cause problems: [Gimbal Lock](https://en.wikipedia.org/wiki/Gimbal_lock). I see this as a duplicate of #79118 indeed, in the sense that it is also caused by gimbal lock, and thus expected mathematical instability.

Closed as duplicate of #79118

Closed as duplicate of #79118
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
4 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#102679
No description provided.