minetest / minetest

Luanti (formerly Minetest) is an open source voxel game-creation platform with easy modding and game creation
https://www.minetest.net/
Other
10.78k stars 2.03k forks source link

Mods should be able to influence the fixed map lighting #14900

Open sfan5 opened 3 months ago

sfan5 commented 3 months ago

I am talking about ambient_occlusion_gamma and the light decode table: https://github.com/minetest/minetest/blob/90fccc15ebf86b58656c28ed9853780d92feb69e/src/light.cpp#L59-L60

Why? These are currently hardcoded or at least only client-controllable.

Usecase? In Minetest Classic I want to change these to make the result looks like Minetest 0.3 did. But this feature would be very versatile.

Open questions

hecktest commented 2 months ago

Since we're talking about a 16-byte palette, why restrict it to a gamma curve and not a user supplied LUT?

sfan5 commented 2 months ago

That's what I'm thinking yes. Just let mods specify the table. Perhaps leave gamma as the only user-adjustable parameter (within reasonable bounds).

Warr1024 commented 2 months ago

Currently, I have to advise players to adjust their gamma up to at least ~2 every time they complain that they can't see in dim lighting. There's no mod-controlled workaround for this. It seems like this would be a really good solution for this existing, pervasive problem.

Additionally, being able to change these at runtime per-player could also open up a lot of features like "night vision", especially if we had total control over the table, including the zero/black point.