How to change shadow quality.

So in my game. I have a three buttons that will toggle the different setting of shadow quality. The buttons are in a user interface widget. I want the last button to be the low quality shadow (no shadows) and the first button to be the max quality shadows. Is there any way to do this and if so, can anyone send an example blueprint. Thanks in advance.

You can use the Set Shadow Quality node, where you can select value from 0 to 4 (0:low, 1:medium, 2:high, 3:epic, 4:cinematic), or you can use the Execute Console Command node with command “r.ShadowQuality=#”, where # takes the same value from 0 to 4.

1 Like

Hello Tuerer. I have done what you have said blinded the shadow qualities to five buttons. They all work except when I press the last button (0 Shadow Quality) The shadows won’t turn off. How would I fix this error and completely disable the shadows at 0.

Idk if there’s a console command or some overall settings for that, but you can always try and Set Cast Shadows to false for all your light components.

I have seen YouTube videos of people setting their shadow quality to 0, and all the lights turning off. Why isn’t that happening to me and how can I make that happen?

1 Like

I too would really like to know about this, except in my case none of these nodes are changing the shadows at all. I need shadows to be toggled on/off globally and this would be perfect. Any idea why they aren’t working?

1 Like

I was having a similar problem. What finally worked for me was replacing the “=” in the command suggested above with a space–“r.ShadowQuality 0”, “r.ShadowQuality 1”, etc.

1 Like

I thought you need to “get game user settings” and than “set Shadow Quality” and than drag off the “get game user settings” and “apply settings” to make it work…

2 Likes

@OG_FATFACE_420
@Mathisxy
@RhyssPaces
You should do that too to save the settings without having to manually save and load value yourself.

So this image is how I set up my settings for shadow, what happens is that shadows are changed instantly using the command…

Then to save the setting, it’s simply 2 nodes you have to put in as follows in the image…
(Seem to only be needed for adjusting resolutions)

Also to load then, in BeginPlay somewhere (or manual event if u want), I did mine in the game instance, but it’s also just 3 nodes to load the settings…

All of these could be tested with keybinds, so the events, instead of making events or using buttons from widgets, just simply use keybinds for testing!

1 Like