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

Ground Primitives are producing a "kaleidoscope" effect #8666

Closed
OHalford-Novetta opened this issue Mar 5, 2020 · 5 comments
Closed

Ground Primitives are producing a "kaleidoscope" effect #8666

OHalford-Novetta opened this issue Mar 5, 2020 · 5 comments

Comments

@OHalford-Novetta
Copy link

I'm currently experiencing issues with the geometry merging, or "kaleidoscope" effect, from instancing ground primitives that I've seen with normal primitives. I'm confused as to why it's happening this way, since in another example with ground primitives it renders exactly how I had expected it to Overlapping Ground Primitives Example. Would it be possible to add a zindex to the geometry instances?

Sandcastle example (Rendering all at once and then as batches): Ground Primitives Kaleidoscope

Browser: Chrome

Operating System: Windows

@mramato
Copy link
Contributor

mramato commented Mar 19, 2020

@OHalford-Novetta does this happen in Cesium 1.66, or did it start with 1.67? We accidentally introduced a regression in 1.67 that has been fixed in #8694 and will go out in our April 1st release.

Can you provide a screenshot that demonstrates what you're seeing?

@arimbey
Copy link

arimbey commented Mar 19, 2020

We first got this issue while using cesium 1.62

This is what we expect to see
image

But instead we see this
image

We have added all of those geometry instances (1 circle, 3 polygons, and 1 rectangle) to a single ground primitive and used the PerInstanceColorAppearance so that each geometry could have its own color, but for some reason the colors over flow outside of the shape

@mramato
Copy link
Contributor

mramato commented Mar 19, 2020

Thanks, @arimbey. Unfortunately, that use case is specifically not supported. (@likangning93 can you confirm this for me?)

Basically you can't use GroundPrimitive to batch overlapping geometry. That's actually what #8694 was fixing for the Entity API layer, but it's still a case for the underlying Primitive layer. (The Entity API simply has heuristics for avoiding it).

Unless you have other limitations preventing you from using the Entity API, I suggest you check it out for this use case (though 1.67 has a bug earlier and the upcoming 1.68 do not).

I wrote up #8695 to figure out how we can improve this and I'm sorry for the confusion. Feel free to post your thoughts, ideas there.

I was recently bit by this myself, which is why I reached out for clarification. Thanks for providing it.

@arimbey
Copy link

arimbey commented Mar 19, 2020

Thanks!

We did end up switching to the entity api for this particular case, but primitives are way better performance wise, so it would be great if batching was one day supported.

Ill keep my eye out for further updates on the linked issue.
Thanks for responding to us!

@mramato
Copy link
Contributor

mramato commented Mar 26, 2020

but primitives are way better performance wise, so it would be great if batching was one day supported.

The Entity API actually uses primitives under the hood, so I would be interesting to hear more about your use case. I'm going to close this issue since the immediate problem has been identified with a workaround, but feel free to reply with additional thoughts and if there is anything we can improve in the Entity API, I'll write up separate issues for them.

Thanks again!

@mramato mramato closed this as completed Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants