Graphic Settings in Godot 3.1

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By anllucah

Best way to control graphical settings in Godot 3.1 with options like: low, medium, high and ultra. Is possible to control at runtime?

:bust_in_silhouette: Reply From: damncoder

There are no complex graphics setting like “low”, “medium” etc. in Godot. You need to create your own custom settings. For example:

HIGH
-msaa 16x
-anisotropic filtering 16x
-shadows resolution 8192
-ambient occlusion on (high quality)
-subsurface scattering on

MEDIUM
-msaa 8x
-anisotropic filtering 4x
-shadows resolution 2048
-ambient occlusion on (low quality)
-subsurface scattering on

etc, etc.

These settings can be controlled via “Project Settings” or directly via script (see Docs).

I got It changing in project settings via script and adding the command:

ProjectSettings.save()

But only change when i restart the game, You know if its possible change at runtime?

anllucah | 2019-03-21 20:41

Be aware that saving the ProjectSettings (so that they are automatically loaded on next start) might not work on Android/iOS as they don’t allow writing in res:// from where the settings are usually loaded.

To stay on topic:
Depending on the game, you can also change the max distance of shadows on lights (may be set it to 0 on very slow machines).
You can also change the ViewRange of the Camera.

And you can scale the viewport to run the game i.e. at half resolution.
(You’d have to scane the gui accordingly.)

These can be set/changed at runtime.

wombatstampede | 2019-03-22 07:44

Actually MSAA, AO, subsurface scattering and shadow resolution (i mean omni and spotlights) you can change on-the-fly from script:

get_viewport().set_shadow_atlas_size(4096)
get_viewport().set_msaa(get_viewport().MSAA_4X)
get_node("Camera").get_environment().set_ssao_enabled(false)

etc.

Directional light(s) shadow resolution you can change only via ProjectSetting + restart.

damncoder | 2019-03-22 07:54

I’m trying to do the same but I don’t know how. Can someone explain to me in more detail because I’m new to this field.
I will do whatever you say in return

Djukati | 2021-03-18 10:04

Anything for changing the texture resolution?

JayJay99 | 2021-07-17 18:51

Godot have a Size Limit option on the Import tab if you have a texture selected, I don’t know how it works but it seems that is what You want.

anllucah | 2021-07-17 19:02