Comments (7)
So I was able to fix this problem now. :-)
In addition to move the 'generate gltf model from collada' block behind the 'image saving' block (otherwise the collada2gltf tool will start converting before all textures are written to disk) you also have to change the following lines
ProcessBuilder pb = new ProcessBuilder(collada2gltfPath, "-f", buildingDirectory + File.separator + colladaBundle.getGmlId() + ".dae", "-e", "true");
pb.start();
into
ProcessBuilder pb = new ProcessBuilder(collada2gltfPath, "-f", colladaBundle.getGmlId() + ".dae", "-e", "true");
pb.directory(buildingDirectory);
pb.start();
to set the right working directory for collada2gltf to make it find the texture files.
from importer-exporter.
Hi Donato,
thank you for your input.
There are two reasons why I don't want the textures to be embedded in the glTF file.
- The entire files size can be reduced since the exported .dae and .gltf assets share the common textures
- Cesium (starting from version 1.16 ) supports incremental loading of glTF model’s textures. This feature may give a better user experience when loading glTF models with detached textures.
best regards,
Zhihang
from importer-exporter.
Hi Zhihang,
The entire files size can be reduced since the exported .dae and .gltf assets share the common textures
But in which case would you need both, the .dae and the .gltf files? I made some changes to the exporter so that the .dae and .jpeg files will be deleted after creating the .gltf, and the .kml files will reference the .gltf file instead of the .dae. So there isn't an increase in files size.
Cesium (starting from version 1.16 ) supports incremental loading of glTF model’s textures. This feature may give a better user experience when loading glTF models with detached textures.
Yes, I noticed that. So I will go back to detached textures I guess.
Best regards,
Donato
from importer-exporter.
Hi Donato,
combined with COLLADA .dae files the exported 3D models can be visualized not only in Cesium but also in Google Earth by using the KML file which is located in the same folder as the master JSON file. It could be useful in many use cases.
best regards,
Zhihang
from importer-exporter.
Hi Zhihang,
I see. I'm still wondering how the exported gltf files are loaded into Cesium. Maybe you can give me a little hint about this?
In my application I'm adding a new collada layer like this:
colladaLayer = new CitydbKmlLayer({
url : './data/berlin_collada_MasterJSON.json'
});
It works fine. And it still works when I'm deleting the .dae files so that there are only the .gltf and .jpeg files left in the tiles directories. I wasn't able to find out how the .gltf files are referenced, since the files like berlin_Tile_0_1_collada.kml only contain links to the .dae files.
Best regards,
Donato
from importer-exporter.
Hi Donato,
the referencing of .dae files is internally switched to the glTF files by the 3dcitydb-web-map
https://github.com/3dcitydb/3dcitydb-web-map/blob/master/js/CitydbKmlDataSource.js#L1341
best regards,
Zhihang
from importer-exporter.
Hi Zhihang,
found the code line one minute ago. ;-) But thanks!
Best regards
Donato
from importer-exporter.
Related Issues (20)
- Date error when exporting HOT 2
- importer for surfaces with inner rings creates invalid POLYHEDRALSURFACE HOT 2
- Installation issue on mac HOT 2
- NoClassDefFoundError: org/citydb/gui/plugin/view/ViewExtension when running the Importer/Exporter CLI HOT 4
- 3DCityDB-Importer-Exporter-4.3.0-Setup.jar does not install core, only plugins HOT 6
- Problem with citygml file validation HOT 3
- When using the CLI import options, can I specify that it should update? HOT 1
- Properly calculate the area/volume of a building/city object HOT 2
- Can't export to tiled CityGML files HOT 8
- 3d CityDatabase HOT 12
- Thank you! @clausnagel
- Bug in About link HOT 1
- Importer/Exporter 5.4.2: ADE manager tab gone? HOT 3
- ERROR: geometry requires more points HOT 2
- GLTF Export -> All Buldings in one gltf file? HOT 1
- CityJSON 2.0 support HOT 2
- 3DCityDB Import Fails: A fatal error occurred during import. HOT 4
- Problems with ADE Manager and ADE with association class HOT 1
- Suggestions to improve ADE manager log messages HOT 3
- WARNING: An illegal reflective access operation has occurred HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from importer-exporter.