Help on eliminating annoying artifacts

Hello guys,

I am getting crazy with the artifacts shown on the below image.

If I zoom in, it’s actually a very narrow and shiny face.

So in resume, it is kind of displayed as a really ugly white dotted line on the first image. I am using PBR(metallic roughness) with IBL and I tried activate specular AA but it did not help. And I tried to set roughness to 1.0 but it gave the same ugly appearance. I tried to add a Subpixel Morphological Anti-Aliasing in the end of my rendering pipeline but it did not help either.

So does any one know a good technique for eliminating this nazy stuff?

Thanks a lot!!!


this jagged line problem comes with too tiny lines in a distance. One way i found to nearly eliminate this effect is to increase hardware scaling level: engine.setHardwareScalingLevel(0.5);
The lower the hardware scaling the better the image (1 is default), but the lower you set it, the more performance gets lost. So you have to check how low you can set it in your scene.

Another thing you could do is increase the samples of the defaultRenderingPipeline and enable fxaa but this also costs performance.

var defaultPipeline = new BABYLON.DefaultRenderingPipeline(“default”, true, scene, cameras);
defaultPipeline.samples = 4;
defaultPipeline.fxaaEnabled = true;

I hope this can help you.

1 Like

Thanks for your advises. FXAA does help a little bit but it makes the whole rendering blurring. My app is performance sensitive and I cannot use hardware scaling and MSAA. :upside_down_face:

This may be because of specular. Can you try to set material specular to black?

Hi Deltakosh, it is a Metallic-Roughness material, so setting specular to zero means making roughness 1.0? I tried this but I still get the same artifact.

I guess this might be caused by the fact that the face is too thin and by distance, there is one pixel for some segments and less than one pixel for the others…but I really have no idea how to solve it. Maybe one solution is to use TAA though… :frowning:

Yes this is the overall problem here.
Can you make it larger? TAA may be useful you are right

You mean set hardware scaling less than 1.0? Yes but only for small models. My project needs to handle large models too. May be I can find a balance.

Actually on Mac which has retina display, this problem is not that obvious but on low resolution Windows PC, it is very annoying.

I will try to implement Temporal Anti-Aliasing though I have never made one before :slight_smile:

If you succeed it could be a fantastic post process to add :smiley: