Pose logic exhibiting div-by-zero behaviour #61905

Closed
opened 2019-02-24 08:33:41 +01:00 by shannon zachow · 9 comments

System Information
Operating system: Linux
Graphics card: GTX 1050

Blender Version
Broken: version: 2.80 (sub 45), branch: blender2.7, commit date: 2019-02-22 22:26, hash: 779860d34e, type: Release
build date: 2019-02-23, 00:06:29

Short description of error
Random subset of vertices disappear from rigged-object when exiting Edit_Mode.

Exact steps for others to reproduce the error
system-info.txt
system-info.txt

mouth.blend
mouth.blend

Screenshot at 2019-02-24 01-49-06.png

Screenshot at 2019-02-24 01-48-27.png

Using the attached file "mouth.blend"
(this is a rigged mouth -- it's meant to be Boolean_Difference'd from the head of a character).

Go into/outof Edit_Mode on the object Mouth.
The "lost" vertices almost always re-appear when entering Edit_Mode.

The vertices do not always disappear when exiting Edit_Mode... sometimes toggling the Mouth object's SubSurf-Modifier's Viewport_Display mode while in Edit_Mode can help to trigger the disappearing vertices. Sometimes changing the Pose or clearing the Pose changes whether or not the vertices disappear.
Exactly which vertices do disappear sometimes changes. Most often, it was those in the +X,-Z quadrant.

Sometimes the vertices merely disappear. Sometimes their coordinate values become HUGE numbers (div-by-zero) and the Mouth object is drawn with some parts stretching off to infinity in different directions.

I've been chasing this issue for over a week. I have changed and re-modeled the Mouth object in many different ways, and even went so far as to export to a .dae file, then import and rebuild the whole thing. None of these removed the problem.

  - > I just finally tried tweaking some of the bones out of exact-linear-alignment, and that fixed the problem (made it impossible for me to reproduce the disappearing-vertices issue). Re-aligning the bones brought the problem back, so I thought that someone might be able to check the responsible code.

The opening of the mouth is the tongue-like appendage protruding along -Y.
Each quadrant of this part has 3 bones: LipTop.A.L --> LipTop.bendy.L --> LipTop.B.L
(where {Top | Btm} and {.L | .R} )
every .bendy bone starts at a .A, and Bone_Constraint "Stretch_To" a .B .
The bones .A and .B are set as TANGENT start|end Handles for the .bendy bone between them.

When the tail of the .B bones (ie; LipTop.B.L) is exactly in line with the head & tail .A and the head of .B, then the vertices will disappear.

If I select the tails of all 4 .B bones in Armature Edit_Mode, and slightly offset them (ie; G Y .001), then the disappearing vertices problem goes away.

It is my guess that somewhere in the code to apply the pose of a Bendy_Bone with TANGENT handles, there is a "divide by the angle between the two handles".

Yes: I will just offset the bones slightly to avoid the problem now.
But working on magically disappearing vertices, or vertices that smeared out to infinity, however, has been a big time sinkhole. Can the code handle this edge-case better? Or is there a better way to inform users what the problem is?

thank you!

