Skyrim: Setting Adaptation Correctly

fixing bugs
Post Reply
  • Author
  • Message
Offline
Posts: 10
Joined: 18 Oct 2017, 20:57

Skyrim: Setting Adaptation Correctly

I'm having a hard time configuring Adaptation to work properly. I just want the adaptation effect to work as intended, brightening really dark areas, and darkening really bright areas, but I'm having a hard time understanding how each setting alters this interaction. Also it's unclear if these values need to be tweaked differently for very bright day and very dark night conditions.

In other words, I can modify the settings so that adaptation works fairly well in bright outdoor areas, but in dark caves or at night, adaptation will not brighten really dark areas. How do I configure Adaptation so that extremely dark areas and extremely bright areas will be adjusted to be about the same overall brightness once the Adaptation transition finishes.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Skyrim: Setting Adaptation Correctly

There are parameters in enbeffect.fx for adaptation which also must be tweaked, because they define how screen change, while enbseries.ini adaptation is for computing how adaptation texture processed (clamp it's values to range of min/max). If you have very big range of intensities, then can set AdaptationMin to very low and AdaptationMax to very high. Result is adaptation texture which is kinda average screen brightness, so if you divide screen color by this intensity (not just divide of course), instensity of result will be normalized and about the same, nights will look like days. Personally i tweaking adaptation only after set brightness for sky and clouds, they are basis. Then make adaptation like it should be when looking at sun with clouds near, that's maximal adaptation. For lower i find any shadowed area in the day time where colors of textures also dark, tweak minimal adaptation. Its not easy to explain, process need to be understand before do any changes.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 10
Joined: 18 Oct 2017, 20:57

Re: Skyrim: Setting Adaptation Correctly

Thank you so much! Those settings in the enbeffects page were the missing link. I'm still having some trouble understanding how Sensitivity and Min and Max values interact together. Here are some observations I found:

Sensititivity - lower values require a greater chanage in scene brightness before adaptation occurs, higher values cause adaptation to occur with minor changes in scene brightness. higher values also darken the overall scene brightness.

Min - choosing a value higher than 0.0 appears to disable adaptation in really dark areas

Max - low values will greatly increase the amount of adaptation in dark scenes

My initial tests show this to be a good balance:
Sensitivity = 0.05
Min = 0.0
Max = 0.95

Could you help me understand why increasing sensitivity darkens the scene, why min values great than 0.0 seem to break adaptation in dark scenes, and why lowering max causes dark scenes to get alot brighter?

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Skyrim: Setting Adaptation Correctly

Sorry, i can't help, going to another city. If nobody ask and you don't figure out, write again after week or more. Bump this thread after my post.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 10
Joined: 18 Oct 2017, 20:57

Re: Skyrim: Setting Adaptation Correctly

Thank you. Sorry for all of the questions, but I just can't figure out what Min and Max actually do. It seems odd that adjusting Min from 0.00 to 0.01 has a huge impact on adaptation in dark areas, but from 0.01 to 1.00 there is very little difference.

Could you provide a simple example of how Min and Max work in a very dark and very bright scene?

Also is scene brightness calculated and averaged evenly across the entire screen, or does brightness in the center carry more or less influence?

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Skyrim: Setting Adaptation Correctly

There is no center weight, but it's not average. Sensitivity parameter is how much some bright small area on screen affect adaptation texture. When sensitivity is low, then its very close to average screen brightness as summ of all pixels on screen divided by their amount, but at high sensitivity, some small fire in the night will make everything barely visible, except fire. It's like blinding factor. Min and max values are simply cropping factors for result of that "average" adaptation level, if it below min, then it is set to min, if above max, then set it to max. When its very small as minimal level it means that in dark scenes adaptation can't be lower then minimum, so it no longer correct amount of darkness by making it brighter, which means that night will not become day. For maximal level, everything is inverted by meaning, too bright things like fire and sun will be kinda ignored and brightness of final result will not go down, such bright objects will stay very bright. When maximal level is too high wrongly, then looking at the sun will make it gray and everything else very dark. Using values around 1.0 is meanless if you want to use full power of hdr in ENBSeries, max value should be higher, same as other things like sun intensity.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 10
Joined: 18 Oct 2017, 20:57

Re: Skyrim: Setting Adaptation Correctly

Thanks again! Your knowledge has been very helpful. I think my issue at this point may be trying to get Adaptation to do more than it is able to do. For example, let's say I'm in an outdoor area that is very bright and I go under a bridge that is perfectly shaded and very dark. I'd like the Adaptation to make very extreme adjustments in both of those situations. So if I am starring at the sun it has a blinding effect and makes everything dark around the sun. But under the bridge, when it is dark everywhere, it should greatly increase the brightness so that everything is clearly visible as though it was sunny there.

I can't seem to enable both of these scenarios at once. Keeping Min at 0 is essential for brightening very dark areas. I then increase Sensitivity up until small light sources start to introduce flickering, And then I just tweak Max to get the overall level of brightness that I want, but the actual amount of brightness adjustment is still too low.

These two images might explain it better:

https://imgur.com/a/NNAmx

Perhaps I need to modify more than just the Adaptation parameters to do this? Maybe adjust the intensity of the sun and/or ambient light levels?

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Skyrim: Setting Adaptation Correctly

You can achieve this easily, any ranges are fine, it's usual inverse dependency. But you probably have issues because adaptation is not purely applied as divider to each pixel of screen in enbeffect.fx, but there are some other parameters. For example, EAdaptationMinV1, EAdaptationMaxV1 also cropping like in enbseries.ini, but they work in non linear way and not actually min and max, but called such way for simpler understanding. Here is the code from enbeffect.fx:

Code: Select all

	grayadaptation=max(grayadaptation, 0.0);
	grayadaptation=min(grayadaptation, 50.0);
	color.xyz=color.xyz/(grayadaptation*EAdaptationMaxV1+EAdaptationMinV1);//*tempF1.x
grayadaptation is adaptation texture, internally computed with parameters from enbseries.ini applied. max and min in this code is clamping exactly the same way as in enbseries.ini, just mathematically min(grayadaptation, 50.0) is actually maximal level clamping AdaptationMax. If you want to have very high ranges of adaptation, then increas 50 to much bigger (i suggest to not use more than 32768) or you can get black areas.
If you replace
color.xyz=color.xyz/(grayadaptation*EAdaptationMaxV1+EAdaptationMinV1);
by this:
color.xyz=color.xyz/grayadaptation;
the result will be pure inverse dependency, producing normalization and no matter how bright screen is, the result is same in average.
Another thing, don't forget later tonemapping applied, it compress colors and brightness a lot, if you want to test adaptation only, then disable tonemapping and write output of color.xyz after adaptation code to temporary variable and in the end of shader use it as output directly. You know, it's not that easy, you should learn to tweak shader too or select some which you like and adjust it's parameters, because custom shaders by users can be very much different.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 10
Joined: 18 Oct 2017, 20:57

Re: Skyrim: Setting Adaptation Correctly

Thanks! Increasing the parameter value in the min function made a big difference. Actually I found values as high as 50000 to still be useful. Aside from increasing the degree of blackening, is there another reason not to exceed 32768 here? I haven't noticed any issues at 50000 yet.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17427
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: Skyrim: Setting Adaptation Correctly

Internally value is cut to 32768, because maximal float16 is 65535, which is infinity bug.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7
Post Reply