Poor antialias result on 3D object

241 views
Skip to first unread message

tourin...@gmail.com

unread,
Nov 4, 2018, 12:06:09 PM11/4/18
to cesium-dev
Hi,

I'm trying to display 3D objects with a good antialiasing filter, but that does not seem to be successful.

See the first example "3D Models" in the sandcastle, select "Hot Air Balloon" and unzoom a little bit. You'll notice that the wires are not antialiased at all.

The parameter viewer.scene.context.antialias is set to true though.

Is there any way to improve the antialiasing filter for that case?

Thank you.

Dorian.

Cesium 1.50
Chrome 70

Omar Shehata

unread,
Nov 5, 2018, 2:40:22 PM11/5/18
to cesium-dev

Dorian Tourin-Lebret

unread,
Nov 5, 2018, 3:07:05 PM11/5/18
to cesiu...@googlegroups.com
No, I hadn't, here is the result. Left with FXAA enabled, right with FXAA disabled.

image.png
The result is much better with FXAA enabled (it was enabled by default during my experiments), but there is still sharp steps on the thin parts of the model (the strings).

How could that be improved?

Thanks,

Dorian.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/XXXBFSYgb7s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Omar Shehata

unread,
Nov 5, 2018, 3:15:20 PM11/5/18
to cesium-dev
It looks like the the FXAA values are hardcoded in the shader:


You can try to edit the source to change those values and see if you get an improvement. If you do, it might be worth exposing those as parameters that users can tweak. I think an easier way to test it might be to set up a post process stage and copy the source of that shader and modify it (see the post process examples on Sandcastle).

If you make some progress please continue to post your results back here!
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Dorian Tourin-Lebret

unread,
Nov 6, 2018, 5:17:21 AM11/6/18
to cesiu...@googlegroups.com
I have tried to change the values of the 3 parameters of the FXAA in the source (which is an implementation of FXAA 3.11 from NVIDIA):

const float fxaaQualitySubpix = 0.5; // Default: 0.5 Raise to increase amount of blur
const float fxaaQualityEdgeThreshold = 0.125; // Default 0.125 Lower the value for more smoothing
const float fxaaQualityEdgeThresholdMin = 0.0833; // Default 0.0833 Lower the value for more smoothing

I could get the smoother result with 0.9999, 0.0001 and 0.00001 for those parameters, but still not good enough since the thin lines and edges are substantially aliased.

I have also checked that the quality preset is set to the highest value ("EXTREME QUALITY") by setting FXAA_QUALITY_PRESET = 39 (already done in Cesium source). If set to FXAA_QUALITY_PRESET = 15, the result is more blurry, which is not that bad!!

    // OPTIONS
    // -----------------------------------------------------------------------
    // 10 to 15 - default medium dither (10=fastest, 15=highest quality)
    // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
    // 39       - no dither, very expensive

I'll try to embed another implementation or tweak this one deeper.

Dorian.


To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/XXXBFSYgb7s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages