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

Visible GroundPrimitive seam at IDL and Prime Meridian #4746

Open
hpinkos opened this issue Dec 12, 2016 · 9 comments
Open

Visible GroundPrimitive seam at IDL and Prime Meridian #4746

hpinkos opened this issue Dec 12, 2016 · 9 comments

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Dec 12, 2016

split

For GroundPrimitives, when the geometry is sufficiently large, there's a weird artifact at longitude = 0 where we split into east and west hemispheres in GeometryPipeline.splitLongitudeTriangles.
(The same thing will happen across the IDL if you flip the east and west coordinates in the example below)

var viewer = new Cesium.Viewer('cesiumContainer');
var rectangle = Cesium.Rectangle.fromDegrees(-125.0, -30.0, 125.0, 30.0);

var primitive = viewer.scene.primitives.add(new Cesium.GroundPrimitive({
    geometryInstances : [new Cesium.GeometryInstance({
        geometry : new Cesium.RectangleGeometry({
            rectangle : rectangle,
            vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
        }),
        attributes: {
            color: Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 0.0, 0.0, 0.8))
        }
    })],
    appearance : new Cesium.PerInstanceColorAppearance({
        closed : true
    })
}));
@pjcozzi
Copy link
Contributor

pjcozzi commented Dec 15, 2016

It's possible that the winding order for that wall of the shadow volume is flipped.

@hpinkos
Copy link
Contributor Author

hpinkos commented Dec 22, 2016

Also seen with this GeoJSON file around the south pole

ne_10m_admin_0_countries2.json.txt

From https://groups.google.com/forum/?hl=en#!topic/cesium-dev/O_LaBx1_1wg

@ggetz
Copy link
Contributor

ggetz commented May 21, 2018

From the forum: https://groups.google.com/forum/#!topic/cesium-dev/RH2GBImy2vI

Seeing something similar with CorridorGeometries at the IDL and on the opposite side of the globe as well. Related?

image

@hpinkos
Copy link
Contributor Author

hpinkos commented May 21, 2018

@ggetz yes, I think that's the same problem

@likangning93
Copy link
Contributor

classificationvolumeidl

@bagnell thinks this is because the volumes for the underlying classification primitive gets split across the IDL, but the parts aren't closed independently. The artifact goes away when you manually "close" the volumes by spanning with two batched entities instead of just one, so figuring out how to close split volumes is probably the right fix.

"Simulated" closed volumes and standard split volume compared on Sandcastle.

I think this happens for giant geometry on the PM too because the IDL split is actually a split on the plane that contains both the PM and the IDL, and the check for whether the split needs to happen or not is based on bounding spheres or something. But that's a separate, less critical problem I think.

@hpinkos
Copy link
Contributor Author

hpinkos commented Jan 8, 2019

Also reported by @HuZhuangQiang #4863 (comment)

@hpinkos hpinkos changed the title Error related to GroundPrimitives and GeometryPipeline.splitLongitudeTriangles Visible GroundPrimitive seam at IDL and Prime Meridian Feb 28, 2019
@ggetz
Copy link
Contributor

ggetz commented May 8, 2023

@eric-g-97477
Copy link

It would be great if this bug could be fixed. Is anyone actively working on it?

@ggetz
Copy link
Contributor

ggetz commented May 8, 2023

We don't have immediate plans to work on this item. But we'd be happy to accept a Pull Request for this feature if you have the time. Thanks!

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

5 participants