Modify Landscape with World Position Offset

Without getting into too much detail, my project involves modifying the height of the landscape as a function of distance from the camera, using world position offset. It worked fine in older versions of Cesium by adding a WPO to the landscape overlay material (now deprecated Cesium masked overlay). At some point with version upgrades, it stopped working this way and I had to come up with a workaround. I can add the WPO to the “ThreeOverlaysandClipping” material and apply it to the landscape, but any distant displaced tiles now flicker and won’t display properly. The only way to stop the flickering and still have the desired displacement is to set the overlay material to translucent. This works without any flickering, but it makes the landscape no longer display shadows, and the lighting seems off.

I’ve tried different types of blends, even adding the offset directly to the CesiumGITFFunction, and a bunch of different things, but nothing seems to work any better. Is there a “proper” way to add a WPO to the landscape?

Hi @Death_With_An_H,

now deprecated Cesium masked overlay

Can you explain what you mean by this?

At some point with version upgrades

In what version did it last work in? Did you change Unreal versions as well, or only Cesium for Unreal versions?

but any distant displaced tiles now flicker and won’t display properly

It might be useful to see a video of this behavior.

Is there a “proper” way to add a WPO to the landscape?

This is not something I’ve tried to do before. But perhaps if you can share your best attempt at the custom material, we can take a look at might have some ideas about what is going wrong.

Thanks for the reply. I probably should have experimented more before asking for help. Turns out the flickering was a culling issue, which I resolved in the advanced material properties for “M_CesiumBaseMaterial” by setting “max world position offset displacement” to 200000, from the default value of 0. Everything works perfectly now with the default masked material.

1 Like