3dcitydb / importer-exporter

3D City Database client for high-performance import and export of 3D city model data
Apache License 2.0
128 stars 55 forks source link

Exporting trees #109

Closed kekar004 closed 4 years ago

kekar004 commented 4 years ago

Hi! I'm exporting trees from 3DCityDB 3.3.1 in PostGIS as vegetation in kmz. The trees surfaces are visible in FME and in Sketchup (see attached file). I just want to see the transparent appearences. Is this related to some bug in the exporter tool? Another question is if it's possible to get the appearences "by reference" instead of "by value" in the kmz? Every single tree gets its own appearance instead of pointing to the same appearance as other trees have. There are just three appearences. The kmz-file now gets extremely large when exporting all the municipalitys trees to a file. Best regards, Ken Karlsson

Faulty trees

clausnagel commented 4 years ago

Hi @kekar004, can you please provide a test dataset so that we can investigate the issue?

kekar004 commented 4 years ago

Hi @clausnagel, I've attached the test dataset as a zip-file since kmz-files are not allowed. I also forgot to mention that the dataset shows up fine in Google Earth.

Trees_test_Tile_0_0_collada.zip

clausnagel commented 4 years ago

I also loaded your dataset with Google Earth and the visualization looks just fine. So, I do not see an issue in the exported data or a bug in the exporter tool. Maybe you have to check the rendering settings of the tools you use?

image

If you use implicit geometries with global appearances in your original CityGML dataset, then the exporter tool makes sure to reuse texture files in the KML/COLLADA export. Have you checked your CityGML whether implicit geometries are used?

kekar004 commented 4 years ago

Thank you for the answer. I will check if implicit geometris were used when loaded into the database. About the visualization problem I was thinking the same thing as you; that it's a rendering setting of the tools that I'm using. But I can't find such a setting in either FME or Sketchup. When trying to import the kmz-file into Sketchup it looks like this (only one tree shows up, Sketchup doesn't seem to support the kmz-file out of the box. The trees look the same when I have converted the kmz-file to a Sketchup-file in FME to show all trees): Faulty trees 2 So I'm really wondering what's going on here...

clausnagel commented 4 years ago

I have tested some tree datasets with transparent textures, and the COLLADA exports are visualized correctly in Sketchup. Can you share a subset of your original CityGML dataset for testing purposes?

clausnagel commented 4 years ago

Hi @kekar004, thanks for providing the CityGML test dataset. There are some some issues in the data, but I was able to correctly view the data in Sketchup:

image

To get this result, go to "Preferences -> KML/COLLADA/glTF Export -> Rendering -> Vegetation" and check the option "Ignore surface orientation ..." in the "COLLADA/glTF display options". I assume that there are problems with the geometry of the billboards, but I have not checked this in more detail.

kekar004 commented 4 years ago

Hi @clausnagel, thank you for the answer. Now it works! I guess we will check the double sidedness next time we import a new full dataset (which we soon will do). The option you mention implies that the problem is double sidedness of the surfaces.