Z-Fighting Issue with Points and Polylines

Hello dutiful devs and Cesium community,

This is my first post to the forum; but I've been using Cesium for my research project for the past ~5 months.

I'm experiencing annoying z-fighting issues when trying to render points (ie PointGraphics) on top of polylines (ie PolylineGraphics). It's all being done with the Entity framework, not the primitives framework. I have a video demonstration of the issue here: https://www.youtube.com/watch?v=xvfxwwgLbRY

As you can see from the video, the points z-fight with the polylines AND with other points.

In the past when I have experienced z-fighting, my first go-to was to give each shape a different height or z-index so that they wouldn't be fighting. However, since I'm working with Points, which don't really have a height property per se, I don't know what to do. Unless I'm wrong and there is a way that I can alter the height of the points. If I could, that might elliminate point-vs-polyline z-fighting, but it wouldn't really help with point-to-point z-fighting.

Also, I have already tried giving all the entities an alpha value less than 1.0. All of the points in the video have an alpha of 0.9, and the polylines have 0.8.

Any advice that you have would be appreciated. I can provide more info if necessary.

Hello,

What kind of project are you working on? The video looks interesting

Unfortunately, we don’t have great z-order support at the moment. The best work-around for now would be to add a small height to the position of the points. Let me know if you need help with the code to do this and I’ll paste an example.

Best,

Hannah

Hello,

What kind of project are you working on? The video looks interesting

I'm working with a Professor at the University of Michigan. We're using Cesium to visualize the flow of the Ann Arbor bus system. We just finished a project where we used Cesium to simulate a full evacuation of a city: https://www.youtube.com/watch?v=HpcvklRY3jA&index=1&list=PLNEnkISLcOdlxx2aSnuAcM5rHuO8q_K1B

We really like Cesium.

Unfortunately, we don't have great z-order support at the moment. The best work-around for now would be to add a small height to the position of the points. Let me know if you need help with the code to do this and I'll paste an example.

Thank you for being so willing to help. I will probably be able to figure it out. I do have a question, though. Like I mentioned in my original post, giving each point a slight height value would solve the point-vs-polyline problem, but would it help the point-vs-point problem?

Ok, so I gave each point a height of 0.5 meters, but now this has caused a strange error:

The labels on some of my points have lost part of their text. This is very strange. For instance, the purple points should say "CN" and the red points should say "NW". Any idea why this is?

Apologies for many replies, but I refreshed the page and now the label text problem is gone.

No problem! I’m happy to help.
Thanks for sharing the video, that’s an interesting project =)

How exactly are you adding the points? Can you paste a code sample?

If it’s not too much trouble, you might have better luck putting the point and text in an image and add it as a billboard.

Otherwise you can try to set an eyeOffset on the label. A negative z value should make it appear in front of other objects.

Best,

Hannah