Closed xeolabs closed 4 years ago
I don't think there is a problem with the windows there. The gray comes from spaces. Windows are 100% transparent, but spaces are gray without transparency. And without spaces:
Good catch - I just confirmed that the pipeline is actually handling colors OK, and XKT is loading them OK as well.
So, XKTLoaderPlugin & GLTFLoaderPlugin are using original IFC colors correctly, it's just that the IfcSpace elements were making it look like there was a colors bug.
By configuring objectDefaults
to make IfcSpace
elements 0.2 opacity (or just invisible), we see the original IFC colors coming through:
const xktLoader = new XKTLoaderPlugin(viewer, {
objectDefaults: {
IfcSpace: {
pickable: false,
opacity: 0.2
}
}
});
where Duplex seems to show all colors parsed correctly (within the IFC->COLLADA->glTF->XKT pipeline) - see screenshot.
Not an issue, all works nicely - verified by: https://github.com/xeokit/xeokit-sdk/commit/50dacbcd6180a2eaeae3948d7c61b13eeff27876
Live example: https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_Duplex_originalIFCColors
To make
XKTLoaderPlugin
use the colors from the original IFC file, we configureXKTLoaderPlugin
to not use the per-IFC-type colors specified inobjectDefaults
.However, those colors don't look so good, because the
xeokit-gltf-to-xkt
pipeline tool seems to be parsing the glTF colors incorrectly.An example is the windows on the Duplex model, which should be transparent:
Cause
WIP