| 1 |
Dealing with large models |
| 2 |
========================= |
| 3 |
|
| 4 |
Bonsai can handle large models, or federated collections of models where the |
| 5 |
combined total IFCs may be many gigabytes or object counts may be in the |
| 6 |
hundreds of thousands. |
| 7 |
|
| 8 |
Models may be large in terms of different metrics, such as: |
| 9 |
|
| 10 |
- Filesizes over 750MB, which may cause memory issues |
| 11 |
- Individual object polygon counts over 100k, which may cause unreasonable |
| 12 |
loading times |
| 13 |
- Objects having excessive or low quality booleans, which may cause |
| 14 |
unreasonable loading times |
| 15 |
- Number of elements exceeding 50,000 loaded in the scene, which may cause |
| 16 |
unreasonable loading times, selection glitches, and viewport lagging |
| 17 |
|
| 18 |
There are always solutions to all of these, but an understanding of the type of |
| 19 |
size limitation you are up against will always help. |
| 20 |
|
| 21 |
Linking in models |
| 22 |
----------------- |
| 23 |
|
| 24 |
Bonsai defaults to authoring IFCs. This allows full editing and inspection of |
| 25 |
all element properties and relationships. However, sometimes only geometry and |
| 26 |
basic attributes such as names are sufficient. Example usecases include CG |
| 27 |
visualisation, overall federated model coordination, or pure geometric checks. |
| 28 |
|
| 29 |
For these usecases, it's much more efficient to link a model rather than to |
| 30 |
open a model. In the **Links Panel**, click on **Link IFC**, and browse to your |
| 31 |
IFC. You can also bulk select multiple IFCs. |
| 32 |
|
| 33 |
You will not be able to directly edit geometry or data in a linked model, but |
| 34 |
you will be able to efficiently load multiple huge models easily and navigate |
| 35 |
it with a reasonable FPS. |
| 36 |
|
| 37 |
Activate the **Explore Tool** to quickly navigate these linked models. You can |
| 38 |
**Enable Culling** to improve FPS speeds further, and use the :kbd:`RMB` to query |
| 39 |
data about a selected object. |
| 40 |
|
| 41 |
Once loaded, the linked model is cached as a ``.cache.blend`` file for |
| 42 |
subsequent loads in the same folder as the ``.ifc``. The data is cached in a |
| 43 |
``.cache.sqlite`` file. |
| 44 |
|
| 45 |
Large filesizes |
| 46 |
--------------- |
| 47 |
|
| 48 |
The first priority is to ensure you do not have a prohibitively large filesize. |
| 49 |
|
| 50 |
- Use IFC4. It can handle geometry much more efficiently and expect your |
| 51 |
filesize to drop significantly. |
| 52 |
- When coming from other software, ensure you are exporting solids, not faceted |
| 53 |
BReps or tessellations where appropriate. Choosing the wrong export setting |
| 54 |
can easily double or triple your filesize and export times. Choose **Design |
| 55 |
Transfer View** instead of **Coordination View** or **Reference View**. Look |
| 56 |
for export settings that use the keywords like "surface", "solid", "brep", |
| 57 |
"tessellation", or "extrusion". |
| 58 |
- Improve your model breakdown strategy (see below) |
| 59 |
- Identify objects with large polygon counts and improve the modeling (see below) |
| 60 |
|
| 61 |
Model breakdown strategies |
| 62 |
-------------------------- |
| 63 |
|
| 64 |
A good general strategy is to never have a large model to begin with. Breaking |
| 65 |
down models is critical for usability during design and coordination. Where full |
| 66 |
models are needed, such as during clash detection, review meetings, or client |
| 67 |
handover, many small models may be federated. Model breakdown strategies |
| 68 |
include: |
| 69 |
|
| 70 |
- **By discipline**, you probably already do this, so let's move on |
| 71 |
- **By location**, such as by building, floor, zone, mid-rise, high-rise, core |
| 72 |
podium, underground, plant rooms, facade orientation, or similar. |
| 73 |
- **By object type**, such as by primary structural elements vs accessories |
| 74 |
(plates, bolts, etc), furniture vs general arrangement, facade vs interiors, |
| 75 |
distribution system elements (equipment, pipes, fittings) vs accessories (pipe |
| 76 |
clamps, hangers, etc) or similar. |
| 77 |
- **By coordination task**, many people get into the habit of exchanging the |
| 78 |
entire building when a task only requires a tiny portion of it. Think of the |
| 79 |
workflow of exchanging traditional drawings. A large project would have |
| 80 |
thousands of drawings with a few drawings exchanged for a single coordination |
| 81 |
task. This strategy can be used with models: exchange hundreds of tiny models |
| 82 |
(some maybe even only 1MB!), scoped to the task at hand. Keep exchanges small |
| 83 |
and frequent (like code commits, for the geeks reading this). |
| 84 |
|
| 85 |
Filtered model loading |
| 86 |
---------------------- |
| 87 |
|
| 88 |
You may filter elements and only load a portion of the model. Click on |
| 89 |
:ref:`Enable Advanced Mode <Project Info Advanced Loading Mode>` checkbox when loading a model. |
| 90 |
|
| 91 |
|
| 92 |
.. image:: images/advanced-mode.png |
| 93 |
|
| 94 |
This will preload the model and present you with model loading options in the |
| 95 |
:doc:`Project Info </users/user_interface/property_editor/scene_editor/project_overview/project_info>` |
| 96 |
panel. |
| 97 |
|
| 98 |
.. image:: images/advanced-mode-settings.png |
| 99 |
|
| 100 |
**Filter Modes** include: |
| 101 |
|
| 102 |
- **Decomposition**, filter by location in the building, such as **Level 1** or |
| 103 |
**Building A**. |
| 104 |
- **IFC Class**, filter by IFC class, such as **Wall**, **Column**, or **Pipe |
| 105 |
Segments** |
| 106 |
- **IFC Type**, filter by IFC construction type, such as **Copper pipes** and |
| 107 |
**200mm thick concrete slabs** |
| 108 |
- **Whitelist** or **Blacklist**, filter by a custom query |
| 109 |
|
| 110 |
When **Whitelist** or **Blacklist** is chosen, you may type a custom query to |
| 111 |
filter by attributes, properties, location, and so on. |
| 112 |
|
| 113 |
Large polygon counts |
| 114 |
-------------------- |
| 115 |
|
| 116 |
If objects with large polygon counts are blocking you from importing, consider |
| 117 |
enabling **Native Meshes** in the :ref:`Advanced Loading Mode <Project Info Advanced Loading Mode>` when loading projects. |
| 118 |
|
| 119 |
The **Debug Panel** allows you to **Select High Polygon Meshes** or **Select |
| 120 |
Highest Polygon Meshes** to isolate geometrically complex objects by a polygon |
| 121 |
number threshold or a percentage. |
| 122 |
|
| 123 |
After selecting these elements, you can view them in edit mode to see a polygon |
| 124 |
count and where the offending polygons are. Often, fixing a single object may |
| 125 |
cut out 50MB. |
| 126 |
|
| 127 |
Excessive or low quality booleans |
| 128 |
--------------------------------- |
| 129 |
|
| 130 |
In some cases, elements may be generated from external software with an |
| 131 |
excessive (over 50) number of boolean operations or with high polygon, complex |
| 132 |
booleans. |
| 133 |
|
| 134 |
The **IFC Debug** panel has a **Test All Shapes** feature which generates |
| 135 |
geometry for every element one by one and outputs the processing time to the |
| 136 |
console. When you see it stuck on an element, make a note of the element ID. You |
| 137 |
may then use the **IFC Debug** panel's **Inspector** to determine the nature of |
| 138 |
the boolean, or create a **Blacklist Filter Mode** to exclude the element from |
| 139 |
import. |
| 140 |
|
| 141 |
These types of errors are usually problems with external software (i.e. not |
| 142 |
intentionally by the end-user) and typically do not affect critical geometry |
| 143 |
and can be worked around. |
| 144 |
|
| 145 |
Fully resolving boolean issues is a complex case by case topic and not covered |
| 146 |
here. |
| 147 |
|
| 148 |
High number of elements |
| 149 |
----------------------- |
| 150 |
|
| 151 |
Click on :ref:`Enable Advanced Mode <Project Info Advanced Loading Mode>` when loading a model and you will be presented |
| 152 |
with model loading options in the **Project Info** panel. |
| 153 |
|
| 154 |
You may specify an **Element Range** to process. The **Element Offset** says the |
| 155 |
first element to start processing at, and the **Element Limit** says how many |
| 156 |
elements should be processed. For example, in a model with 100,000 objects, an |
| 157 |
**Element Start** of 30,000 and an **Element Limit** of 20,000 will process the |
| 158 |
elements starting at item number 30,000 and ending at item number 50,000. This |
| 159 |
allows you to arbitrarily break down large models into submodels. This can be |
| 160 |
combined with other filters. |
| 161 |
|
| 162 |
Using Blender 3.3 and above will result in a faster load time (~50%) compared to |
| 163 |
older Blender versions. |
| 164 |
|
| 165 |
Processing models headlessly |
| 166 |
---------------------------- |
| 167 |
|
| 168 |
You can automate model processing using this command (~5% speedup): |
| 169 |
|
| 170 |
.. code-block:: bash |
| 171 |
|
| 172 |
blender -b -P headless_import.py |
| 173 |
|
| 174 |
The ``headless_import.py`` script contains instructions on how to configure |
| 175 |
model loading settings. |