How do you convert glTF to Cesium 3D Tiles? - cesiumjs

There doesn't appear to be any clear way to do this, or existing tools.

I have edited the 3D-Tiles-Tools provided by cesiumjs to convert the gltf to b3dm.
For your reference, here is the link https://github.com/Jennyshining/3d-tiles-tools.git
In the repository, samples-generator/lib/myGenerator.js is the entry.
createGltf is the tool to create gltf, createB3dm and createTilesetJsonSingle are used to create 3d tiles.

Related

How to create a geojson file from an image overlay?

I am looking for a way to create a geojson file from the distributions of the health sectors in my region which are different than any political division readily available on osm:
There are fantastic tools such as geojson.io to draw custom polygons but because of the complexity I would need a tool that allows me to overlay an image to use it as a template or that does this automatically. If this makes a difference, I may be able to extract the silhouette with any computer vision library but my problem of how to get from an image or shape to geojson still remains.
Which is the fastest way to approach this?
You can do this using QGIS with manual georeferencing in order to assign real-world coordinates to an image without geo-information. This is done by clicking points on a map that correspond to points on your image. Then once georeferenced you can export the file as a geojson.
Another solution is to find a shape file (maybe this is correct) and simply convert the .shp into a geojson.

How to change the geometry of the two selected models?

I know getSelection() is get the db id of seletion model.
but after this i don't know how to control this viewer.
There are two windows selected by the viewer.
I want to change the geometry of the two windows.
Forge Viewer is open Revit file by my bucket.
viewer.getSelection()
=>(3) [3043, 3055]//how to?
Unfortunately, the viewer isn't designed to support geometry modification. You can modify your design elements in these ways:
changing their position, orientation, or scale (blog)
hiding them, and potentially inserting your own custom three.js geometry instead (tutorial)
changing their materials, incl. using custom shaders (blog)
But if you actually need to tweak the individual vertices of the mesh geometry, that would be very difficult to do.

Does openmaptiles support distributing 3D terrain map tiles?

Can OpenMapTiles software dispense 3D terrain data?
I would like to render 3D terrain data in Cesium where the user can see the 3D terrain heights of the terrain when viewed from the side in an offline map server environment.
An example of what I am trying to achieve is this Cesium sandcastle example https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Terrain.html
I am familiar with OpenMapTiles' hillshade and contour map tiles. My understanding is that hillshade tiles are raster only.
I would like to use USGS National Elevation Dataset (NED) tiles, but I don't know how to convert that data to a vector format that OpenMapTiles could send and Cesium could understand.
Looking at the Cesium documentation for imagery providers it looks like Cesium is looking for data in a "quantized-mesh" format for one image provider type. I am not exactly sure what the GoogleEarthEnterprise or VRTheWorldTerrainProvider formats are using.
Any pointers or suggestions is appreciated.
Thanks

Adding 3D model KMZ with Google Maps API: is it possible?

I'm wondering if it's possible to add a 3D model made in Sketchup, exported o KMZ format, to a Google Map, with the Google Maps API. I was able to add KMZ layers that contained simple data as landmarks and such, but when I try to load the 3D model KMZ, the map just shows a default house file icon.
The test map can be accessed here: http://thebob.com.br/maptest/kmz_test.html
The KMZ file is hosted here: https://sites.google.com/site/dmgckmlfiles/kml-files/Bulk_carrier_1509.kmz
At this point I'm just guessing it's not possible to add 3D models like this into Google Maps (as the exact same thing happens if I import the file through My Maps), but I want to make sure of that before giving up.
Thanks in advance for any info!
Well if you are pertaining in Google JavaScript API, Yes this API does support the KMZ as you can see in this link about Supported KML elements. But the 3D object is not.
Also, according to this SO question, that 3D is not yet features in Javascript API. Closest things to this are Styled Maps. Only the Android implementations are available as of now.
But I found this tutorial that can help you if you still want 3D objects.

HTML5 / JavaScript / WebGL viewer of KMZ / KML 3D OBJECTS?

Is there any HTML5/javascript/webgl viewer of KMZ KML 3D OBJECTS ?
i would like to use WEBGL technology to render kmz/kml 3d object (building) created in sketchup and uploaded to google warehouse.
Target is to use browser technologies instead of flash/java to render 3D product overview on white backgrdound with only horizontal rotation.
Thank you for any suggestions
Three.js has a ColladaLoader. SketchUp can export to Collada, and that's what KMZ files use. It's the .dae file in the KMZ.
I built a small library called kamikmz exactly for this purpose. The problem with loading a Collada model straight up is that you need to have the images referenced as textures available on the correct path as well. To overcome this issue I use the jszip library to unzip the kmz file right in the browser and the pass it to threejs.
Right now the library is still in development and has some performance issues when it comes to loading large models, however it works fine for most cases.