'Copy Rotation' constraint computes the axis rotation value that should not be modified (like the Z axis when you only specify the X and Y) #117579

Open
opened 2024-01-27 22:35:15 +01:00 by Phil Stopford · 5 comments

System Information
Operating system: Linux-6.7.1-arch1-1-x86_64-with-glibc2.38 64 Bits, WAYLAND UI
Graphics card: AMD Radeon Graphics (radeonsi, renoir, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1) AMD 4.6 (Core Profile) Mesa 23.3.4-arch1.2

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b727
Worked: tested down to 2.93 and the bug is still there.

Short description of error
If the 'Copy Rotation' constraint is only set to copy the X and Y axis from the 'Target' object, depending on the original rotation of the original object, sometimes the Euler Z rotation may be -180 degrees instead of the original 0 degrees .

Since 'Copy Rotation' is ignoring Z rotation, if the constraint changes the Z rotation, the other axis are misaligned.

Ideally, this -180 degrees value should not be computed, since 0 degrees is the original Z value and should not be modified.

Exact steps for others to reproduce the error

  • Load the attached copy_rotation__bug.blend file
  • scrub the Euler Y value of the 'Transfer' Object in the Transform panel

Note that sometimes the calculated Z value remains 0 degrees and the axes remain aligned, but other times it changes to 180 degrees, misaligning the axes.


Notes:
This bug was originally identified in copy_rotation_oddness.blend
In this .blend file, we have a 'Driver' object that is intended to be rotated in X and Z. The 'Driver' object is an empty with a delta rotation in X of 90 degrees so that the circle lies in the right plane for the user to work with.
The 'Transfer' object has a driver on its Y rotation that comes from the 'Rotation' empty. It has a constraint applied to 'Copy Rotation' from the 'Driver' object. It also has a delta rotation of 90 degrees in the X channel to make the circle appear correctly in the viewport.
If the 'Copy Rotation' is only set to copy the X and Y rotations from the 'Driver' object, quirks appear at certain frames (e.g. 125) compared to other frames. The inconsistencies are not seen if all rotations are copied, or if "Offset (Legacy)" is used.

Removing the delta transform on the driver object removes the issue.

**System Information** Operating system: Linux-6.7.1-arch1-1-x86_64-with-glibc2.38 64 Bits, WAYLAND UI Graphics card: AMD Radeon Graphics (radeonsi, renoir, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1) AMD 4.6 (Core Profile) Mesa 23.3.4-arch1.2 **Blender Version** Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727` Worked: tested down to 2.93 and the bug is still there. **Short description of error** If the 'Copy Rotation' constraint is only set to copy the X and Y axis from the 'Target' object, depending on the original rotation of the original object, sometimes the Euler Z rotation may be -180 degrees instead of the original 0 degrees . Since 'Copy Rotation' is ignoring Z rotation, if the constraint changes the Z rotation, the other axis are misaligned. Ideally, this -180 degrees value should not be computed, since 0 degrees is the original Z value and should not be modified. **Exact steps for others to reproduce the error** - Load the attached [copy_rotation__bug.blend](attachments/031c0896-5321-4fc7-aed3-b9e3d59adfb8) file - scrub the Euler Y value of the 'Transfer' Object in the Transform panel Note that sometimes the calculated Z value remains 0 degrees and the axes remain aligned, but other times it changes to 180 degrees, misaligning the axes. --- Notes: This bug was originally identified in [copy_rotation_oddness.blend](attachments/204704fa-12f9-45ce-9b6d-58da9fc0e068) In this .blend file, we have a 'Driver' object that is intended to be rotated in X and Z. The 'Driver' object is an empty with a delta rotation in X of 90 degrees so that the circle lies in the right plane for the user to work with. The 'Transfer' object has a driver on its Y rotation that comes from the 'Rotation' empty. It has a constraint applied to 'Copy Rotation' from the 'Driver' object. It also has a delta rotation of 90 degrees in the X channel to make the circle appear correctly in the viewport. If the 'Copy Rotation' is only set to copy the X and Y rotations from the 'Driver' object, quirks appear at certain frames (e.g. 125) compared to other frames. The inconsistencies are not seen if all rotations are copied, or if "Offset (Legacy)" is used. Removing the delta transform on the driver object removes the issue.
Phil Stopford added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-01-27 22:35:16 +01:00
Member

Thanks for the report. Can confirm. Seems related to the euler rotation order.

Thanks for the report. Can confirm. Seems related to the euler rotation order.
Pratik Borhade added
Module
Modeling
Status
Confirmed
and removed
Status
Needs Triage
labels 2024-01-30 10:58:16 +01:00
Author

@PratikPB2123 : I'm curious about the modeling module being set here and wanted to check in case this was a mistake.

@PratikPB2123 : I'm curious about the modeling module being set here and wanted to check in case this was a mistake.
Iliya Katushenock added
Module
Animation & Rigging
and removed
Module
Modeling
labels 2024-02-17 20:47:23 +01:00
Member

Hi, this is mostly related to transform code As far as I understand.
cc @mano-wii

Hi, this is mostly related to transform code As far as I understand. cc @mano-wii
Germano Cavalcante changed title from 'Copy Rotation' modifier acts oddly if the Z rotation is not copied in this test case to 'Copy Rotation' constraint computes the axis rotation value that should not be modified (like the Z axis when you only specify the X and Y) 2024-02-19 15:03:54 +01:00

I simplified the file and could better understand the problem.

The problem happens when you set only 2 axes to copy in the contraint 'Copy Rotation' (in this case: X and Y).

The 'Copy Rotation' contraint first calculates an XYZ Euler rotation that aligns the 3 axes.
Sometimes it calculates a rotation whose Z value is 0 degrees, matching the target object.
Other times it calculates rotation values where the Z axis is -180 degrees.

When the calculated Z axis does not correspond to the original value, the axis will become misaligned as the constraint only applies to the X and Y axes.

I edited the description and added a simplified file to better describe the problem.

As this only involves Contraints, it is something else for the Animation & Rigging team to investigate.

copy_rotation__bug.blend

I simplified the file and could better understand the problem. The problem happens when you set only 2 axes to copy in the contraint 'Copy Rotation' (in this case: X and Y). The 'Copy Rotation' contraint first calculates an XYZ Euler rotation that aligns the 3 axes. Sometimes it calculates a rotation whose Z value is 0 degrees, matching the target object. Other times it calculates rotation values where the Z axis is -180 degrees. When the calculated Z axis does not correspond to the original value, the axis will become misaligned as the constraint only applies to the X and Y axes. I edited the description and added a simplified file to better describe the problem. As this only involves Contraints, it is something else for the `Animation & Rigging` team to investigate. [copy_rotation__bug.blend](attachments/031c0896-5321-4fc7-aed3-b9e3d59adfb8)

I built a test file with 2.93 and I can reproduce the bug there as well (file attached).
Important thing to reproduce it was to add a 90 degree rotation to the delta transform of the "Driver".
Removing that also resolves the flipping in the original file.

I built a test file with 2.93 and I can reproduce the bug there as well (file attached). Important thing to reproduce it was to add a 90 degree rotation to the delta transform of the "Driver". Removing that also resolves the flipping in the original file.
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#117579
No description provided.