We are asking for your help to use the DEM data that we have (OR the existing Cesium terrain) to show these areas of higher and lower elevation in the terrain relief.
I have run the models through the Cesium Ion tile set creator and that works great.
I also have pushed the DEMs up through Cesium Ion tile set creator, but I do not understand how to use the DEMs in this display.
Could you please show me the code required to add the DEM tile set to the existing display ?
Thank you !
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
To get terrain height you can use sampleTerrainMostDetailed like in this example , but it looks like it doesn’t take into account the terrain exaggeration, so you might have to multiply that to the height you get yourself. Does that make sense?
Finally, for the fly camera sequences, here’s an example I had from a different thread, to fly to a box, and then tilt. It’s a bit simpler and it shows you how you can string along these various flyTo commands to create a smooth tour.
Please comment and tell us if you have suggestions for improving this viewer ?
We will eventually have two views of this, one in the higher location proposed by the power project developer, and one in a lower location that we believe will be much less visually obtrusive.
I can’t properly express our gratitude for your help with getting this stuff to work.
Until that gets fixed, you can disable log depth with:
viewer.scene.logarithmicDepthBuffer = false
``
And that should make the initial smoother. The other thing is that it seems to take a while to load your custom terrain under the buildings. I think that’s because it’s loading terrain far in the distance before the one under the buildings. It makes it load much faster if the camera is facing down, so it might be worth starting the initial camera view to be tilted more downwards, and then maybe after a few seconds delay it can tilt back?
This is looking really great so far! I think your trick with the terrain exaggeration so you can put your own local terrain is pretty clever. I don’t remember if I already suggested this, but did you try combining your terrain with Cesium World Terrain in ion? You can do that when uploading your terrain and choosing Cesium World Terrain as your “base terrain”. I haven’t tried this myself but it might be more efficient/worth a shot. I’m just curious if you already tried that and ran into problems with it?
I’m excited to see where this goes! You should be able to add HTML buttons that trigger JavaScript code to set a view, or add/remove buildings. You could also potentially do something like this 2 synced views demo:
Although I think if the two proposals are in different locations, having a button that flies to each site would work better.
Omar,
Yes I was thrilled with this level of success !
And I want to provide you with effective feedback and answers to your questions, so that incorporate our trial and error results into your knowledge.
I added the code to turn of depth buffer, that is live and seems to work.
I tilted the “pitch” of the camera from -9 to -18 and that seems to change the view a bit and it does load the foreground terrain better !
I cannot remember if I merged the uploaded DEM with default or Cesium terrain, and I do not know how to determine that from the assets list in Cesium Ion.
Biggest problem is that we are going back to the default Cesium terrain with no DEM added because the terrain is WAY too hilly (not at all realistic) with the DEM in place.
I’ll still be using the methods for other viewers on other projects, but I think for this one we are going back to the default Cesium terrain with some exaggeration.
There will be a slightly more elaborate model in the final product.
HERE is the demo viewer style that we are probably going with, it will be used on a different website by Monday.