Improve anti aliasing on geometry

Hello guys,

I just wonder what methods can be used to improve anti aliasing on geometry even further? Imagine having a lot of thin meshes side by side. This causes aliasing, but I want to remove it as good as possible.

https://playground.babylonjs.com/#HC3G0R

I already use:

  • hardwareScalingLevel = 0.5
  • PastPostProces.samples = 8
  • DefaultRenderingPipeline.samples = 8

The aliasing is still very dominant. Are there other methods to reduce it?

Best

I had similar issues with anti aliasing on my mesh, and tried same solution as you by changing the rendering pipeline for maincamera with little success.

I solved the issue by setting the sampling mode for textures to “TRILINEAR_SAMPLINGMODE”.

//Olav

1 Like

I am not seeing any geometry aliasing here but mostly lighting one could you share a screen cap of where you notice it ?

Thanks for your replies.

Setting the texture sampling mode won‘t work because there are no textures.

You’re right, @sebavan. I mean the aliasing caused by the lightning. But since it is related to the many thin stripes I assumed it is geometry aliasing. Is there a way to fix that?

Unfortunately, not really :frowning: you could try using the PBR material which has build in Specular AA and would help here and use your own shader reducing this kind of aliasing.

Unfortunately the pbr material doesn’t help a lot: https://playground.babylonjs.com/#HC3G0R#1

But it possible to improve it with a shader?

Thinking about it more not really cause the surface would still not account for neighbors straws. Maybe merging the meshes to ensure you have only one external surface would help a special shader to reduce it.

1 Like

The first node when you load a gtlf is a parent node, not a mesh. You should target the 2nd node to change the material of your mesh:

https://playground.babylonjs.com/#HC3G0R#2

2 Likes

@sebavan
The straws are already one single mesh. Or do you mean one connected surface?

@Evgeni_Popov
Sure, my fault. Pbr material definitely improves it.

yup one connected surface (Just wondering :slight_smile: )

I will try that, thanks.

1 Like