Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clamp to ground stops working with a large number of entities #6818

Closed
hpinkos opened this issue Jul 19, 2018 · 10 comments
Closed

Clamp to ground stops working with a large number of entities #6818

hpinkos opened this issue Jul 19, 2018 · 10 comments

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Jul 19, 2018

image

This happens after toggling terrain off. The ground clamping is not updated for the new terrain provider.

Sandcastle Example

@hpinkos hpinkos changed the title Polygon clamp to ground stops working with a large number of polygons Clamp to ground stops working with a large number of entities Jul 19, 2018
@hpinkos
Copy link
Contributor Author

hpinkos commented Jul 19, 2018

Alright, it looks like this is an existing problem with our clamp to ground logic. Billboards do the same thing.

image

@hpinkos
Copy link
Contributor Author

hpinkos commented Jul 19, 2018

More issues:

image

This seems to only happen the first time the example is loaded.

@hpinkos hpinkos reopened this Jul 19, 2018
@mramato
Copy link
Contributor

mramato commented Jul 19, 2018

This seems to only happen the first time the example is loaded.

A race condition because the terrain isn't cached? Might happen every time if you disable caching in the debugger.

@mramato
Copy link
Contributor

mramato commented Jul 19, 2018

So one weird thing I noticed here is that even if Cesium loads X levels of terrain tiles (and the terrain is done loading) we still trigger updates for every tile rather than just the ones at the most highest loaded layer. I don't think this has anything to do with the terrain engine and is specific to the terrain clamping sync code. This is why it takes several "passes" until the polygons are correct. We could probably speed this up tremendously by skipping items in the queue that are out of date.

@hpinkos
Copy link
Contributor Author

hpinkos commented Jul 19, 2018

Actually, maybe I was on a different branch. I tried again like 50 times in master but doesn't reproduce that error anymore with my fix. I'll close and reopen it if I see it pop up again.

@hpinkos hpinkos closed this as completed Jul 19, 2018
@mramato
Copy link
Contributor

mramato commented Jul 19, 2018

I think you're right because I couldn't reproduce it either. 🤞

@bmckilligan
Copy link

For what its worth

I have been experiencing a lot of issues with terrain and clamp to ground, much of it is hardware related.

I am working on an older Thinkpad T520 running Windows 10 64-bit which has an Intel HD Graphics 3000 and an NVIDIA Quadro NVS 4200M

The Geometry Height Reference example doesn't work in Chrome or FireFox by default, using the Intel GPU

The polygons in the example initially render above the terrain but after render passes as terrain tiles are loaded, the polygons disappear under the terrain.

I can configure Firefox to run using the NVidia GPU, and the height reference example works.

I have also been experiencing with the Chrome Intel combo a lot of issues with billboards rendering under terrain after terrain updates. Especially if there are more then a few thousand entities loaded with billboards and labels, in that instance I am looking at switching to points.

I've tried to put together a sandcastle example but it seams to be hit and miss when trying on different hardware, I'm in Vancouver and am going to try and attend the BOF at SIGGRAPH 2018 and can show things there

@hpinkos
Copy link
Contributor Author

hpinkos commented Aug 3, 2018

@bmckilligan the logic that updates billboard clamp to ground and geometry clamp to ground is the same, so it makes sense that you see problems with both. Also, based on the notion that I'm pretty sure this is a race condition, it also makes sense that you run into this frequently on your older less-perfomant computer.

Thanks for the extra input! I hope to get this figured out for the September release. I won't be at SIGGRAPH personally, but a lot of the team will be =)

@icemagno
Copy link

Can you share the code to create this nice effect?

@calogeromauceri
Copy link
Contributor

calogeromauceri commented Jan 31, 2025

I am experiencing this issues very often, mostly when the tiles are not cached and retrieving them requires more time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants