Exact Boolean (Union & Self Intersections -- to remove inside geometry) bad performance/memory footprint #105652

Open
opened 2023-03-11 08:16:22 +01:00 by RT · 18 comments

System Information
Operating system: Linux-5.15.0-67-generic-x86_64-with-glibc2.31 64 Bits
Graphics card: Mesa DRI Intel(R) HD Graphics 4600 (HSW GT2) Intel Open Source Technology Center 4.5 (Core Profile) Mesa 21.2.6

Blender Version
Broken: version: 3.5.0 Beta, branch: blender-v3.5-release, commit date: 2023-02-18 05:38, hash: 46e13cf8a529
Worked: (newest version of Blender that worked as expected)

Short description of error
I have a group of nodes that gets rid of internal geometry by creating a "mold" of an object.

But it crashes on some meshes and not on other meshes and the crash doesn't give any real information why.

Is there a work around for this?
Nodes works with certain meshes and crashes with others.

Exact steps for others to reproduce the error
Working mesh and blend file.

Left side shows internal / overlapping geometry and Right side is free of this after using node network.

image

doesn't crash.blend

Cashes when I click the switch node to enable it (see red arrow).
Crashes in 3.4.1 and 3.5.

image

this one crashes.blend

Crash text files attached below

Is there a work around for this?

**System Information** Operating system: Linux-5.15.0-67-generic-x86_64-with-glibc2.31 64 Bits Graphics card: Mesa DRI Intel(R) HD Graphics 4600 (HSW GT2) Intel Open Source Technology Center 4.5 (Core Profile) Mesa 21.2.6 **Blender Version** Broken: version: 3.5.0 Beta, branch: blender-v3.5-release, commit date: 2023-02-18 05:38, hash: `46e13cf8a529` Worked: (newest version of Blender that worked as expected) **Short description of error** I have a group of nodes that gets rid of internal geometry by creating a "mold" of an object. But it crashes on some meshes and not on other meshes and the crash doesn't give any real information why. Is there a work around for this? Nodes works with certain meshes and crashes with others. **Exact steps for others to reproduce the error** Working mesh and blend file. **Left side shows internal / overlapping geometry and Right side is free of this after using node network.** ![image](/attachments/9b9c934f-4656-4395-b05f-6e2925b0b3f9) [doesn't crash.blend](/attachments/1df12be8-6e59-436a-91bb-cade1f3f9c2f) Cashes when I **click the switch node to enable it** (**see red arrow**). Crashes in 3.4.1 and 3.5. ![image](/attachments/1dd2e636-1338-4c3f-966e-00f70fabafe9) [this one crashes.blend](/attachments/79542729-4ad1-4785-976d-ace3a7ac5c1b) Crash text files attached below Is there a work around for this?
RT added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-03-11 08:16:23 +01:00
RT closed this issue 2023-03-11 08:17:53 +01:00
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-03-11 08:17:54 +01:00
RT reopened this issue 2023-03-11 08:18:11 +01:00
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-03-11 08:18:11 +01:00

@Still Hello. Can you simplify a file by targeting a boolean node? Since you can reproduce it, I have a suspicion that the problem is in the boolean. This may be a duplicate of an old issue report of the library used for boolean operation.

@Still Hello. Can you simplify a file by targeting a boolean node? Since you can reproduce it, I have a suspicion that the problem is in the boolean. This may be a duplicate of an old issue report of the library used for boolean operation.
Iliya Katushenock added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-03-11 11:41:31 +01:00

There may also be a chance that you do not have enough RAM.

There may also be a chance that you do not have enough RAM.
Author

@Still Hello. Can you simplify a file by targeting a boolean node? Since you can reproduce it, I have a suspicion that the problem is in the boolean. This may be a duplicate of an old issue report of the library used for boolean operation.

When I test it with the boolean node it doesn't have the same effect it still leaves inner geometry in it.

(Left to Right)

The 1st image is the original image with overlapping faces / edges

The 2nd image uses the Mesh boolean node with Union. (Doesn't work fully)

The 3rd image uses an "inverse mold node"

image

self intersect test.blend

> @Still Hello. Can you simplify a file by targeting a boolean node? Since you can reproduce it, I have a suspicion that the problem is in the boolean. This may be a duplicate of an old issue report of the library used for boolean operation. When I test it with the boolean node it doesn't have the same effect it still leaves inner geometry in it. (Left to Right) The 1st image is the original image with overlapping faces / edges The 2nd image uses the Mesh boolean node with Union. (**Doesn't work fully**) The 3rd image uses an "inverse mold node" ![image](/attachments/942b0011-30da-4169-bb38-89642b8fb2ce) [self intersect test.blend](/attachments/244a69f5-6583-4c13-a735-f19a5f1e68d6)
Author

There may also be a chance that you do not have enough RAM.

I have 16gig of ram. Is there a way to build the mold "incrementally" (overtime) like compare x,y,z in 0.2 increments And rebuild the "mold" that way?

> There may also be a chance that you do not have enough RAM. I have 16gig of ram. Is there a way to build the mold "incrementally" (overtime) like compare x,y,z in 0.2 increments And rebuild the "mold" that way?