**System Information** Operating system: Linux Graphics card: GTX 1050 **Blender Version** Broken: version: 2.80 (sub 45), branch: blender2.7, commit date: 2019-02-22 22:26, hash: 779860d34e26, type: Release build date: 2019-02-23, 00:06:29 **Short description of error** Random subset of vertices disappear from rigged-object when exiting Edit_Mode. **Exact steps for others to reproduce the error** system-info.txt [system-info.txt](https://archive.blender.org/developer/F6701881/system-info.txt) mouth.blend [mouth.blend](https://archive.blender.org/developer/F6701888/mouth.blend) ![Screenshot at 2019-02-24 01-49-06.png](https://archive.blender.org/developer/F6701895/Screenshot_at_2019-02-24_01-49-06.png) ![Screenshot at 2019-02-24 01-48-27.png](https://archive.blender.org/developer/F6701898/Screenshot_at_2019-02-24_01-48-27.png) Using the attached file "mouth.blend" (this is a rigged mouth -- it's meant to be Boolean_Difference'd from the head of a character). Go into/outof Edit_Mode on the object Mouth. The "lost" vertices almost always re-appear when entering Edit_Mode. The vertices do not always disappear when exiting Edit_Mode... sometimes toggling the Mouth object's SubSurf-Modifier's Viewport_Display mode while in Edit_Mode can help to trigger the disappearing vertices. Sometimes changing the Pose or clearing the Pose changes whether or not the vertices disappear. Exactly which vertices do disappear sometimes changes. Most often, it was those in the +X,-Z quadrant. Sometimes the vertices merely disappear. Sometimes their coordinate values become HUGE numbers (div-by-zero) and the Mouth object is drawn with some parts stretching off to infinity in different directions. I've been chasing this issue for over a week. I have changed and re-modeled the Mouth object in many different ways, and even went so far as to export to a .dae file, then import and rebuild the whole thing. None of these removed the problem. - > I just finally tried tweaking some of the bones out of exact-linear-alignment, and that fixed the problem (made it impossible for me to reproduce the disappearing-vertices issue). Re-aligning the bones brought the problem back, so I thought that someone might be able to check the responsible code. The opening of the mouth is the tongue-like appendage protruding along -Y. Each quadrant of this part has 3 bones: LipTop.A.L --> LipTop.bendy.L --> LipTop.B.L (where {Top | Btm} and {.L | .R} ) every .bendy bone starts at a .A, and Bone_Constraint "Stretch_To" a .B . The bones .A and .B are set as TANGENT start|end Handles for the .bendy bone between them. When the tail of the .B bones (ie; LipTop.B.L) is exactly in line with the head & tail .A and the head of .B, then the vertices will disappear. If I select the tails of all 4 .B bones in Armature Edit_Mode, and slightly offset them (ie; G Y .001), then the disappearing vertices problem goes away. It is my guess that somewhere in the code to apply the pose of a Bendy_Bone with TANGENT handles, there is a "divide by the angle between the two handles". Yes: I will just offset the bones slightly to avoid the problem now. But working on magically disappearing vertices, or vertices that smeared out to infinity, however, has been a big time sinkhole. Can the code handle this edge-case better? Or is there a better way to inform users what the problem is? thank you!
Author

Added subscriber: @shannonz-1

Added subscriber: @shannonz-1
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Are you able to reproduce the issue in an as-simple-as-possible .blend file?
Also give exact steps to reproduce the issue, please.

It's hard to understand the actual issue based on your text, for me at least.

Are you able to reproduce the issue in an as-simple-as-possible .blend file? Also give exact steps to reproduce the issue, please. It's hard to understand the actual issue based on your text, for me at least.
Author

Re: what is the actual issue?

Pose_Mode involving bendy_bones sometimes makes a random subset of object vertices not be displayed. Look at the 2 screenshot images: the Edit_Mode (1st) image shows what the shape should look like; Pose_Mode (2nd) image shows what it looks like when switching back to Pose_Mode, and this is the alt-R, alt-G pose.

There appears to be a problem in the Pose_Mode logic. When applying pose-math to vertex position, the computed posed position of a vertex either collapses to zero or explodes to infinity. -- in the example file I've given, the pose has not changed, therefore the pose image should look like the Edit_Mode image, instead, almost half of the object has disappeared.

Re: what is the actual issue? Pose_Mode involving bendy_bones sometimes makes a random subset of object vertices not be displayed. Look at the 2 screenshot images: the Edit_Mode (1st) image shows what the shape should look like; Pose_Mode (2nd) image shows what it looks like when switching back to Pose_Mode, and this is the alt-R, alt-G pose. There appears to be a problem in the Pose_Mode logic. When applying pose-math to vertex position, the computed posed position of a vertex either collapses to zero or explodes to infinity. -- in the example file I've given, the pose has not changed, therefore the pose image should look like the Edit_Mode image, instead, almost half of the object has disappeared.
Author

Here is a much simpler file that reproduces the problem.

test007.blend

Steps to reproduce problem:

Select Armature
Tab to Pose_Mode
Tab to Object_Mode
Select Object
Tab to Edit_Mode
Tab to Object_Mode

At this last step the object should disappear.
If you look in the N-side-panel, the Object's Dimensions have become like 20-digit numbers.

Here is a much simpler file that reproduces the problem. [test007.blend](https://archive.blender.org/developer/F6714004/test007.blend) Steps to reproduce problem: Select Armature Tab to Pose_Mode Tab to Object_Mode Select Object Tab to Edit_Mode Tab to Object_Mode At this last step the object should disappear. If you look in the N-side-panel, the Object's Dimensions have become like 20-digit numbers.
Member

Thanks! Now I can reproduce the issue.

Thanks! Now I can reproduce the issue.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Campbell Barton self-assigned this 2019-07-18 09:49:01 +02:00

This bug isn't present in 20c725ed62f86aebf555221731c8e7b7dbd05120, closing.

This bug isn't present in `20c725ed62f86aebf555221731c8e7b7dbd05120`, closing.
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#61905
No description provided.