Gamma Utils (Fullbright)

Gamma Utils (Fullbright)

1M Downloads

[Suggestion] - Adaptative gamma

John-Development opened this issue · 9 comments

commented

I love playing in 30% gamma, but for creating cool effects in caves is too dark so I rise it up to 150%. Just as the eye adapts naturally with time to catch more light in darker places and the opposite in brighter ones, it would be cool if there was a way to gradually change gamma depending on something like the average light in the player field of view, configurable between a max and a min values.

I dont really know how easy to implement this idea is (or if it is even possible) but I thought could be a cool addition to this mod!

commented

Hi, thank you for your suggestion.
I like the idea, I'll see if I can implement something like that soon.
It however probably has to use the light level of the block you're standing on, averaging all light within the field of view doesn't sound like a feasible solution.

commented

Using the rendered image wouldn't work. Doing that could cause the gamma to change dependend on if you're looking at a build made out of deepslate vs quartz, regardless of the light level. Which wouldn't make much sense.

I'll just start with taking the light level of the block you're standing on and will look at how feasible it is to grab an avarage light level of more blocks around you.

commented

averaging all light within the field of view doesn't sound like a feasible solution.

Yeah, that could be thousands of blocks. Maybe you could make a configurable additional radius, 0 = only current block, positive = additional rings.

commented

What about some pixel average brightness?

Instead of ingame light positions you could use the raw rendered image and the current gamma to calculate every few ticks the new gamma value (is this even possible? 🤔)

Maybe thats even more complicated i dont know... 😅

commented

@John-Development Which pixels should it be based on? All on screen? That, again, would require a huge amount of calculations, which I assume is exactly what we're trying to avoid. (Because that would be bad for performance.)

commented

I guess a sphere centered in the screen should be enough, but could also be one every N pixels for all the screen. Is not the perfect solution, and could still be a bit hard on resources, but that could be a decent aproximation... 🤔

Still, dount these every few seconds instead of every tick should be enough not to overload the cpu with calculations...
And could also be dependant on the previous calculations to even make it faster, witch actually would lead to what happens to the human eye, that it needs a bit of time to fully adapt to the environment

commented

It's been added to the latest release, see: https://modrinth.com/mod/gamma-utils/version/2.1.0

commented

Loving this new feature, but would it be possible to have sky light play into the dynamic brightness change as well as block light? I like having 500 gamma in caves where both block and sky light is 0, but on the surface at night where block light is 0 and sky light is 15, I prefer around 250.

commented

Loving this new feature, but would it be possible to have sky light play into the dynamic brightness change as well as block light? I like having 500 gamma in caves where both block and sky light is 0, but on the surface at night where block light is 0 and sky light is 15, I prefer around 250.

Thank you for the suggestion, though next time please make sure to create a new issue. That way it's easier for me to keep track of it. Coincidentally someone already made one recently that's related to your suggestion. I'll add a solution to the mod soon, see this issue for more info: #46