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

Black terrain artifact #4032

Closed
YousefED opened this issue Jun 20, 2016 · 14 comments · Fixed by #5150
Closed

Black terrain artifact #4032

YousefED opened this issue Jun 20, 2016 · 14 comments · Fixed by #5150

Comments

@YousefED
Copy link

See screenshot below:

image

Steps to reproduce:

function setHeadingPitchRoll() {
    Sandcastle.declare(setHeadingPitchRoll);

    var camera = viewer.camera;
    camera.setView({
        destination : new Cesium.Cartesian3(1288857.3292931253, -4338373.750901034, 4488506.669268853),
        orientation: {
            heading : 0.1765,
            pitch : -0.4667,
            roll : 0
        }
    });
}

OS: Windows 10
Browser: Chrome 51.0.2704.103 (also seen on firefox)

@hpinkos
Copy link
Contributor

hpinkos commented Jun 23, 2016

Thanks @YousefED! I was able to reproduce this based on the steps you provided

weird-terrain

@YousefED
Copy link
Author

Fyi, I',m seeing this bug for more locations, e.g.:

I'm open to looking into this, but have little experience with the internal 3d engine, so I'm not sure where to start


function setHeadingPitchRoll() {
    Sandcastle.declare(setHeadingPitchRoll);

    var camera = viewer.camera;
    camera.setView({
        destination : new Cesium.Cartesian3(4471707.323258337, 675395.3016673529, 4486939.158518577),
        orientation: {
            heading : 5.942565929933654,
            pitch : -0.4636476090008035,
            roll : 6.283185307179586
        }
    });
}

@pjcozzi
Copy link
Contributor

pjcozzi commented Sep 19, 2016

The culling volume may not be properly synced with the camera view.

@YousefED you are welcome to look into this, but it might not be easy first issue to track down (instead check out these).

Also, are you using Cesium for TweetBeam? Do you have a demo?

@mramato
Copy link
Contributor

mramato commented Sep 19, 2016

I swear we have a very similar bug opened for this already that involved flying the geocoder to specific locations, but now I can't find it.

@mramato
Copy link
Contributor

mramato commented Sep 19, 2016

Nevermind, I was thinking of #3676, which is already fixed. Sorry for the noise.

@YousefED
Copy link
Author

@pjcozzi Nope, for Relive.cc - I think you've already seen it on Twitter, and we're in touch with your team re. a showcase :)

@YousefED
Copy link
Author

@pjcozzi Sorry to "bug" you about this, normally wouldn't bring it up again; but the bug seems to affect one of our users on a ride with Richard Branson 😅 If a quick look from your side could help assess whether a quick fix could be possible (and where I should look), or whether it affects a large part of the render engine (in this case I probably can't help) - that would be extremely helpful.

@pjcozzi
Copy link
Contributor

pjcozzi commented Sep 24, 2016

@YousefED sorry, I am fully committed for quite a while to come; however, I labeled this as "bug bash" so perhaps someone will take a look then: http://cesiumjs.org/2016/09/19/Cesium-Bug-Bash/

@duvifn
Copy link
Contributor

duvifn commented Jan 11, 2017

@mramato you probably meant #4698 which is the same bug and they both happen in lat 45

@duvifn
Copy link
Contributor

duvifn commented Mar 26, 2017

Steps to reproduce:
1. Type 101 45 in the geocoder.
2. Zoom out until the scene level is 16 (as reported by Cesium Inspector's Show Tile Coordinates).
3. Move the camera slightly toward south .
4. The tiles north to the latitude 45 should disappear.

reproduce

Workaround:
Turn off the fog:
viewer.scene.fog.enabled = false

@duvifn
Copy link
Contributor

duvifn commented Mar 26, 2017

The problem is that the south plane of TileBoundingBox (in the northern hemisphere) is not bounding the tile, as in the following animation.
level_2_before2

As a result the distance that is reported by TileBoundingBox.distanceToCamera might be wrong by up to ~250 Kilometers with tiles of the lower levels.
Therfore the fog is culling them and so their descendants are not selected for rendering either.

In the southern hemisphere the north plane is the problem.

These specs are failing in master.
This plane calculation first appeared in Cesium-b10.

For my own needs I fixed this in this branch. If you think this fix is good also for Cesium I'd be glad to open a PR.
My solution is to calculate the plane in a slightly different way.

@hpinkos
Copy link
Contributor

hpinkos commented Mar 27, 2017

Thanks @duvifn! It would be great if you want to open a pull request with that fix.

@duvifn
Copy link
Contributor

duvifn commented Mar 27, 2017

Thanks @hpinkos!
I opened a PR.

@YousefED
Copy link
Author

Great stuff, thanks @duvifn

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

Successfully merging a pull request may close this issue.

5 participants