Boolean issues when duplicating and rotating mesh or object #82047

Closed
opened 2020-10-25 02:53:06 +01:00 by Robbie K. · 16 comments

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.30

Blender Version
Broken: version: 2.91.0 Beta, branch: master, commit date: 2020-10-23 17:33, hash: 70cc0d7121
Worked: (newest version of Blender that worked as expected)

Exact steps for others to reproduce the error
Not sure if this is a boolean issue or an issue with accuracy when rotating. Scale a cube in the x or y direction, duplicate that cube and rotate it along the z-axis 90 degrees forming an X. Apply a boolean difference on it using the new algorithm and swap between the two. One will completely subtract the other but not the other way around. But if you move one cube in the z direction and snap it back it will boolean each other correctly.

Or
boolean_rotated_box.blend

  • Open file
  • Boolean seems to not be working correctly
  • enter editmode on Cube
  • {key R X 90}
  • Boolean seems to be working correctly
**System Information** Operating system: Windows-7-6.1.7601-SP1 64 Bits Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.30 **Blender Version** Broken: version: 2.91.0 Beta, branch: master, commit date: 2020-10-23 17:33, hash: `70cc0d7121` Worked: (newest version of Blender that worked as expected) **Exact steps for others to reproduce the error** Not sure if this is a boolean issue or an issue with accuracy when rotating. Scale a cube in the x or y direction, duplicate that cube and rotate it along the z-axis 90 degrees forming an X. Apply a boolean difference on it using the new algorithm and swap between the two. One will completely subtract the other but not the other way around. But if you move one cube in the z direction and snap it back it will boolean each other correctly. Or [boolean_rotated_box.blend](https://archive.blender.org/developer/F9180734/boolean_rotated_box.blend) - Open file - Boolean seems to not be working correctly - enter editmode on `Cube` - {key R X 90} - Boolean seems to be working correctly
Author

Added subscriber: @RobbieK

Added subscriber: @RobbieK

Added subscriber: @Foaly

Added subscriber: @Foaly

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

I cannot reproduce.
Following your instructions, everything works correctly.

Please upload a file that illustrates your issue.

I cannot reproduce. Following your instructions, everything works correctly. Please upload a file that illustrates your issue.
Author

I tried it with bool tool in object mode and it worked this time for some reason. Scale the cube in edit mode and use boolean intersect and you get the issue.

It should look like this.
2020-10-25 13_50_50-Blender.jpg

Update 1: I figured out why it didn't work in object mode last time. I separated one of the meshes and tried bool tool on both objects and it had the same problem. But moving one object in the z direction and snapping it back didn't fix the issue in object mode like it did it edit mode.

Update 2: I tried it again in edit mode and moving one mesh in the Z direction and snapping it back no longer works to fix the problem anymore.

Update 3: Snapping the upper and lower faces of one mesh to the other fixes the problem.

I tried it with bool tool in object mode and it worked this time for some reason. Scale the cube in edit mode and use boolean intersect and you get the issue. It should look like this. ![2020-10-25 13_50_50-Blender.jpg](https://archive.blender.org/developer/F9089830/2020-10-25_13_50_50-Blender.jpg) Update 1: I figured out why it didn't work in object mode last time. I separated one of the meshes and tried bool tool on both objects and it had the same problem. But moving one object in the z direction and snapping it back didn't fix the issue in object mode like it did it edit mode. Update 2: I tried it again in edit mode and moving one mesh in the Z direction and snapping it back no longer works to fix the problem anymore. Update 3: Snapping the upper and lower faces of one mesh to the other fixes the problem.

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Added subscriber: @howardt

Added subscriber: @howardt

I can confirm with 2.92.0 alpha e4728d0a16

The following file shows the issue.
boolean_rotated_box.blend

@howardt I think this is for you.

I can confirm with 2.92.0 alpha e4728d0a167c The following file shows the issue. [boolean_rotated_box.blend](https://archive.blender.org/developer/F9093612/boolean_rotated_box.blend) @howardt I think this is for you.
Philipp Oeser changed title from boolean issues when duplicating and rotating mesh or object to Boolean issues when duplicating and rotating mesh or object 2020-11-03 14:05:41 +01:00
Member

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

This seems to have been fixed in part recently.

However, if the box is scaled up a bit, and the boolean is applied multiple times, it can still cause issues.

See the attached file.
boolean_rotated_box2.blend

This seems to have been fixed in part recently. However, if the box is scaled up a bit, and the boolean is applied multiple times, it can still cause issues. See the attached file. [boolean_rotated_box2.blend](https://archive.blender.org/developer/F9235317/boolean_rotated_box2.blend)
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Howard Trickey self-assigned this 2020-11-08 16:39:54 +01:00
Member

The box with diagonals in boolean_rotated_box2.blend has y values that are almost, but not exactly +1 or -1. Here are the exact vertex coordinates (followed by what printing them as floating point gives):

  • 11307515/2097152 4194317/4194304 -1 # -5.39184 1 -1
  • 2826879/524288 -16777165/16777216 -1 # -5.39184 -0.999997 -1
  • 2826879/524288 -16777165/16777216 1 # -5.39184 -0.999997 1
  • 11307515/2097152 4194317/4194304 1 # -5.39184 1 1
    2826879/524288 16777165/16777216 -1 # 5.39184 0.999997 -1
    11307515/2097152 -4194317/4194304 -1 # 5.39184 -1 -1
    2826879/524288 16777165/16777216 1 # 5.39184 0.999997 1
    11307515/2097152 -4194317/4194304 1 # 5.39184 -1 1
  • 756655/1048576 8388611/8388608 -1 # -0.721602 1 -1
    6053245/8388608 16777209/16777216 1 # 0.721603 1 1
    756655/1048576 -8388611/8388608 -1 # 0.721602 -1 -1
  • 6053245/8388608 -16777209/16777216 1 # -0.721603 -1 1

So the two cubes do not line up in a way to give a nice cube-like intersection, and I don't see a bug here.
In general, when you do rotates and scales, the coordinates are multiplied by matrices with floating point values and it is to be expected that even though you think an operation should not affect a particular coordinate, it can do that in minuscule ways. I'm going to close this now. Feel free to reopen if there's a case where the input coordinates exactly line up (in this case: all y and z values should be exactly the same on both objects) and boolean fails.

The box with diagonals in boolean_rotated_box2.blend has y values that are almost, but not exactly +1 or -1. Here are the exact vertex coordinates (followed by what printing them as floating point gives): - 11307515/2097152 4194317/4194304 -1 # -5.39184 1 -1 - 2826879/524288 -16777165/16777216 -1 # -5.39184 -0.999997 -1 - 2826879/524288 -16777165/16777216 1 # -5.39184 -0.999997 1 - 11307515/2097152 4194317/4194304 1 # -5.39184 1 1 2826879/524288 16777165/16777216 -1 # 5.39184 0.999997 -1 11307515/2097152 -4194317/4194304 -1 # 5.39184 -1 -1 2826879/524288 16777165/16777216 1 # 5.39184 0.999997 1 11307515/2097152 -4194317/4194304 1 # 5.39184 -1 1 - 756655/1048576 8388611/8388608 -1 # -0.721602 1 -1 6053245/8388608 16777209/16777216 1 # 0.721603 1 1 756655/1048576 -8388611/8388608 -1 # 0.721602 -1 -1 - 6053245/8388608 -16777209/16777216 1 # -0.721603 -1 1 So the two cubes do not line up in a way to give a nice cube-like intersection, and I don't see a bug here. In general, when you do rotates and scales, the coordinates are multiplied by matrices with floating point values and it is to be expected that even though you think an operation should not affect a particular coordinate, it can do that in minuscule ways. I'm going to close this now. Feel free to reopen if there's a case where the input coordinates exactly line up (in this case: all y and z values should be exactly the same on both objects) and boolean fails.

Maybe there is a misunderstanding here:
I'm not talking about the long stretched flat faces that remain, the issue is that a part of the mesh on the right disappears.

Otherwise, can we define the cases in which the exact boolean is supposed / not supposed to work then?

All the meshes in the example are manifold, but the boolean cuts away pieces that are not within the "brush".
If the self option is enabled, the resulting mesh is no longer manifold.

Maybe there is a misunderstanding here: I'm not talking about the long stretched flat faces that remain, the issue is that a part of the mesh on the right disappears. Otherwise, can we define the cases in which the *exact boolean* is supposed / not supposed to work then? All the meshes in the example are manifold, but the boolean cuts away pieces that are not within the "brush". If the self option is enabled, the resulting mesh is no longer manifold.
Member

I am seeing this as the result:

rotated.png

I don't know what you mean by "part of the mesh on the right disappears".

If Cube had x and z values that exactly matched those of Cube.001, then we would expect that the whole center section would be gone when you subtract Cube from Cube.001. Since that isn't true, one has to examine the topology carefully to find out what parts of space are inside Cube.001 and not inside Cube. It is plausible to me that the two flat pieces in the middle are the parts of space that satisfy that, though I admit I didn't carefully verify that.

I am seeing this as the result: ![rotated.png](https://archive.blender.org/developer/F9240889/rotated.png) I don't know what you mean by "part of the mesh on the right disappears". If Cube had x and z values that exactly matched those of Cube.001, then we would expect that the whole center section would be gone when you subtract Cube from Cube.001. Since that isn't true, one has to examine the topology carefully to find out what parts of space are inside Cube.001 and not inside Cube. It is plausible to me that the two flat pieces in the middle are the parts of space that satisfy that, though I admit I didn't carefully verify that.

I've been checking this with the latest builds from the buildbot: 2.91 beta 46da8e9eb958-windows64, 2.92 alpha 7be47dadea50-windows64.
I also built the latest master 39012146e1 myself.

What build are you using?

This is what I see in boolean_rotated_box2.blend in all 3 cases:
boolean_rotated_box2.png

I've been checking this with the latest builds from the buildbot: 2.91 beta 46da8e9eb958-windows64, 2.92 alpha 7be47dadea50-windows64. I also built the latest master 39012146e142bf400c7140d90ecfd27c45b589ca myself. What build are you using? This is what I see in boolean_rotated_box2.blend in all 3 cases: ![boolean_rotated_box2.png](https://archive.blender.org/developer/F9241248/boolean_rotated_box2.png)

@howardt Can this be reopened? I'm still getting the same wrong result with the latest 2.91 beta (2.91.0 4960780d76bf-windows64).

@howardt Can this be reopened? I'm still getting the same wrong result with the latest 2.91 beta (2.91.0 4960780d76bf-windows64).
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#82047
No description provided.