Changing materials of objects for "low" gfx settings

I have a rather large water plane in a level of mine which uses distance fields and flow maps for dynamic foam around objects but it’s a bit expensive and lowers the framerate quite a bit. I want to let players on older hardware turn it off if they want and that works decently when I turn off distance fields with “r.AOGlobaldistancefield 0”. However that does create an issue where the “foam” appears all over the water plane since its no longer being masked out by DFs.

In my games graphical settings, I let players turn this effect ( and others ) off and save that to a file which loads and sets the settings every time the game starts.

My plan was that on game start, I’d check in the game instance BP if “r.AOGlobaldistancefield” is set to 0 and store the results. Then if a player loads a level with water, I’d get the plane mesh and apply a different (cheaper) material to it.

However, I’m curious if there are better ways? Is this something which is commonly done for older hardware/better performance? That is, to have completely seperate materials depending on graphical quality settings?

Yiu can try “Quality Switch”

Or simple static switches