Why are my polyline intersections blurry?

108 views
Skip to first unread message

jay.h...@noaa.gov

unread,
Apr 12, 2019, 5:19:54 PM4/12/19
to cesium-dev
1. A concise explanation of the problem you're experiencing.

See attached image


3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

The lines are a graticule over the 2D map. They are generated using SimplePolylineGeometry and rendered in a Primitive attached to the scene.

I've tried everything I can think of to get this to stop happening. At one point in the past I'm sure I was able to disable anti-aliasing on either the webgl context or on the scene and this sharpened up the lines while sacrificing any billboard labels I would render.

Is there any way to get rid of these intersection blurs, preferably only for these lines? I'm ready to pull the lines out of the canvas and do it in the DOM.

This is on Cesium 1.52, Chrome 73

blurryintersections.png

Omar Shehata

unread,
Apr 18, 2019, 1:45:02 PM4/18/19
to cesium-dev
These polylines aren't clamped to the ground, right? Does this map have any terrain?

Does changing the resolution scale or imageRendering mode as Matt describes here help at all?


You can try toggling FXAA to see if it helps too:


Although that would do it for the whole scene. It isn't inconceivable to render these lines as a separate pass so you can selectively enable this antialias on them. You'd have to create a custom draw command I think. This thread has an example on this:


It might be a bit too involved just to fix this since there aren't a lot of helper functions to do this. If you end up finding a fix or a workaround please post it here!

jay.h...@noaa.gov

unread,
Apr 18, 2019, 3:26:56 PM4/18/19
to cesium-dev
Thank you VERY much Omar. Those links helped a lot and helped further my knowledge in other areas. A combination of the resolution scale and disabling the FXAA had exactly the desired effect and more.

The resolution scale fix also seems to have removed the big negative symptom of disabling FXAA that I recall from the past, which was poor billboard/label visual fidelity. It also solved the side issue of with inconsistent line widths!

I'm also pleased to find out how to disable FXAA once again; I didn't see that it had moved off of Scene in the changelog.

Thanks a lot for your help!

On Thursday, April 18, 2019 at 10:45:02 AM UTC-7, Omar Shehata wrote:
> These polylines aren't clamped to the ground, right? Does this map have any terrain?
>
>
> Does changing the resolution scale or imageRendering mode as Matt describes here help at all?
>
>
> https://github.com/AnalyticalGraphicsInc/cesium/issues/7682#issuecomment-477385267
>
>
> You can try toggling FXAA to see if it helps too:
>
>
> https://groups.google.com/d/msg/cesium-dev/XXXBFSYgb7s/FaBmLYhyCAAJ
>
>
> Although that would do it for the whole scene. It isn't inconceivable to render these lines as a separate pass so you can selectively enable this antialias on them. You'd have to create a custom draw command I think. This thread has an example on this:
>
>
> https://groups.google.com/d/msg/cesium-dev/gpgLjYyNFKE/4m-FGysyBQAJ
>
>
> It might be a bit too involved just to fix this since there aren't a lot of helper functions to do this. If you end up finding a fix or a workaround please post it here!
>

> On Friday, April 12, 2019 at 5:19:54 PM UTC-4, jay....@noaa.gov wrote:1. A concise explanation of the problem you're experiencing.

Omar Shehata

unread,
Apr 18, 2019, 6:11:01 PM4/18/19
to cesium-dev
Awesome! Super glad to hear we can help NOAA maps have crisp lines and billboards!
Reply all
Reply to author
Forward
0 new messages