Skip to main content
Solved

Cesium 3D Tiles miss some features when converting from IFC


mariaka
Contributor
Forum|alt.badge.img+13

Hi all,

I’m facing some troubles converting IFC data to Cesium 3D Tiles.

Background:

  • I have several IFC files containing mostly 3D objects concerning civil engineering
  • source coordinate system: EPS:2056
  • different, user-defined PropertySets
  • different IFC versions

Goal:

  • Cesium 3D Tiles with all attributes (PropertySets)

What I did so far (transformers in FME):

  • Adding a dynamic reader with autodetecting IFC version
  • Extracting PropertySets from Geometry
  • Doing some cleaning on Geometry, i.e. removing extra Bounding Boxes and adding Vertex Normals
  • Scanning the schema
  • Writing dynamically to Cesium3DTiles
  • FME Version: 2024.2.1.0 (Build 24801)

Problems:

  • some features are missing

I cannot see why some features/objects are missing. They obiously run through all transformers until the writer. There are no errors, only 2 warnings saying:
NOT changing coordinate system of reader identified by keyword `IFC_1' from `EPSG:2056' to `IFC_COORDSYS_0' -- mapping file setting of `EPSG:2056' overrides coordinate system `IFC_COORDSYS_0' read from file
and
Geometry instance was modified, the geometry definition will be instantiated

When inspecting the data just before the writer I cannot see any difference to other objects. They all are the same geometry type.

Questions:

  • Do I miss some validations?
  • Are there any more requirements for writing Cesium 3D Tiles?

Cheers,
MariaKa

Best answer by virtualcitymatt

virtualcitymatt wrote:
mariaka wrote:

I just let my collegue run the workspace - with the same result.

Additionally I published the workspace on an FME Flow instance (2024), again with the same result. If I add a tester, which filters the subjected objects, the result is empty.

@virtualcitymatt Can you please add a Tester and see if the result is empty or not?

If there are any files written, can you please give them to me?!

Sure- here I output to gltf and obj with the same filter

Ahh but 3DTiles was empty - The issue is that these features are being treated as schema features rather than data features.

These 3 features are the first features for each of the feature types. On the features there are is a special fme attribute which controls this. “fme_schema_handeling”. The value of this is “schema_only”. It means that the first features for each feature type will be treated as only a feature and will be used to define the output schema, the remaining features will be written as data features. 

The FeatureMerger after the ScemaScanner joins the schema onto all the features including this unexposed attribute.

From what I can see you want to fanout by the fme_basename, but I see that the fme_basename isn’t included as an attribute on the schema feature. This shouldn’t matter for writing.

If you change the settings of the SchemaScanner to also GroupBy the fme_basename this should help.

I also skipped out all the stuff at the end and just ran the schema scanner output directly into the writer. Because the SchemaFeatures come out fist these are used by the writer to define the feature types one at a time in order. 
 

 


 

View original
Did this help you find an answer to your question?

10 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+35

One thing you can check is to try using the gltf writer to see if there are any warnings about skipped geometries although I would expect the 3DTiels writer to also let you know

I know that for GLTF (and by extension 3D Tiles) the formats are sensitive to invalid mesh geometries. I’ve found that I’ve had to do quite a bit of fixing of geometries for FME to not skip parts of the file. for me the issue was made obvious because I was merging all meshes together into a single feature, if there were any parts which were bad then the whole geometry got skipped.


mariaka
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • January 14, 2025

@virtualcitymatt Thanks, that helped a bit. This writer didn’t write these objects either. 😶
In the meantime I also tried other 3D-writer (besides GLTF): OBJ, FBX, STL, COLLADA, USD, CITYGML and OGCKML. None of them wrote these objects and didn’t give me any errors/warnings.

I would like to provide some sample data and appreciate it very much if someone could find out why some objects couldn’t be written. The data is manipulated in their location and all the attributes were removed (due to privacy policy), but the geometries and relevant id attributes were preserved.

Format: IFC 4x3 | Coordinate System: EPSG:2056 (Swiss LV95)

