-
Notifications
You must be signed in to change notification settings - Fork 257
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug 📝
*The IFC2x3 and IFC4 files used to reproduce this issue were shared directly with antonio@thatopen.com
What happened:
I have two IFC files generated from the same Revit model:
- One exported as IFC2x3
- One exported as IFC4
When loading the generated fragment binaries in a self-built viewer using @thatopen/fragments:
- ✅ The IFC2x3 → .frag file renders all element colors correctly
- ❌ The IFC4 → .frag file renders only some elements correctly (e.g. wood beams), while most other elements appear dark grey
- Both files are processed and loaded using the same fragment pipeline and viewer code.
What I expect:
- The IFC4 export should display the same element colors as the IFC2x3 export, since both originate from the same Revit file.
What actually happens:
- In the IFC4 version of .frag, many elements lose their colors and fall back to the default dark grey material, while a subset of elements (e.g. wood beams) still retain their colors.
Assumption:
- When converting IFC4 to .frag, the structure changes compared to IFC2x3. For example, IFC4 uses a different structure and does not have the
IFCPRESENTATIONSTYLEASSIGNMENTentity to directly linkIFCMATERIALwith the correspondingIFCCOLOURRGB. As a result, the “color–element” relationship may not be fully preserved in .frag, causing the colors to default to grey.
Test:
- Both IFC4 and IFC2×3 files show the same color output at https://thatopen.github.io/engine_web-ifc/demo/:
- To rule out its related to my setup or configuration issues on my side, I also tested running the same file through
engine_fragmentsexample IFC importer locally, and observed the same missing color behavior there as well:
Screenshot Demo:
- IFC2x3 → .frag (correct color):
- IFC4 → .frag conversion (some loses colors and becomes dark grey):
Reproduction ▶️
No response
Steps to reproduce 🔢
No response
System Info 💻
System:
OS: Linux 5.15 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
Memory: 13.25 GB / 15.50 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 22.14.0 - /home/hwrdpvt/.nvm/versions/node/v22.14.0/bin/node
Yarn: 4.9.2 - /home/hwrdpvt/.nvm/versions/node/v22.14.0/bin/yarn
npm: 10.9.2 - /home/hwrdpvt/.nvm/versions/node/v22.14.0/bin/npmUsed Package Manager 📦
npm
Error Trace/Logs 📃
No response
Validations ✅
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
- Check that this is a concrete bug. For Q&A join our Community.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working