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

Reflections of points in sky atmosphere #6904

Closed
ollazarev opened this issue Aug 9, 2018 · 5 comments
Closed

Reflections of points in sky atmosphere #6904

ollazarev opened this issue Aug 9, 2018 · 5 comments

Comments

@ollazarev
Copy link

ollazarev commented Aug 9, 2018

Look please at this example: editor view / full page view

In the example, four cities Entity are added to the map. All entities include Label and Point. When viewed from a certain angle, a reflection of points in the sky appears.

It has been experimentally verified that the more points on the map, the more points are reflected in the sky. As the camera moves, the points in the sky begin to flicker.

Below is the code setting the camera position:

var heading = Cesium.Math.toRadians(142.8074308297535);
var pitch = Cesium.Math.toRadians(-3.04226367144852);
var range = 15000.0;
let position = entity4.position.getValue(viewer.clock.currentTime);
viewer.camera.lookAt(position, new Cesium.HeadingPitchRange(heading, pitch, range));

untitled-0 1

@hpinkos
Copy link
Contributor

hpinkos commented Aug 9, 2018

Thanks for reporting this @ollazarev, and thanks for including the code example! If possible, it would be a little bit easier for us if you could use our Sandcastle application for sample code instead of codepen: https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/
There's a 'share' button at the top to get a link. Either way is fine though =)

As a workaround you can set viewer.scene.logarithmicDepthBuffer = false; to fix the problem

Minimal Example:

var  viewer = new Cesium.Viewer('cesiumContainer');

function getEntity(coords) {
    return new Cesium.Entity({
        position : Cesium.Cartesian3.fromDegrees(coords[0], coords[1]),
        point: {
             pixelSize: 5,
        }
    });
}

viewer.entities.add(getEntity([-101.678, 57.7833]));
var entity4 = viewer.entities.add(getEntity([-79.38318429999998, 43.653226]));

var heading = Cesium.Math.toRadians(142.8074308297535);
var pitch = Cesium.Math.toRadians(-3.04226367144852);
var range = 15000.0;
var position = entity4.position.getValue(viewer.clock.currentTime);
viewer.camera.lookAt(position, new Cesium.HeadingPitchRange(heading, pitch, range));

@bagnell this is another log depth issue, can you look into this? I'm going to mark it 'next release' since it's a regression.

@emackey
Copy link
Contributor

emackey commented Aug 9, 2018

This is a regression of #5501. The sandcastle demo there is reproducible once again.

var viewer = new Cesium.Viewer('cesiumContainer');
var collection = new Cesium.PointPrimitiveCollection();
viewer.scene.primitives.add(collection);

// Add 10,000 points to random positions
for (var i = 0; i < 10000; i++) {
    var lat =  Math.random() * 360 - 180; 
    var long =  Math.random() * 360 - 180; 
    collection.add({
        position : Cesium.Cartesian3.fromDegrees(lat, long),
        pixelSize: 3,
        disableDepthTestDistance: 1
    });
}

@hpinkos
Copy link
Contributor

hpinkos commented Aug 9, 2018

I forgot about that one, thanks @emackey
Apparently you opened the PR fixing that one year ago today: #5735
I found that amusing =P

@ggetz
Copy link
Contributor

ggetz commented Aug 20, 2018

This issue is marked for next release, so we should try to get in a fix for next week. Who is best to look at this, @hpinkos do you know?

@hpinkos
Copy link
Contributor

hpinkos commented Aug 23, 2018

Thanks again for reporting this @ollazarev! This has been fixed and will be included in the 1.49 release available September 3rd.

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