Hi, I recently got access to the Ion evaluation license and currently exploring
terrain-tiler. Is there any way to generate
GLTF models from DEM along with
terraindb file? I tried out
3d-tiles-next-gltf option but it generates tiles in GLTF model but I want a single GLTF file for the raster.
If it’s not possible using Ion, can you suggest some other way to generate OBJ/GLTF from DEM? I tried
Blender GIS but these are not good enough for my use case, since I might need to generate huge GLTF models and that should happen fast. Thanks!
Thanks for your question. I do not know of a tool that does exactly what you are looking for, although it is possible that another member of the community does.
Can you tell us more about what you are seeking to accomplish? What is the end goal of converting this DEM data to a 3D model? glTF may or may not be the answer for you, but knowing more about your use case may help us provide a better recommendation.
Thanks for your reply, my use case involves converting part of DSM into a GLTF model so that users can visualize the cut-fill volume in 3d, something like this -
- Clip the DSM using drawn polygon
- Convert the clipped DSM into the GLTF model
- Color the parts of the model in red if it’s cut otherwise color it blue if it’s fill
So far I’ve tried following -
- Wrote blender script which takes DSM and converts it’s into GLTF model (but it fails for larger areas)
QGIS2Threejs plugin which also converts DSM into GLTF model but again takes a lot of time for the larger area
I was thinking that
terrain-tiler can also convert it DSM to GLTF but instead, it generated each tile in GLTF format which is not what I want.
Thanks for providing those details. I understand what you are trying to achieve now, but unfortunately we do not offer anything along the lines of what you are looking for. I would normally recommend seeing if the Blender or QGIS communities have any discussion around this, but I see that you’ve already looked into that.
As I mentioned, another member of the community may have an idea here. If you end up thinking of a different approach or have related questions, please feel free to comment further, and we’ll do our best to assist.
Thanks, Matt! Is this (DEM → GLTF) something on the ION 3D tiling pipeline’s roadmap?
Thanks for the follow-up question. No, at the moment we don’t see this as aligned with our roadmap. Our goal is to allow users to stream terrain data efficiently, and 3D Tiles is the best option for that. glTF is of course valuable to us and our users, but for the purposes of streaming terrain, our focus is on converting DEM to 3D Tiles.
If you run a couple searches through the CesiumJS forum, there may be other ways of doing what you are trying to do. I took a quick look, and it seems like your goal may be tricky to accomplish (e.g., this thread), but the discussion may prove informative to you nonetheless.
Thank you for your reply, I’ll check the link.
I’m thinking of one approach, I’ll create the mesh (in OBJ or GLTF) for the entire DEM beforehand using AGISoft metashape of a similar tool, and whenever users request, I’ll just clip the mesh using the drawn polygon and show it to the user. Is there any way to clip the model on the cesium? Otherwise, i’ll have to do that on the server somehow.
There is a way to clip the terrain model in CesiumJS. I recommend using the
This tool allows you to selectively disable rendering in a given region of your terrain data. Here is a sandcastle example that showcases how the
ClippingPlane tool can be implemented in your code.
Please do not hesitate to reach out if you have any other questions or concerns.
Hi @Matt_Boyd-Surka and @sam.rothstein , I’m trying a different approach to generate a 3d model which doesn’t involve DEM. Since we have the terrain tiles which are basically mesh, using
requestTileGeometry I can get
QuantizedMeshTerrainData which has necessary information like mesh vertices and faces (indices) and elevation. Using this data, I think I can recreate mesh and export it in GLTF format.
This is just an idea, I haven’t tried it, is it something possible? Also, is there any way to convert
.terrain file into
GLTF format directly?
Thank you for reaching out and sharing your idea. To the best of my knowledge, this should be possible. However, I am not certain what the exact implementation will look like. It is definitely worth checking for 3rd party tools to convert a
.terrain file into a
OBJ or a
Thanks for your reply, I’ve opened a different topic for discussing this new approach - Terrain mesh to GLTF models
I’d really appreciate it if you or someone from the team can nudge me in the right direction and provide me some basic code to start with. I’m documenting my trials/progress in the new ticket
Sounds great! I will reach out to the rest of the team to see if anyone has any specific recommendations. I am also hoping that our open-source community will chime in