I am trying to make a visualization for rising sea levels and it works fine when the camera is close to the terrain, but as I pull the camera further from the terrain the terrain detail becomes lower poly making the visualization of rising sea level less accurate.
Is there an easy way render what the water looks like when the terrain is higher fidelity and use that as an image to drape over the terrain when the camera zooms out and the terrain is low fidelity?
Is there an easy way render what the water looks like when the terrain is higher fidelity and use that as an image to drape over the terrain when the camera zooms out and the terrain is low fidelity?
I’m afraid there’s no out-of-the-box way to do this. I suppose you could do this manually, but that would be a great amount of labor if you’re visualizing sea levels on a larger scale. Based on the gif you attached, I assume you’re doing this on a near-global scale if you’re going to zoom out that far?
I might suggest trying to use a custom material to add a water effect. You can do this by creating a copy of the CesiumDefaultTilesetShader and CesiumDefaultTilesetMaterial in the plugin’s Resources folder. (Make sure the copied material actually references the copy of the shader graph, and not the original shader.)
Then, you could add a parameter that represents the rising sea level, and use that to color the terrain blue, or apply a more convincing effect. The one challenge I could think of is making sure that this sea level is measured relative to the center of the Earth, and not in the flat y-direction in Unity space. So you’ll probably have to pass that into the shader as well.
Let me know if this summary makes sense! It’s not something I’ve tried out, but I think it could get close to what you want to achieve.