-
Notifications
You must be signed in to change notification settings - Fork 264
Importing IFC Models
Lindsay Kay edited this page Apr 23, 2018
·
3 revisions
We'll use IFC models from the Schependomlaan dataset, which is pretty much the BIM equivalent of the "Utah Teapot".
We'll use these CLI tools to transform IFC into glTF:
- ifcConvert to convert IFC files to DAE
- COLLADA2GLTF to convert DAE to glTF
- gltf-pipeline to optimize glTF
We'll assume that these are installed relative to the current working directory.
./IfcConvert schependomlaan.ifc schependomlaan.dae
./COLLADA2GLTF/build/COLLADA2GLTF-bin -i schependomlaan.dae -o schependomlaan.gltf
Optionally, we can do a bunch of optimizations to the glTF, such as compress geometry:
node ./gltf-pipeline/bin/gltf-pipeline.js -i schependomlaan.gltf -o schependomlaan.optimized.gltf
var model = new xeogl.GLTFModel({
src: "path/to/model/schependomlaan.gltf"
});
var scene = model.scene;
var camera = scene.camera;
camera.eye = [-14.63, 22.88, 10.04];
camera.look = [10.98, 5.82, -11.23];
camera.up = [0.35, 0.88, -0.29];