Question

I converted ifc file to GLTF, but I will eventually lose globalID information.

  • 6 December 2018
  • 3 replies
  • 20 views

The meshes in the generated GLTF file is split into multiple meshes, and nodes' name does not have the information of globalID


3 replies

Userlevel 1
Badge +10

Thanks for your question @liaoweiqi1997! glTF is a geometric format and doesn't seem to support user attributes. However, FME does save the geometry names as the node names property in the glTF files. You can use the GeometryPropertySetter to set the Geometry Name property to the GlobalID attribute (see attached screenshot below). I hope this helps!

Userlevel 1
Badge +10

Here's another approach that Safe Software's own @dmitribagh prepared. He used FME to generate a JSON file that contained feature attributes values in a json array:

The json was constructed using an AttributeCreator, as shown above and output to a json file using a Text File (TEXTLINE) Writer .

Check out his demo here where he brought in Building IDs using JSON and associated them with the geometries in the glTF using javascript. This was possible because he noticed that the geometries were being loaded in the same order in his three.js viewer.

Badge +1

Hi Everyone,

 

This Post has helped me a bit to understand how the .glTF works, but I am still struggling with the colour scheme. I have managed to save the GlobalId as the Node Name in .JSON.

 

What I dont seem to manage with is changing the Colours that are in the .JSON file. I have managed to find the material colour in the IFC file, also to change them, but I am not sure how to plug them back into the Feature Writer for the .glTF Format. Can anyone point me in the right direction or give some insight what the next step should be?

 

Below the .JSON file with the Materials

FME file is also attached.

 

 

IFC_GLTF.fmw

 

Regards

Fred

Reply