The height of the sea is not 0

The height of the sea is not 0
I want to set the height of the sea surface to 0 uniformly to facilitate data processing. How do I set it? Or modify the code?
In addition, the water system is very easy to use and solves many problems. like.
Looking forward to your reply


While @agallegos is best equipped to answer questions related to Cesium for Unreal, I wanted to quickly interject since I have recently come across various questions in the community related to height and elevation.

This post includes relevant information about how Cesium handles elevation and reference points. In addition, this post discusses methods to compare the elevation of two points.


1 Like

Hello @leielyq,

When you say you want to set the height of the sea to 0, do you mean that you want to ensure that each sea tile is at 0 in the Z axis of Unreal’s coordinate system? Or are you referring to the sections of Cesium World Terrain where the photogrammetry may include waves or bumps in the water in certain areas?

Due to the way that Cesium for Unreal handles Cesium World Terrain, it may not be possible to set the surface of the sea to a uniform value. Doing so immediately around the Georeference Origin may work, but as you leave the origin, the tiles will not link up properly. The curvature of the earth requires that some tiles will not be at the correct Unreal Engine coordinates, or aligned the way you might expect. See this section of the Cesium for Unreal learning content for more information.

If you could provide more information about the type of data processing you would like to do, I may be able to help further. How are you planning to process the data, and what is your use case?

Also, I’m glad to hear that the water system is working well for you!

Thank you, @agallegos @sam.rothstein

I have a set of real route data about the ship, but there is no altitude. If it is used in unreal, the ship will appear under the water.
So I want to set a uniform sea height. Since this scheme cannot be realized, how can I get the sea height according to the coordinates?

Thanks for clarifying! I am looking in to this - I would love to have a solution for your use case. When I have any updates, I’ll reply on this post.

I will say that the size of the area you are working with will make a difference. If your experience is contained within a relatively small area, like a bay, the difference in sea height will be less apparent and you should be able to approximate. On the other hand, if the ship is traveling across the world I expect it will be more complicated to find a solution.

@leielyq Though it may not solve your problem, this forum thread has some suggestions for fitting objects to the ground. Stick to the ground

Bear in mind that this may not work if the ship is far away from the player, and the tiles it is passing over are not loaded.

@agallegos Thank you very much for your reply, this is a solution.
However, I customized a sea elevation with a height of 0, but found that there is no water effect. Is it possible to add the tileset in the specified range to the function of the water body?

Hi @leielyq,

Cesium for Unreal does not provide a way to set the sea height to 0, nor does it have a way to “pretend the world is flat” and ignore Earth curvature. But it should be possible to put your objects on the water surface without too much trouble.

If your area of interest is relatively small, such that Earth curvature is negligible, you can probably get pretty close to “sea is at Z=0” with just a little bit of effort. The main trick is in figuring out the WGS84 height of mean sea level (MSL) at your location of interest.

First, figure out the latitude/longitude at the center of your area of interest. Then, enter that lat/lon into an online EGM96 calculator, like this one:

This will give you an EGM96 geoid height. Back in Cesium for Unreal, select the CesiumGeoreference, enter your latitude and longitude into the Origin Latitude and Origin Longitude fields, and copy the “EGM96” geoid height in the Origin Height field. Having done this, Unreal Z=0 will be located exactly at EGM96 Mean Sea Level at that point. In most (but not all!) parts of the world, the Cesium World Terrain ocean surface will be at this height as well.

Alternatively you can do this graphically. Put a cube or some other object at (0,0,0), and then adjust the Origin Height value of the Cesium Georeference until the ocean surface goes through the cube’s origin. This will work even if the CWT ocean geometry isn’t located at exactly EGM96 height 0.0 in your area of interest.

Of course, as you move away from that origin, the planet will “drop away” due to Earth curvature from that Z=0 plane. Hopefully it won’t be noticeable before you’re outside your area of interest.

If you need a larger area, and Earth curvature becomes a problem, the next step is to dynamically calculate the mean sea level height at that location using the EGM96 model. That’s quite a bit more work, though, so hopefully you don’t need to go there.


1 Like