how to show flood

359 views
Skip to first unread message

lovepa...@gmail.com

unread,
Jul 9, 2018, 5:20:44 AM7/9/18
to cesium-dev
hello:

I am new in cesium .
I want to make an effect of a model being flooded.In my consider,first calculate a result which is a terrain data of the model region.and then show a transparent picture with the terrain data or render the terrain data by blue color ,so that it looks like a flood .
now I have a test terrain data ,how can i do the things.

thanks very much !

Gabby Getz

unread,
Jul 9, 2018, 3:37:46 PM7/9/18
to cesium-dev
Hi there,

To shade the terrain, take a look at Globe Materials.

If you want to show the surface of the water, depending on the scale, you can use a rectangle or ellipsoid entity.

If you need to process and host your terrain data, take a look at Cesium ion.

Thanks,
Gabby

Michele Andreolli

unread,
Jul 10, 2018, 6:41:02 AM7/10/18
to cesium-dev
Hi,

I'm experiencing the same theme (floods) in a new project.
There are multiple solutions to display this kind of event, but everything depends on your datasets source and on what you want to visualize, just the water layer or more detailed information about the floods?

Anyway, I here is my workflow, it is a little bit complex, but you could adjust it for your scope:

Source Dataset:
  1. Water: Raster image Geotiff - Elevation grid: it describes the heights of the water in different area of the city, it is the result of a engineering simulation software
  2. Buildings: Vector Shapefile - Footprints + extra attribute for the height of each building or DSM - Digital Surface Model
Process the water dataset:
  1. Convert the raster to point cloud format (las - there are different software) and import it in CloudCompare software
  2. Create the mesh from the point cloud with the Delaunay algorithm inside Cloud Compare
  3. Export to OBJ format and check the pivot position (it is easier if the pivot is located at axes origin)
  4. Convert OBJ file to GLTF with the online converter
  5. Load the GLTF file into Cesium setting the pivot coordinates
Process the building dataset:

For what concerns the 3D building I have tested 2 solutions:
  1. The first one is to create a 3d model of the city through the extrusion of  the single shapes (this could be done in several ways), and import into cesium as a GLTF model or as 3DTiles (this step is working in progress)
  2. The second on is to import the DSM in Cesium ION and merge it with the Cesium Terrain


3D building


DSM on Cesium ION


Hope this could help you!


Best Regards,

Michele

Jane Xu

unread,
Jul 10, 2018, 9:32:15 AM7/10/18
to cesium-dev
Hi! 

Here's a relatively straightforward sandcastle example that may be helpful to you. I used an extruded translucent blue polygon to represent the "water" to cover the state of Colorado. Hope it can be useful in some way c:


On Monday, July 9, 2018 at 5:20:44 AM UTC-4, lovepa...@gmail.com wrote:

오유상

unread,
Aug 6, 2018, 3:40:10 AM8/6/18
to cesium-dev
Nice tips here!!
Thank everyone

Poul Sørensen

unread,
Oct 1, 2018, 5:28:39 PM10/1/18
to cesium-dev
Looks awesome

Is it possible to show a mesh instead of a horizontal polygon? If i had an additional terrain mesh that representing a protective surface for aviation and tiled it up to .terrain files, could i then show this mesh in the same way as the water?

Omar Shehata

unread,
Oct 4, 2018, 7:52:50 AM10/4/18
to cesium-dev
You could combine two terrain sources while tiling, but I don't think CesiumJS supports multiple terrain providers and positioning them separately like that.

This sounds like an interesting use case though, feel free to open another thread and we might get some ideas on implementing this particular effect.
Reply all
Reply to author
Forward
0 new messages