MSAA kills trees? (makes tree leaves much less dense/thick looking?)

Hi, I was testing MSAA out for an example scene, but for some reason it causes the leaves to disappear or become less dense than if I use FXAA or Temporal AA. Do you know what the problem is and how to fix this? In the future, when designing trees, what should I know to avoid problems with the leaves?

Here is a link to the project if it helps
https://forums.unrealengine.com/comm…-trees-library

FXAA:

https://i.imgur.com/e6UDTOc.jpg

MSAA:

https://i.imgur.com/y5PI3rC.jpg

Also, is it normal for MSAA to cause so much lower framerates than FXAA?? It’s at least 50% slower.

What you see on screenshot is normal operation of A2C. Use higher opacity mask value on leafs. Yes, it is perfectly normal for MSAA to be much slower.

What do you mean by use higher opacity mask values on leafs? (is it through the material,texture editor, or static mesh editor UI?) How exactly would I do this?

Also, what is a way to allow to the user/player to change the opacity mask value for the trees/foilage in the settings of the game? I would like for them to have the option for either FXAA(for targerting lower-end hardware) or MSAA( for targeting higher-end hardware).

Thanks.

I just found out a way to improve the performance.

“To get a result closer to the deferred renderer, you can make your OpacityMask input into a steeper gradient. For example if you have an OpacityMaskClipValue of .33, you can do a Mul with 5 and then Subtract (.33 * 5). This will make the OpacityMask gradient steeper, pushing the translucent bands closer together, but keeping the value .33 in the same spot.”

https://answers.unrealengine.com/que…e-problem.html

This makes the leaves thicker with MSAA and improves performance by a lot. But keep in mind the opacity mask value doesn’t have to be multiplied by 5, it can (and should) be multiplied by a higher number. This keeps the density of the leaves from fading with distance. MSAA is still about 10 to 20 percent slower than FXAA (depending on the scene).

The scene was 156 FPS with FXAA, but 123 FPS MSAA.

Why exactly does increasing the density/thickness of the leaves increase performance?

Less overdraw. In Masked Materials, trasparent pixels are drawn multiple times until the renderer draws a opaque material at that pixel
It’s similar with Translucent Materials, but more severe because Translucent Materials don’t have a “Clip Mask”.