x=zero not accepted for a bone tail #30438

Closed
opened 2012-03-03 19:59:13 +01:00 by Anna Celarek · 8 comments

%%%Strange issue, I'm still not sure if it's me who messed something up, or if it's a bug.

I can't set the tail of Bone.034 in the file to zero.
It displays Tail X: 0.000 in the Transform panel, and it's quite close to 0, but not exactly. You have to view along the Y axis and zoom in very closely to see it.

The bone has children (Bone.018, Bone.034_L, Bone.034_R) which are connected, so they should touch the tail of Bone.034, but they don't. They move to the tail of their parent as soon as I go into Pose mode.
If I grab the tip of Bone.034 and try to move it along x, or scale it along X, it moves to unexpected directions.

Originally the armature was a very long chain (for a tentacle), and the bug appeared on Bone.044. After deleting that bone, the bug "switched" to Bone.034. I deleted most of the long chain for more clarity, but I can post the original file too if necessary.

Blender svn r44559M

OpenSUSE 12.1
KDE 4.7.2 r5%%%

%%%Strange issue, I'm still not sure if it's me who messed something up, or if it's a bug. I can't set the tail of Bone.034 in the file to zero. It displays Tail X: 0.000 in the Transform panel, and it's quite close to 0, but not exactly. You have to view along the Y axis and zoom in very closely to see it. The bone has children (Bone.018, Bone.034_L, Bone.034_R) which are connected, so they should touch the tail of Bone.034, but they don't. They move to the tail of their parent as soon as I go into Pose mode. If I grab the tip of Bone.034 and try to move it along x, or scale it along X, it moves to unexpected directions. Originally the armature was a very long chain (for a tentacle), and the bug appeared on Bone.044. After deleting that bone, the bug "switched" to Bone.034. I deleted most of the long chain for more clarity, but I can post the original file too if necessary. Blender svn r44559M OpenSUSE 12.1 KDE 4.7.2 r5%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%Update: Found a way to recreate the situation from scratch. Seems to appear with large Y and small X or Z values for Tail

  1. Create a new armature (one bone) at 0/0/0. Display as stick (the bug is best visible then).
  2. Go into edit mode.
  3. In the properties panel (N) for Tail, type Y=200, Z=0.2
  4. View along the Y axis (num 1) in an orthogonal view (num 5) and zoom in very close, so that you can recognize the Z=0.2 in the viewport.
    THE BUG:
  5. Grab the tail of the bone and try to move it (G). It jumps into strange places, and it's impossible to move it towards x=0,z=0 or back to its original position.
  6. The 3d manipulator disappears when the tail is selected.

No such bug with X=200 nor Z=200 (and the other coordinates 0.2 and 0.0)
Appears also with X/Y/Z = 0.2/200/0 or 0.1/100/0.
The bug seems always to appear when trying to move the tail inside a XZ circle which has radius below 0.1% of Y (see attached image longbone.png).

I'm also attaching longbone.blend which illustrates step 4.

Blender svn r44881M (with factory settings).
OpenSUSE 12.1
KDE 4.7.2 r5%%%

%%%Update: Found a way to recreate the situation from scratch. Seems to appear with large Y and small X or Z values for Tail 1. Create a new armature (one bone) at 0/0/0. Display as stick (the bug is best visible then). 2. Go into edit mode. 3. In the properties panel (N) for Tail, type Y=200, Z=0.2 4. View along the Y axis (num 1) in an orthogonal view (num 5) and zoom in very close, so that you can recognize the Z=0.2 in the viewport. THE BUG: 5. Grab the tail of the bone and try to move it (G). It jumps into strange places, and it's impossible to move it towards x=0,z=0 or back to its original position. 6. The 3d manipulator disappears when the tail is selected. No such bug with X=200 nor Z=200 (and the other coordinates 0.2 and 0.0) Appears also with X/Y/Z = 0.2/200/0 or 0.1/100/0. The bug seems always to appear when trying to move the tail inside a XZ circle which has radius below 0.1% of Y (see attached image longbone.png). I'm also attaching longbone.blend which illustrates step 4. Blender svn r44881M (with factory settings). OpenSUSE 12.1 KDE 4.7.2 r5%%%
Author

