Shadow intensity randomly changes at startup

Post Reply
User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Shadow intensity randomly changes at startup

by Linuxdirk » Post

Basically the title.

I only closed and re-started the client and opened the same world. Shadows look different on pretty much every restart.

Short video containing some more screenshots than attached (changed every 3 seconds: https://imgur.com/a/9aaaDbX

(Screenshots and video are of low resolution so save bandwidth but the effect is clearly visible)

Shadow-related settings in minetest.conf:

Code: Select all

enable_dynamic_shadows = true
shadow_filters = 2
shadow_map_texture_32bit = true
shadow_map_color = true
shadow_map_max_distance = 210
shadow_map_texture_size = 4096
shadow_soft_radius = 10.0
shadow_map_color = true
Since this is such an obvious issue that would have been detected when implementing and testing the feature (and since there is no issue at MS GitHub describing this issue) I assume that is a local issue. So here is some more system information:

Code: Select all

$ minetest --version
Minetest 5.6.0 (Linux)
Using Irrlicht 1.9.0mt7
Using LuaJIT 2.1.0-beta3
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="/usr/share/minetest"
STATIC_LOCALEDIR="/usr/share/locale"

$ uname -rms
Linux 5.18.16-arch1-1 x86_64

$ nvidia-smi -L
GPU 0: NVIDIA GeForce GTX 1080 (UUID: …)

$ nvidia-smi --query-gpu=driver_version --format=csv --id=0
driver_version
515.65.01

$ X -version 2>&1 | grep Server
X.Org X Server 1.21.1.4
Any help is very much appreciated!
Attachments
mpv-shot0003.jpg
mpv-shot0003.jpg (69.13 KiB) Viewed 997 times
mpv-shot0002.jpg
mpv-shot0002.jpg (70.84 KiB) Viewed 997 times
mpv-shot0001.jpg
mpv-shot0001.jpg (69.91 KiB) Viewed 997 times

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: Shadow intensity randomly changes at startup

by jp » Post

I can confirm exactly the same behavior.

Astrobe
Member
Posts: 577
Joined: Sun Apr 01, 2018 10:46

Re: Shadow intensity randomly changes at startup

by Astrobe » Post

In MTG, the shadow intensity depends on the weather, if it is enabled:

https://github.com/minetest/minetest_ga ... 275fb0e4bc

The effect might need some tuning; getting global lighting consistent with cloud coverage is not trivial, and so are shadows, as a consequence.
I did similar things in my local version of Snowdrift; shadow intensity, cloud coverage and lighting follow different curves.

User avatar
Desour
Member
Posts: 1473
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: Shadow intensity randomly changes at startup

by Desour » Post

This feature us super weird and feels more like a bug imo. If it's more cloudy, I'd expect everything (especially the regions outside of shadows) to become darker, and not a more bright scene.
Thanks for showing me where this comes from.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Shadow intensity randomly changes at startup

by Linuxdirk » Post

For testing I deleted my configuration to have shadows using the default values and re-enabled them in the client.

With enable_weather unset or with enable_weather = true I get (seemingly) random shadow intensity like before. With enable_weather = false I have no dynamic shadows at all.

So it seems like dynamic shadows in Minetest game were accidentally bound to enable_weather being true.

Astrobe
Member
Posts: 577
Joined: Sun Apr 01, 2018 10:46

Re: Shadow intensity randomly changes at startup

by Astrobe » Post

DS-minetest wrote:
Thu Aug 11, 2022 17:21
This feature us super weird and feels more like a bug imo. If it's more cloudy, I'd expect everything (especially the regions outside of shadows) to become darker, and not a more bright scene.
Thanks for showing me where this comes from.
Actually what happens IRL is that clouds both occlude and diffuse/scatter the light of the sun (or the moon! I was pleased to see that there's moon shadows too in MT). Clouds decrease the contrast between light and shadows.

So what you want to do is both lighten shadows and decrease the global lighting (with player::override_day_night_ratio() ) when the cloud density increases. It could be a rabbit hole, though.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests