I am glad to introduce Babylon IFC Viewer, which allows to load IFC files from URLs or via drag-and-drop, with automatic metadata extraction and 3D rendering.
One may export displayed IFC models to GLB with the help of the Inspector tools.
Babylon.js - Fully working 3D scene with camera controls
web-ifc - Initialized with proper WASM loading
IFC Loader - Unified loading function for URLs and File objects
Metadata Extraction - Project info, buildings, units, and property sets
Material Merging - Intelligent mesh merging to reduce draw calls (needs further optiimization)
Transparency Handling - Proper rendering of transparent materials
Drag-and-Drop - Drop .ifc files onto the canvas to load them
Automatic Cleanup - Previous models are properly disposed when loading new files
Still at the current stage it is just the initial proof of concept.
Nice. Do you have any suggestion about element selection and highlighting?
As lots of objects are merged to reduce draw calls, it lost the individual element ID. One of the method i can think about is to cache the original element face/vertex range to indexing back the original geometry. Not sure if there is any better ways.
At the moment individual elements are presented as submeshes (which is not good for draw calls but gives the access to those elements). It is possible also to use Face Index Mapping together with some other approaches as well to use the Object Tree from IFC.
Anyway, I’ll add different merging options during the further development.
If you install IFC Loader locally, the Inspector is called with Ctrl+I.
I separated Loader repo from Viewer repo but they have the same demo site.
The Viewer has no Inspector at the moment but it will be added later.
Would be great if you could share some challenging IFC file to test.
I didn’t implement workers in Loader yet, but it is possible.
The current optimization is simple - all meshes and materials are frozen.
I was concentrated more on IFC tree UX.
Now I am going to deal with material UX and visualization.
I have in mind different possible merging/instancing approaches. At the moment meshes are merged by construction type and separated as in IFC tree, but of course it is possible to reduce draw calls further.