How to Open Large IFC Files in Bonsai?
Hello everyone,
I'm trying to work with a large IFC model (108,012 elements) in Blender using Bonsai. After loading the model, I get the warning: "Large model may slow down Bonsai", and the file does not open.
Even files that are not so large (300MB) fail to load.
How can I resolve this issue?
Other Questions:
- What are the best practices for handling large IFC files in Bonsai?
- Is there a recommended workflow for optimizing IFC models to improve performance?
- Should I preprocess the IFC file before loading? If so, what tools or methods are recommended?
- Is there a specific configuration in Bonsai to handle large IFC files more efficiently?
Any help or insights would be greatly appreciated!
Tagged:
Comments
https://docs.bonsaibim.org/guides/viewing/dealing_with_large_models.html
Thank you for the detailed documentation!
I've already seen the documentation, and here’s what I found regarding my case:
Do you have any other recommendations for handling this issue? Is there a way to force the model to load despite the performance warning?
I really appreciate any additional insights!
What do you want to achieve? Can you share the file? Do any other files work? Where do the files come from?
I regularly load models ranging from 300-800MB at work, so "filesize" isn't really the best indicator of what will be too much. An indicator which may be more relevant to you is the number of elements. Blender tends to struggle for most people if the number of objects is more than 30k, with about 60k or 80k being the limit where things get unusable. I'd say Bonsai is not yet appropriate for graphically authoring these large models (linking is fine). Editing using code and script is more appropriate.
So is the number of elements (> 30.000) the reason why Bonsai throws the warning, in this case ?
I also had a large BIM project in the past. > 60.000 elements (As I got warned in Bricscad at that time)
Is that element number a kind of relatively fixed limitation, or can this be extended by simply throwing more capable hardware on it ?
A bit off topic,
but I usually have to deal with huge or non optimized BIM Projects, so I am very interested.
I could not test that mentioned monster project in Bonsai so far, as I miss an IFC source.
As always, it originated from Revit, but it looks like I did not get a single large IFC but only DWGs. A few DWGs per building groups. So in this case I could have theoretically gone the "reference" route.
(Not feasible in case of my visualization purpose as it had needed a tedious cleanup and re-sorting process in a single central file)
AFAIR I imported/opened and combined the DWGs in Vectorworks as well as Bricscad.
The whole project in Vectorworks was quite lagging, with reasonable 700 MB, mostly geometry only file size but reasonable editable. In Bricscad DWG it was 220 MB - which I learned is a monster huge DWG file size - and lagging in a way nearly uneditable.
This was on my 16 GB M1 Mini and I also tried the "non limited" PC under Windows. Experience was astonishingly not much different.
I also exported and tested it in my 3D DCC Apps.
Although 3D DDC Apps prefer only few objects but high polygon counts and sometimes struggle with typical CAD organization of thousands of objects but low poly, neither Cineam4D, Modo nor Blender were lagging in Viewport or Editing.
As I retested that project lately as I have a newer more capable or less limited Mac.
The 3D DCCs had no problems as before, Vectorworks was better and still ok. Just Bricscad could not profit and seems to be limited internally. (It was always weaker in 3D Viewport than VW)
I see usually reasons for edit and viewport lagging.
1. the project IS huge
2. the project size is reasonably but the geometry from different BIM contributors is crap and unnecessarily tessellated.
(e.g. fillets on Doors terribly meshed (from library imports ?), same Objects come in as separate unique Blocks instead of instances, ...)
Yes, too many objects is a Blender viewport problem. I often import city models for surroundings and sun studies and need to join all the separate objects in one, otherwise it's unusable.
One more thing to try is ifcpatch. Depending on your usecase and source of the file, different recipes can sometimes also make a model usable.
30k is a ballpark number from my own experience, it varies based on your hardware.
Thank you for your response!
I train AI agents using IFC models. Since these files contain company data, unfortunately, I’m unable to share them.
Regarding the files:
They are exported from Revit.
I managed to open some projects using two different methods, depending on the project:
I merged the disciplines into a single file using Patch > Merge Projects.
For others, I enabled advanced settings when opening the project and used filters.
When I successfully opened the files, Blender would crash. To resolve this, I used a PC with more RAM, which worked.
Merging projects together would make it even more onerous. It's better to keep them separate and link together when needed (this is also how it works in other software).
If you're just training an AI agent, do you need Blender at all? Why don't you just parse it with IfcOpenShell directly, or use the link feature for geometry?
Thank you for your response and the references! This helps me establish workflows for different cases. Yes, I am also using IfcOpenShell directly in some parts of the process.