Generate GLTF model from raster (DSM) instead of terrain

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 qgis2threejs and 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!

Hello,

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,
Matt

Hi Matt,

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 -

image

Steps -

  1. Clip the DSM using drawn polygon
  2. Convert the clipped DSM into the GLTF model
  3. 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 -

  1. Wrote blender script which takes DSM and converts it’s into GLTF model (but it fails for larger areas)
  2. Used 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.

Hi,

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.

Matt

Thanks, Matt! Is this (DEM → GLTF) something on the ION 3D tiling pipeline’s roadmap?

Hi,

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.

Thanks,
Matt

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.

Hi @atul-sd,

There is a way to clip the terrain model in CesiumJS. I recommend using the ClippingPlane tool.

https://cesium.com/learn/cesiumjs/ref-doc/ClippingPlane.html?classFilter=clipping

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.

Best,
Sam