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

Billboard clamps too high to terrain? #4062

Open
pjcozzi opened this issue Jun 29, 2016 · 6 comments
Open

Billboard clamps too high to terrain? #4062

pjcozzi opened this issue Jun 29, 2016 · 6 comments

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 29, 2016

Open the KML Sandcastle example:

http://localhost:8080/Apps/Sandcastle/index.html?src=KML.html&label=All

Turn on AGI World Terrain, then zoom to "Nevada Test Site Area 26." The label is floating way above terrain. Shouldn't it clamp to the highest resolution loaded?

image

@mramato
Copy link
Contributor

mramato commented Aug 30, 2016

I can't reproduce this in master. @pjcozzi can you confirm and close?

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Aug 31, 2016

I just tried in master and believe I still see the issue:

image

@mramato
Copy link
Contributor

mramato commented Sep 10, 2016

Pretty sure I just forgot to turn terrain on when I tested this. whoops. The problem is actually pretty bad and happens by jumping to most billboards. Some end up above the ground, some under the ground.

I've also had some problems with disappearing labels (I think they are improperly being placed under ground like the billboards:

image

It's possible this is a different issue, but unlikely.

@twpayne
Copy link
Contributor

twpayne commented Oct 18, 2016

I've also had some problems with disappearing labels (I think they are improperly being placed under ground like the billboards:
...

Is this #2694?

@mramato
Copy link
Contributor

mramato commented Oct 18, 2016

No, they are two different issues. This issue is a nasty race condition in terrain clamping which is causing each letter to be placed in the geographically incorrect position instead of on the terrain itself. #2694 is a draw order issue and requires us treat labels as special so they always get drawn above terrain if their origin is visible (or something similar).

@mramato mramato changed the title Billboard clamps to high to terrain? Billboard clamps too high to terrain? Oct 20, 2016
mramato added a commit that referenced this issue Oct 21, 2016
Turns out that billboard and label clamping were fundamentally broken
because the `QuadtreePrimitive` was processing the tile queue in the wrong
order.  It was always pulling new tiles from the back of the array rather
than the front, which meant that data would get processed in the wrong
order causing old tiles to take precedence over newer tiles.

Addtiionally, there was a bad if block in `Label.js` which caused the
initial position of the individual label billboards to not be properly set
when clamping was on, instead we should always set the positions before
calling `_updateClamping` (if needed).

Fixes #4396 and #4062
@bagnell
Copy link
Contributor

bagnell commented Oct 25, 2016

The problem seems to be picking upsampled terrain. A quick check by disabling upsampling looks like it fixes the problem, but requires more testing.

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

4 participants