%%%appears also on:
Windows 7 (64 bit), Blender r44807 from graphicall.org
Windows 7 (64 bit), official Blender 2.62 from blender.org %%%

%%%appears also on: Windows 7 (64 bit), Blender r44807 from graphicall.org Windows 7 (64 bit), official Blender 2.62 from blender.org %%%

%%%This seems like a precision topic… will investigate this!%%%

%%%This seems like a precision topic… will investigate this!%%%

%%%I had a quick look at this a week ago, and it seems what is causing the mismatched bone ends in edit mode is that get_matrix_editbone gives a different matrix than the one in pose mode. Did not check it further though, it may well be that it's just float precision issues that is causing the difference, but it also seems that this function computes the matrix in object space while for pose mode it's done in parent space.%%%

%%%I had a quick look at this a week ago, and it seems what is causing the mismatched bone ends in edit mode is that get_matrix_editbone gives a different matrix than the one in pose mode. Did not check it further though, it may well be that it's just float precision issues that is causing the difference, but it also seems that this function computes the matrix in object space while for pose mode it's done in parent space.%%%

%%%Hmmmm… I’m pretty sure this is a drawing artifact:

  • It only happens when the bone is exactly aligned with the Y axis of the object (to be precise, when the tail is less than 1/1000 of bone length away from that axis).
  • It does not affect the actual position of the tail itself (not even the drawing of the manipulator, which is correct – and done in object space), only the bone drawing itself. This means it has no effect over the Pose evaluation (deformation of a mesh, etc.), only on where the tail of the bone is drawn…

That precision problem is probably caused by the fact that the bones are drawn into their own space (meaning that head is always drawn at current space’s (0,0,0), and tail at (0, 1, 0)). This involves several OpenGL matrix multiplications, so I guess the loss of precision is multiplied as well?

Anyway, thing is, there is no easy way to solve that, imho. OpenGL (graphic cards) do not handle doubles. The only solution would probably be to change all bone drawing code to make it work directly in object space… But I really doubt such a small glitch is worth spending hours and hours searching a way to fix it, without even the assurance that there is a fix… Will ask devs more skilled in OpenGL, on irc. ;)%%%

%%%Hmmmm… I’m pretty sure this is a drawing artifact: * It only happens when the bone is *exactly* aligned with the Y axis of the object (to be precise, when the tail is less than 1/1000 of bone length away from that axis). * It does not affect the actual position of the tail itself (not even the drawing of the manipulator, which is correct – and done in object space), only the bone drawing itself. This means it has no effect over the Pose evaluation (deformation of a mesh, etc.), only on where the tail of the bone is drawn… That precision problem is probably caused by the fact that the bones are drawn into their own space (meaning that head is always drawn at current space’s (0,0,0), and tail at (0, 1, 0)). This involves several OpenGL matrix multiplications, so I guess the loss of precision is multiplied as well? Anyway, thing is, there is no easy way to solve that, imho. OpenGL (graphic cards) do not handle doubles. The only solution would probably be to change all bone drawing code to make it work directly in object space… But I really doubt such a small glitch is worth spending hours and hours searching a way to fix it, without even the assurance that there *is* a fix… Will ask devs more skilled in OpenGL, on irc. ;)%%%

%%%Well, in the end, was indeed a visual-only precision bug, but not caused by OpenGL limitations, but by a threshold value in vec_roll_to_mat3(), due to bug [#23954].

Should be fixed in r45103 (in fact, there is still a small gap when you are very near Y axis of the bone – but it’s hardly noticeable (previously, it appeared at 1×10⁻³ of bone length from Y axis, now it’s at about 3,25×10⁻⁷…).

Thanks for reporting!%%%

%%%Well, in the end, was indeed a visual-only precision bug, but not caused by OpenGL limitations, but by a threshold value in vec_roll_to_mat3(), due to bug [#23954]. Should be fixed in r45103 (in fact, there is still a small gap when you are *very* near Y axis of the bone – but it’s hardly noticeable (previously, it appeared at 1×10⁻³ of bone length from Y axis, now it’s at about 3,25×10⁻⁷…). Thanks for reporting!%%%

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#30438
No description provided.