The objects/features, which won’t be written have the IDs (GlobalId):

  • 2zviPsSmT5G948E$6Sjy2o

  • 2zviPsSmT5G948E$6Sjy8$

  • 2zviPsSmT5G948E$6Sj$y0


virtualcitymatt
Celebrity
Forum|alt.badge.img+35

Hmm, which version of FME are you working with? I just tried this dataset in FME 2024.2 and had no issue in the output. The 3 reported features seemed to be there.

 


mariaka
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • January 14, 2025

Same, 2024.2.1.0 (Build 24801), running on Windows 11, 64bit


mariaka
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • January 14, 2025

I just let my collegue run the workspace - with the same result.

Additionally I published the workspace on an FME Flow instance (2024), again with the same result. If I add a tester, which filters the subjected objects, the result is empty.

@virtualcitymatt Can you please add a Tester and see if the result is empty or not?

If there are any files written, can you please give them to me?!


virtualcitymatt
Celebrity
Forum|alt.badge.img+35
mariaka wrote:

I just let my collegue run the workspace - with the same result.

Additionally I published the workspace on an FME Flow instance (2024), again with the same result. If I add a tester, which filters the subjected objects, the result is empty.

@virtualcitymatt Can you please add a Tester and see if the result is empty or not?

If there are any files written, can you please give them to me?!

Sure- here I output to gltf and obj with the same filter


mariaka
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • January 15, 2025

@virtualcitymatt Thank you! I still don’t see any differences to other objects. They seem random. Do you also run FME on Windows 11, 64bit?

I don't understand why it doesn't work on FME Flow (Hosted). 🤔


virtualcitymatt
Celebrity
Forum|alt.badge.img+35
  • Celebrity
  • Best Answer
  • January 15, 2025
virtualcitymatt wrote:
mariaka wrote:

I just let my collegue run the workspace - with the same result.

Additionally I published the workspace on an FME Flow instance (2024), again with the same result. If I add a tester, which filters the subjected objects, the result is empty.

@virtualcitymatt Can you please add a Tester and see if the result is empty or not?

If there are any files written, can you please give them to me?!

Sure- here I output to gltf and obj with the same filter

Ahh but 3DTiles was empty - The issue is that these features are being treated as schema features rather than data features.

These 3 features are the first features for each of the feature types. On the features there are is a special fme attribute which controls this. “fme_schema_handeling”. The value of this is “schema_only”. It means that the first features for each feature type will be treated as only a feature and will be used to define the output schema, the remaining features will be written as data features. 

The FeatureMerger after the ScemaScanner joins the schema onto all the features including this unexposed attribute.

From what I can see you want to fanout by the fme_basename, but I see that the fme_basename isn’t included as an attribute on the schema feature. This shouldn’t matter for writing.

If you change the settings of the SchemaScanner to also GroupBy the fme_basename this should help.

I also skipped out all the stuff at the end and just ran the schema scanner output directly into the writer. Because the SchemaFeatures come out fist these are used by the writer to define the feature types one at a time in order. 
 

 


 


mariaka
Contributor
Forum|alt.badge.img+13
  • Author
  • Contributor
  • January 15, 2025

Ah! I see! That’s it! Thanks ​@virtualcitymatt !

That means: The writer needs a “blank” feature conatining the schema to dynamically read the schema from that feature. Right?! And it always takes the first feature? In case some sorting will be done in between I have to make sure that no needed geometry data will get lost as schema feature (and re-sort again)?!

 


virtualcitymatt
Celebrity
Forum|alt.badge.img+35
mariaka wrote:

Ah! I see! That’s it! Thanks ​@virtualcitymatt !

That means: The writer needs a “blank” feature conatining the schema to dynamically read the schema from that feature. Right?! And it always takes the first feature? In case some sorting will be done in between I have to make sure that no needed geometry data will get lost as schema feature (and re-sort again)?!

 

It doesn’t have to be blank, but everything in it will be ignored for the first feature, yes. Usually the SchemaScanner just handles all this and should be used right at the end before the output. That should give you you’re best chance of a clean workspace and a clean output.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings