CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.99k stars 3.5k forks source link

Polyline artifacts depending on camera position #6741

Closed shunter closed 5 years ago

shunter commented 6 years ago

In master I'm seeing new artifacts when rendering polylines. Possibly this is related to the polylines on terrain addition?

Sandcastle

note: sandcastle is the hosted version which does not have the problem. copy/paste the code locally

capture

hpinkos commented 6 years ago

@shunter I'm seeing the same thing in master and in 1.46. This is a screenshot from cesiumjs.org

image

I hardly see that flicker happen at all though. Does it happen frequently for you? Try setting scene.logarithmicDepthBuffer = false to see if that fixes it

shunter commented 6 years ago

I tried harder on the version on cesiumjs.org and I was able to get it there:

image

image

However, it's way more prevalent in master.

hpinkos commented 6 years ago

Hmm okay. It's about the same in 1.46 and master for me. But it does seem to be logdepth related. I can't reproduce it at all in 1.44 but can in 1.45

cc @bagnell

hpinkos commented 6 years ago

Marking this next release because it's regression. If we can't figure it out in time for 1.47 we definitely should for 1.48

shunter commented 6 years ago

Adding viewer.scene.logarithmicDepthBuffer = false;

to turn off logarithmicDepthBuffer makes it much much worse:

capture

shunter commented 6 years ago

Fixed by #6751. Back to being the same quality as last release - that is, rare artifacts that I speculate are frustum boundaries.

likangning93 commented 6 years ago

@shunter are you sure? That PR wasn't supposed to address standard polylines.

shunter commented 6 years ago

I went back through versions of master and can't seem to reproduce with my original code with any previous version I try. Not sure what's going on, maybe there was some sort of file mismatch.

Current master does have the artifacts from the gifs above if you turn log depth off. Not sure if turning log depth off is expected to work anymore, I haven't followed related changes. If you think that's a problem we should re-open.

slizer2000 commented 6 years ago

@shunter Im not sure if it will be fixed by #6751.

I get the same issue when the followSurface property is set to false but not when set to true...

Only started happening after v1.44.0 .

followSurface=false cesium_bug

followSurface=true cesium_bug1

Sandcastle

Edit: updated sandcastle link to proper

hpinkos commented 6 years ago

@slizer2000 does this happen in Cesium 1.47? Also, you linked to a pull request instead of a Sandcastle example by mistake. Can you please share your Sandcastle example? Thanks!

slizer2000 commented 6 years ago

@hpinkos apologies. I have updated the link. Yes it happens in 1.4.7. I have had to revert back to 1.44 in my project to avoid this issue. I becomes more apparent as you zoom into the geo

slizer2000 commented 6 years ago

there is another bug that when in 2D mode, the polyline gets cut in half or disapears all together

hpinkos commented 6 years ago

Thanks @slizer2000, I was able to reproduce the flickering you're seeing. For now, you can set viewer.scene.logarithmicDepthBuffer = false; as a workaround.

@bagnell could you look into this?

lilleyse commented 6 years ago

If it helps here is another demo showing the problem: Sandcastle

polyline

lilleyse commented 6 years ago

Another polyline artifact but only when log depth is off. I wasn't able to git bisect due to unrelated shader errors but it seems to have been introduced with the log depth changes.

Sandcastle link

line

UPDATE: fixed #7209

mramato commented 6 years ago

Just a reminder that the release is this Wednesday. We should really try and get all showstopper issues addressed by the end of today.

tfili commented 6 years ago

Is anyone looking at addressing this for tomorrow?

bagnell commented 6 years ago

I'm looking at it.

themikelester commented 6 years ago

What was the result of this?

hpinkos commented 6 years ago

Hi @themikelester, we fixed some of the polyline issues but are still looking into one or two others

hpinkos commented 6 years ago

Also: https://groups.google.com/forum/#!topic/cesium-dev/NZwZnQnmC2U

ggetz commented 6 years ago

(@bagnell?)

This issue is marked for next release, so we should try to get in a fix for next week. Thanks!

bagnell commented 6 years ago

I wasn't able to find the cause for the last release. I'm still looking into it.

mramato commented 6 years ago

Since there are multiple issue sin this bug, I wrote up two new issues to keep things separate. We'll close this issue with #6955 is merged, since that fixes the original reported issue by @shunter

lilleyse commented 6 years ago

I mentioned this in #7209 as well - I'm still seeing some flickering in https://github.com/AnalyticalGraphicsInc/cesium/issues/6741#issue-336373649 even with the changes in #7209. I think it may be due to driver differences. I only noticed flickering with AMD and not Nvidia, and both work in older versions of Cesium (I tested 1.34).

cesium-concierge commented 5 years ago

Congratulations on closing the issue! I found these Cesium forum links in the comments above:

https://groups.google.com/forum/#!topic/cesium-dev/NZwZnQnmC2U

If this issue affects any of these threads, please post a comment like the following:

The issue at https://github.com/AnalyticalGraphicsInc/cesium/issues/6741 has just been closed and may resolve your issue. Look for the change in the next stable release of Cesium or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

:earth_africa: :earth_americas: :earth_asia:

lilleyse commented 5 years ago

Opened https://github.com/AnalyticalGraphicsInc/cesium/issues/7360 to address https://github.com/AnalyticalGraphicsInc/cesium/issues/6741#issuecomment-434846690.

lilleyse commented 5 years ago

Moved the forum issue https://groups.google.com/forum/#!topic/cesium-dev/NZwZnQnmC2U over to https://github.com/AnalyticalGraphicsInc/cesium/issues/7072.

lilleyse commented 5 years ago

Opened https://github.com/AnalyticalGraphicsInc/cesium/issues/7374 because we had to revert https://github.com/AnalyticalGraphicsInc/cesium/pull/6955 in https://github.com/AnalyticalGraphicsInc/cesium/pull/7373.