What I mean is that you need to crash with as simple a file as possible. I couldn't reproduce this as I'm just running out of ram.

What I mean is that you need to crash with as simple a file as possible. I couldn't reproduce this as I'm just running out of ram.
Author

What I mean is that you need to crash with as simple a file as possible. I couldn't reproduce this as I'm just running out of ram.

In the original question I uploaded:

I uploaded one file that works all the time
doesn't crash.blend

And one that cashes when I click the switch node to enable it (see red arrow ). Crashes in 3.4.1 and 3.5. See image above the only thing that really changes is the Mesh.

this one crashes.blend

image

That is as simple as I can get it (showing a node group that works with a single mesh and a node group that crashes with another single mesh)

If your asking if I can delete Nodes then the effect wouldn't work and if I take out the switch node it would crash when trying to open the blend file. This way you can see all the nodes and mesh before it crashes (when clicking on the switch node).

> What I mean is that you need to crash with as simple a file as possible. I couldn't reproduce this as I'm just running out of ram. In the original question I uploaded: I uploaded one file that works all the time [doesn't crash.blend](/attachments/1df12be8-6e59-436a-91bb-cade1f3f9c2f) And one that cashes when I click the switch node to enable it (see red arrow ). Crashes in 3.4.1 and 3.5. See image above the only thing that really changes is the Mesh. [this one crashes.blend](/attachments/79542729-4ad1-4785-976d-ace3a7ac5c1b) ![image](/attachments/ffcb6043-8768-4425-826d-7a7ac8a8f414) That is as simple as I can get it (showing a node group that works with a single mesh and a node group that crashes with another single mesh) If your asking if I can delete Nodes then the effect wouldn't work and if I take out the switch node it would crash when trying to open the blend file. This way you can see all the nodes and mesh before it crashes (when clicking on the switch node).
219 KiB

@Still Make 5 nodes, a simple model that doesn't waste 20 gigabytes out of 16 available and it can be crashed.

@Still Make 5 nodes, a simple model that doesn't waste 20 gigabytes out of 16 available and it can be crashed.
Author

?? Waste 20Gigs? The blend files are 1.6MB and 2.6Mb and they where attached in the original question. I think there is a language translation issue... I'm not sure why this is marked as needs information from user.

  1. I included a working Blend file and mesh.
  2. I included a Blend file that compares and test different boolean techniques to show the differences.
  3. I included a non working Blend file with mesh (that will crash blender)
  4. I included crash txt files for 3.4.1 and 3.5
  5. And I included arrows in an image showing what to click on to show blender crashing.

What more is needed?

?? Waste 20Gigs? The blend files are 1.6MB and 2.6Mb and they where attached in the original question. I think there is a language translation issue... I'm not sure why this is marked as **needs information from user**. 1) I included a working Blend file and mesh. 2) I included a Blend file that compares and test different boolean techniques to show the differences. 3) I included a non working Blend file with mesh (that will crash blender) 3) I included crash txt files for 3.4.1 and 3.5 4) And I included arrows in an image showing what to click on to show blender crashing. What more is needed?

@Still I'm talking about the fact that where you describe the crash, I just have a growing RAM. Just eats a memory pie and that's it

@Still I'm talking about the fact that where you describe the crash, I just have a growing RAM. Just eats a memory pie and that's it
Author

@Still I'm talking about the fact that where you describe the crash, I just have a growing RAM. Just eats a memory pie and that's it

I'm not sure what you mean / what is "memory pie"??? Do you mean memory leak?
So your saying it's a memory leak issue with Blender?

> @Still I'm talking about the fact that where you describe the crash, I just have a growing RAM. Just eats a memory pie and that's it I'm not sure what you mean / what is "memory pie"??? Do you mean memory leak? So your saying it's a memory leak issue with Blender?

I'm not talking about a leak, I just put it poorly.

I'm not talking about a leak, I just put it poorly.
Iliya Katushenock added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2023-04-02 12:45:35 +02:00
Member

Hi, file doesn't crash here. Both memory and CPU usage goes high after enabling the switch.
Think Crash is likely due to out of memory situation.

Hi, file doesn't crash here. Both memory and CPU usage goes high after enabling the switch. Think Crash is likely due to out of memory situation.
Member

Does it happen after disabling Self intersection of Boolean node performing Difference operation?

I've only checked "this one crashes.blend" file

Does it happen after disabling `Self intersection` of Boolean node performing `Difference` operation? I've only checked "this one crashes.blend" file
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-04-12 11:52:49 +02:00
Author

@PratikPB2123 If I disable those the reason for having the entire node group (deleting all internal geometry) stops working. But The crash stops. Is there a way to maybe split up the object in 4 or 6 pieces then process them individually and then put them back together? would that prevent the crash / memory usage?

@PratikPB2123 If I disable those the reason for having the entire node group (**deleting all internal geometry**) **stops working**. But The crash stops. Is there a way to maybe split up the object in 4 or 6 pieces then process them individually and then put them back together? would that prevent the crash / memory usage?
Member

Hi, AFIAK self intersection involves more calculation and its performance heavy so crash may happen sometimes.

Is there a way to maybe split up the object in 4 or 6 pieces then process them individually and then put them back together? would that prevent the crash / memory usage?

I did not understand what exactly you're trying to achieve here.

Hi, AFIAK self intersection involves more calculation and its performance heavy so crash may happen sometimes. > Is there a way to maybe split up the object in 4 or 6 pieces then process them individually and then put them back together? would that prevent the crash / memory usage? I did not understand what exactly you're trying to achieve here.
Author

@PratikPB2123 my goal is to get rid of internal geometry by creating a "mold" of an object. See first post above with working example blender file with images. If intersections is calculation heavy I was wondering if there is a way to split up the calculations into multiple sections.

Example: If your goal is to build a large concrete bridge structure instead of pouring all the concrete at once (which wouldn't work) pour it in sections then join them together at the end.

@PratikPB2123 my goal is to get rid of internal geometry by creating a "mold" of an object. See first post above with working example blender file with images. If intersections is calculation heavy I was wondering if there is a way to split up the calculations into multiple sections. Example: If your goal is to build a large concrete bridge structure instead of pouring all the concrete at once (which wouldn't work) pour it in sections then join them together at the end.
Pratik Borhade added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2023-04-30 12:51:54 +02:00
Member

So this is an issue of the boolean.
Not just an issue of the node, the operator also has the bad performance and memory footprint.
(so you could take the Tree Generator object, go into editmode, F3 "Intersect boolean" > Exact, Union, Self Intersection -- same thing).

The many mesh island inside each other might represent a worst-case-scenario for the boolean code, that is a question @howardt could probably answer best. FYI, I have counted 50 trunk islands in this particular case:

image

I have tried to reproduce this with just cube geometry sticking inside and intersecting with similar results (taking really long to solve):

image

So, to get this out of the status of being "stuck" , I would like feedback from @howardt (or the Modeling module), but I would just assume this is a performance issue (and this will not be considered a bug).

So this is an issue of the boolean. Not just an issue of the node, the operator also has the bad performance and memory footprint. (so you could take the `Tree Generator` object, go into editmode, F3 "Intersect boolean" > Exact, Union, Self Intersection -- same thing). The many mesh island inside each other might represent a worst-case-scenario for the boolean code, that is a question @howardt could probably answer best. FYI, I have counted 50 trunk islands in this particular case: ![image](/attachments/9d543651-3775-48f2-a3ac-49748e2c7097) I have tried to reproduce this with just cube geometry sticking inside and intersecting with similar results (taking really long to solve): ![image](/attachments/aead5fa8-939b-4683-8e9b-ac948c14e683) So, to get this out of the status of being "stuck" , I would like feedback from @howardt (or the `Modeling` module), but I would just assume this is a performance issue (and this will not be considered a bug).
Philipp Oeser added
Module
Modeling
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2023-05-30 15:22:32 +02:00
Philipp Oeser changed title from Crash when using nodes with certain meshes to Exact Boolean (Union & Self Intersections -- to remove inside geometry) bad performance/memory footprint 2023-05-30 15:24:06 +02:00
Member

The issue is indeed that these are large and expensive cases (both in time and memory) for self-intersecting exact boolean. They don't crash on my machine (a Macbook Pro M1 Max with 64GB of memory) though the wait is essentially intolerable (an hour? I didn't time it). The rero case, when I did a self-intersecting union in edit mode, wasn't too bad -- a couple of minutes.

I am currently working on a completely new implementation of exact boolean that promises to be much faster (rivaling the fast (float) boolean time), so I don't want to put a lot of time into trying to improve the current Boolean's performance and memory footprint (I had already spent a bunch of time improving the current exact boolean's performance, but not the memory footprint).

As to how one might decompose a problem into parts so that it might go faster: the best thing would be if you could separate it into a number of separate meshes, where each component mesh is a watertight volume with no self-intersections, so that you don't have to use the 'self-intersection' flag. One of the reasons self-intersection is so expensive is that the algorithm has to test intersection between faces that are close, which means it tests against all of the faces that share an edge with a given face -- a LOT of faces.

The issue is indeed that these are large and expensive cases (both in time and memory) for self-intersecting exact boolean. They don't crash on my machine (a Macbook Pro M1 Max with 64GB of memory) though the wait is essentially intolerable (an hour? I didn't time it). The rero case, when I did a self-intersecting union in edit mode, wasn't too bad -- a couple of minutes. I am currently working on a completely new implementation of exact boolean that promises to be much faster (rivaling the fast (float) boolean time), so I don't want to put a lot of time into trying to improve the current Boolean's performance and memory footprint (I had already spent a bunch of time improving the current exact boolean's performance, but not the memory footprint). As to how one might decompose a problem into parts so that it might go faster: the best thing would be if you could separate it into a number of separate meshes, where each component mesh is a watertight volume with no self-intersections, so that you don't have to use the 'self-intersection' flag. One of the reasons self-intersection is so expensive is that the algorithm has to test intersection between faces that are close, which means it tests against all of the faces that share an edge with a given face -- a LOT of faces.
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
5 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#105652
No description provided.