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

Problem with overlapping billboards #5007

Closed
hpinkos opened this issue Feb 15, 2017 · 10 comments · Fixed by #5066
Closed

Problem with overlapping billboards #5007

hpinkos opened this issue Feb 15, 2017 · 10 comments · Fixed by #5066

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Feb 15, 2017

Reported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/3jqWe5Ksi0k

This issue is the result of the transparent billboard fix that came in 1.30 #4886

Before:

image

After:
image

Parts of the green billboards are showing through the solid parts of the yellow billboards

@pjcozzi
Copy link
Contributor

pjcozzi commented Feb 15, 2017

@bagnell is there anything we can do about this other than sorting individual billboards by depth?

@lucasvw
Copy link

lucasvw commented Feb 23, 2017

+1

Current Cesium:
1

Before:
2

@smills2929
Copy link

The way the issue is effecting me is the exact same as lucasvw. The edges of our circular icons show through each other.

@mramato
Copy link
Contributor

mramato commented Feb 23, 2017

Marking this as next release so that we look at it for March 1st, but if the fix is non-trivial for some reason, it will probably have to wait for April 1st.

@pjcozzi
Copy link
Contributor

pjcozzi commented Feb 23, 2017

I agree this should be looked at soon. @bagnell can you evaluate after #5021? If it isn't an easy fix, what is the level of effort?

@lilleyse
Copy link
Contributor

@bagnell also will this make it in time for 1.31?

@bagnell
Copy link
Contributor

bagnell commented Feb 28, 2017

@lilleyse No, but a workaround to get the old behavior is:
billboardCollection.blendOption = Cesium.BlendOption.TRANSLUCENT;

@smills2929
Copy link

smills2929 commented Mar 2, 2017

@bagnell How does that work for an entity collection?

I can't figure out how to get it working with the entities in this example: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases&gist=73d3d23629edb117ca096324d0af7993

@bagnell
Copy link
Contributor

bagnell commented Mar 2, 2017

@smills2929 We don't expose the billboard collection for entities but you can access it with a private property.

viewer.scene.postRender.addEventListener(function() {
    var clustering = viewer.dataSourceDisplay.defaultDataSource.clustering;
    var billboardCollection = clustering._billboardCollection;
    if (Cesium.defined(billboardCollection)) {
        billboardCollection.blendOption = Cesium.BlendOption.TRANSLUCENT;
    }
});

If you won't be removing all billboards, you can remove the event listener after it is called.

@emackey
Copy link
Contributor

emackey commented Mar 2, 2017

The sample shown in screenshots at the top of this issue is a bad one. The old versions only look "good" because of the old bug where the front billboard was completely wiping out the rear ones. The sample code is asking for muddy overlap, and the old bug is what saves it from itself.

A much better example of this bug is shown in @lucasvw screenshots. This can be seen in the "GeoJSON simplestyle" sandcastle demo, by zooming out. For example, compare GeoJSON in 1.27 to GeoJSON in 1.30. The newer version is on the right:

badblending1 27_1 30

I have some ideas about this. I'll open a PR soon.

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.

8 participants