How to get added tileset always above the terrain?

Hello Team,
I have been working on loading the point cloud asset into the cesium app, so when I load the point cloud asset some of the part of point cloud is getting hidden under the terrain and I don’t want that to happen.
point cloud should Always get rendered above the terrain.

Can you guys please suggest me the possible solution for the above issue.
Thank you.
Looking for answers.

Hi @MUKUND_THAKARE

Just for clarification, certain parts of your tileset are geolocated under the terrain and you’re asking if there is a way to render them “in front of” the terrain? Did I understand that correctly?

Hello @sanjeetsuhag
Yes your understanding is correct.

Thanks for your reply.

@sanjeetsuhag for more info I am creating terrain like this.

viewer = new Cesium.Viewer(container, {
    terrainProvider: Cesium.createWorldTerrain()
});

Hmm. That doesn’t quite make sense, as in those parts of the pointcloud are under the terrain. If what you’re after is some kind of way to deal with these cases, I see two options;

  1. Sample the corners and center of your terrain, and map it to a bounding area, and if the 3DTiles are below the terrain you can lift it through a Transform.

  2. Use transparent globe/terrain with a distance factor, so from a distance the terrain is solid, but when you move closer to the model / pointcloud it becomes more transparent to show the parts normally hidden.

I would definitely use point 2. above as it reflects reality better, when you do things (like point 1.) with lifting / transforming data alters its relationship to reality wit a host of possible negative consequences to measurements, reflections, visualisation, clamping, and so on.

Cheers,

Alex

Hello @Alexander_Johannesen
thank you for your reply.
Can you please suggest me a reference for doing the point 2 ?

Thank you !!

Sure, start with this Sandcastle, it will give you the basics;

Cheers,

Alex

1 Like