View Full Version : Modding underwater light/clarity
Does anyone know how to mod the hdr_underwater.cfg file in data\filters\colorcorrection?
I've done some searches and found some old mods that you can't download anymore but still haven't found a solution to this. I use North Atlantic Green 1.1 but am still dissatisfied with the level of clarity and brightness underwater. I play full realism and don't think you should be able to see too much beyond the bow of your uboat through the periscope when submerged.
The parameters in hdr_underwater are below. Anyone have any idea which settings to lower or higher to make the water more cloudy and darker? Especially at night, the water should be almost black.
[ColorCorrectionFilter]
Gamma=0.7
Brightness=0.7
Saturation=1.0
Contrast=1.0
LevelsInputBlack=0.0
LevelsInputMidtone=0.85
LevelsInputWhite=0.87
LevelsOutputBlack=0.0
LevelsOutputWhite=1.0
ColorBalanceR=0.0
ColorBalanceG=0.6
ColorBalanceB=0.0
ColorBalanceTone=1
HueColor=FFFFFF00
HueOpacity=0.0
PhotoFilterColor=6DA9A200
PhotoFilterIntensity=1.0
7thSeal
02-19-13, 10:28 PM
Don't know about which settings to change but have you tried naights underwater mod? Its affected by depth and night, one of the darkest that I've used. Download is toward the bottom of first post and there is more screenshots on the last page of the thread. :)
http://www.subsim.com/radioroom/showthread.php?t=171658&highlight=submarine+textures+interior
volodya61
02-19-13, 10:33 PM
try this..
sobers_realistic_underwater_FX2 - http://www.subsim.com/radioroom/downloads.php?do=file&id=2750
Thanks guys. I have looked at both of those but didn't really take to them. Sober's is good but too blurry when looking through the scope in my book. Naights is also good but if changes fog settings so I didn't want to add something that might interfere with FX update fog settings or even with stock fog settings because they are tied to spotting distances.
I just want to be able to decrease brightness and add a little bit of fuzziness/haze that really cuts out detail on objects more than a boat length away.
Does anyone know how to mod the hdr_underwater.cfg file in data\filters\colorcorrection?
Before I start with a detailed description: how familiar are you with image processing? Explaining (and understanding) those settings by making reference to the analogue functions of any good photo editing program, would be a lot easier :yep:
THE_MASK
02-20-13, 04:55 AM
Do the underwater values in the scene dat do anything ? S3D tool maybe .
Do the underwater values in the scene dat do anything ? S3D tool maybe .
Possible,
I am inclined to see UpLight and DownLight parameters as the light filtering underwater and reflected by submerged bodies. Easy to test it, by changing their colors. More interesting are imo the Zmin/Zmax fog properties. In stock game and in DynEnv they are both set to 0 (no underwater fog?) :hmmm:
Two other parameters that could modify the underwater visibility individually for each climate zone/cloud coverage/time of the day are UnderwaterUpAlpha and UnderwaterDownAlpha settings (data/Env/EnvColors_*.cfg), but tweaking/testing all of them would be such a PITA :dead:
Before I start with a detailed description: how familiar are you with image processing? Explaining (and understanding) those settings by making reference to the analogue functions of any good photo editing program, would be a lot easier :yep:
:huh: Ha! Not very familiar at all so I guess I wouldnt' waste your time explaining it. I did figure out how to make it darker by playing with the gamma and brightness settings. That's pretty obvious. I may try to tinker with the UnderwaterUpAlpha and UnderwaterDownAlpha settings or the scene dat sober mentioned.
I've got it so the water is darker but now I want to make it cloudy. The clear water looks beautiful in the game but it just isn't realistic.
:huh: Ha! Not very familiar at all so I guess I wouldnt' waste your time explaining it. I did figure out how to make it darker by playing with the gamma and brightness settings. That's pretty obvious.
Since you already figuret out how the gamma/brightness/contrast settings work, I'll try to explain the trickier LevelsInput settings, as they allow for more subtle image control than the previous.
LevelsOutputBlack lets you to set how dark will be the darkest pixel rendered on screen. 0 means black and 1 white. LevelsOutputWhite is the same, but for bright output. In other words, values respectively higher than 0 or lower than 1 reduce the contrast between the darkest and the brightest part of the image, and unsimmetrical settings will also affect its general luminosity.
LevelsInputBlack and LevelsInputWhite are a bit trickier to understand.
In a nutshell, they determine how many pixels of the unfiltered image will have the darkest/brightest outputs after filtering. Another way to see the above settings is as if they were thresholds:
let's give the darkest possible output, as set with LevelsOutputBlack, the value 0, and the brightest one, similarly defined by LevelsOutputWhite, the value 1. Between these two extremes, there are various shades of grey.
LevelsInputBlack is the threshold in the above scale, below which dark greys are rendered as the darkest possible grey in the filtered image. Likewise, LevelsInputWhite is the threshold above which light greys are rendered as the brightest possible grey. Both these settings work to detriment of mid tones, and they have the effect of increasing output contrast. Unsimmetrical settings will also affect its brightness.
Finally, LevelsInputMidtone works in a similar way to gamma, thus affecting mid tones brightness. I believe that a value of 0.5 will make the output brightness to increase linearly between LevelsOutputBlack and LevelsOutputWhite. Values close to 0 will make the brightness function into a concave curve, thus reducing the luminosity. Viceversa, values close to 1 will result in a convex function, and higher luminosity.
I may try to tinker with the UnderwaterUpAlpha and UnderwaterDownAlpha settings or the scene dat sober mentioned.
UnderwaterUpAlpha and UnderwaterDownAlpha are found in envcolors cfg files, and it won't be easy for you editing them, as they are many. You probably meant UpLight, DownLight and Fog parameters. ;)
Please keep us informed if you find anything interesting about them
I've got it so the water is darker but now I want to make it cloudy. The clear water looks beautiful in the game but it just isn't realistic.
I definitely agree with you :yep:
I am still not satisfied with the high underwater visibility of DynEnv realistic version. If you manage to increase underwater fog I might be interested into including you settings in it. Or, if you prefer, you could release them as a separate mod. I am sure many would appreciate it :up:
Since you already figuret out how the gamma/brightness/contrast settings work, I'll try to explain the trickier LevelsInput settings, as they allow for more subtle image control than the previous.
LevelsOutputBlack lets you to set how dark will be the darkest pixel rendered on screen. 0 means black and 1 white. LevelsOutputWhite is the same, but for bright output. In other words, values respectively higher than 0 or lower than 1 reduce the contrast between the darkest and the brightest part of the image, and unsimmetrical settings will also affect its general luminosity.
LevelsInputBlack and LevelsInputWhite are a bit trickier to understand.
In a nutshell, they determine how many pixels of the unfiltered image will have the darkest/brightest outputs after filtering. Another way to see the above settings is as if they were thresholds:
let's give the darkest possible output, as set with LevelsOutputBlack, the value 0, and the brightest one, similarly defined by LevelsOutputWhite, the value 1. Between these two extremes, there are various shades of grey.
LevelsInputBlack is the threshold in the above scale, below which dark greys are rendered as the darkest possible grey in the filtered image. Likewise, LevelsInputWhite is the threshold above which light greys are rendered as the brightest possible grey. Both these settings work to detriment of mid tones, and they have the effect of increasing output contrast. Unsimmetrical settings will also affect its brightness.
Finally, LevelsInputMidtone works in a similar way to gamma, thus affecting mid tones brightness. I believe that a value of 0.5 will make the output brightness to increase linearly between LevelsOutputBlack and LevelsOutputWhite. Values close to 0 will make the brightness function into a concave curve, thus reducing the luminosity. Viceversa, values close to 1 will result in a convex function, and higher luminosity.
UnderwaterUpAlpha and UnderwaterDownAlpha are found in envcolors cfg files, and it won't be easy for you editing them, as they are many. You probably meant UpLight, DownLight and Fog parameters. ;)
Please keep us informed if you find anything interesting about them
I definitely agree with you :yep:
I am still not satisfied with the high underwater visibility of DynEnv realistic version. If you manage to increase underwater fog I might be interested into including you settings in it. Or, if you prefer, you could release them as a separate mod. I am sure many would appreciate it :up:
Thanks Gap. I'll definitely report if I make any good progress
ReallyDedPoet
02-20-13, 03:25 PM
Be interested in seeing how this turns out. In SH3 there is an option in SH3 Commander that does this for you, it is a nice effect :yep:
Thanks Gap. I'll definitely report if I make any good progress
I hope that my explainations didn't confuse you rather than helping you...
In any case don't esitate getting in touch again in case you need for any clarification :up:
7thSeal
02-20-13, 05:54 PM
Thanks guys. I have looked at both of those but didn't really take to them. Naights is also good but if changes fog settings so I didn't want to add something that might interfere with FX update fog settings or even with stock fog settings because they are tied to spotting distances.
You can open the data folder in the mod and delete the Env folder before enabling the mod. The fog won't be messed with then. The mod is based off of the different water colors found in Dynamic Environment mod so if not using that one then it probably wouldn't be a good option to try.
Anyways, if you come up with one you like post some pics for us to see... I'd be glad to give it a try myself. :)
I hope that my explainations didn't confuse you rather than helping you...
In any case don't esitate getting in touch again in case you need for any clarification :up:
Nah, if anything you pointed me in the right direction of which files to mess with. Now if someone could just make a real life mod that gives me more free time to do all this.
THE_MASK
02-21-13, 04:00 PM
Silent Hunter 5\data\Shaders\HDR\DOF_PS
Try adjusting this .
Silent Hunter 5\data\Shaders\HDR\DOF_PS
Try adjusting this .
Thanks. I'm on the road now but will check it out when im back this weekend
Checked this file. This is all I see. Not sure what values to edit:
#include <data/shaders/hdr/common.inc>
float2 g_focalDistance : register(c0);
struct PS_IN
{
float2 Tex0 : TEXCOORD0;
};
float4 main( PS_IN In ) : COLOR
{
float depth = tex2D(tex1, In.Tex0).r;
float interp = saturate( abs( depth - g_focalDistance.x ) / g_focalDistance.y );
float3 color = tex2D(tex0, In.Tex0).rgb;
//return float4(depth, depth, depth, 1);
//return float4(interp, interp, interp, 1);
return float4(color, interp);
}
I am making some progress on this. May try to release a beta by this weekend or sooner if I have time.
I'm still testing this in game but here is what I've got so far. The only side effect is that at about 50 meters you can see a faint light through the water that is the horizon. For some reason it comes through the underwater fog a bit. But how often are you looking out the periscope at that depth anyway?
If anyone is interested I can release it as a mod. I find that it looks even better when installed on top of Sh5EnvGold, the original environment mod for SH5.
This picture is underwater at high noon on a clear day.
http://www.mediafire.com/conv/5dc55fb5b73d3a164d87625c82c38b7e3daa7f9b77f597254e 964015cf7e53896g.jpg
http://www.mediafire.com/view/?5l8u151jcwsi8ue
7thSeal
02-25-13, 09:44 PM
Does it use impurity (stuff floating in water)? Looks like its been removed in the screenshot. High noon and clear day looks good to me in that shot. I'll certainly give it a try if you post as a mod. :salute:
Does it use impurity (stuff floating in water)? Looks like its been removed in the screenshot. High noon and clear day looks good to me in that shot. I'll certainly give it a try if you post as a mod. :salute:
impurities are still there. I believe it is very simple to remove them. I am indifferent towards them so I'll take them out.
One issue I am having is that the brightness of the water doesn't seem to correspond to day and night. In other words, the underwater light level looks way too light at night. It's good for daytime but doesn't look right at night. Although this was a stock issue too so nothing has changed there.
Echolot
02-26-13, 04:09 AM
To remove the underwater depth of field effect change data/Shaders/HDR/DOF_PS.fx:
#include <data/shaders/hdr/common.inc>
float2 g_focalDistance : register(c0);
struct PS_IN
{
float2 Tex0 : TEXCOORD0;
};
float4 main( PS_IN In ) : COLOR
{
float depth = tex2D(tex1, In.Tex0).r;
float interp = saturate ( abs( depth - g_focalDistance.x ) / g_focalDistance.y ) ;
float3 color = tex2D(tex0, In.Tex0).rgb;
//return float4(depth, depth, depth, 1);
//return float4(interp, interp, interp, 1);
return float4(color, interp);
}
to:
#include <data/shaders/hdr/common.inc>
float2 g_focalDistance : register(c0);
struct PS_IN
{
float2 Tex0 : TEXCOORD0;
};
float4 main( PS_IN In ) : COLOR
{
float depth = tex2D(tex1, In.Tex0).r;
float interp = saturate;
float3 color = tex2D(tex0, In.Tex0).rgb;
//return float4(depth, depth, depth, 1);
//return float4(interp, interp, interp, 1);
return float4(color, interp);
}
(by vickers03).
Download here (http://www.gamefront.com/files/17813752/underwaterclear.zip).
Before
http://img442.imageshack.us/img442/3166/doft.jpg
After
http://img808.imageshack.us/img808/3319/nodof.jpg
Regards.
Echol:salute:t.
Trevally.
02-26-13, 04:30 AM
Nice one Echolot:up:
I do like to see what is going on:yep:
To remove the underwater depth of field effect change data/Shaders/HDR/DOF_PS.fx:
Regards.
Echol:salute:t.
Thanks for the tip Echolot. :salute: However, I'm trying to decrease the underwater clarity with this modding effort. I think stock underwater and even some of the mods make it look as clear as a swimming pool. That just isn't real unless you are in parts of the Caribbean. Your post did show me how to play with the DOF parameters though so it helped me. Thanks.
Hartmann
02-26-13, 01:20 PM
Could be possible change the underwater and surface colours for anothers ? :hmmm:
For example if i use a environment mod with green waters and i want to turn the colour to blue.
I donīt know if is realistic but i like a lot more blue colours :D
I'm still testing this in game but here is what I've got so far.
...
This picture is underwater at high noon on a clear day.
Considered weather and time of the day, imo the underwater visibility of your screenshot is a bit too low (at least for Mediterranean standards), yet it is a big improvement over other environmental mods.
Well done Dignan! :up:
The only side effect is that at about 50 meters you can see a faint light through the water that is the horizon. For some reason it comes through the underwater fog a bit. But how often are you looking out the periscope at that depth anyway?
IIRC, this is an issue stoianm had faced before the first release of DynEnv, when he was trying to achieve your same effect. At the end we reluctantly decided to give up. Apparently other modders had the same problem (follow this link (http://www.subsim.com/radioroom/showthread.php?p=1332523#post1332523) for another example). It seems to be related with underwater draw distances. :yep:
I hope you will manage finding the right compromise.
If anyone is interested I can release it as a mod. I find that it looks even better when installed on top of Sh5EnvGold, the original environment mod for SH5.
Definitely interested, especially if you make a version of the mod finetuned for working with DynEnv :yep: :D
One issue I am having is that the brightness of the water doesn't seem to correspond to day and night. In other words, the underwater light level looks way too light at night. It's good for daytime but doesn't look right at night. Although this was a stock issue too so nothing has changed there.
Try playing with the following parameters in EnvColors_*.cfg files:
UnderwaterFogColor
UnderwaterUpColor
UnderwaterUpAlpha
UnderwaterDownColor
UnderwaterDownAlpha
There is one of them for each cloud coverage type and sun angle :up:
To remove the underwater depth of field effect change data/Shaders/HDR/DOF_PS.fx:
Interesting finding, Echolot. Thank you for sharing :up:
Could be possible change the underwater and surface colours for anothers ? :hmmm:
For example if i use a environment mod with green waters and i want to turn the colour to blue.
I donīt know if is realistic but i like a lot more blue colours :D
yes through EnvColors_*.cfg settings.
The advantage of using them, is that they are not global: each zone got its own cfg file. We exploited this fact in DynEnv for limiting high turpidity (greyish-greenish water surface and underwater) to some areas of the globe were algal blooms are common in real life :sunny:
7thSeal
02-26-13, 06:18 PM
impurities are still there. I believe it is very simple to remove them. I am indifferent towards them so I'll take them out.
You don't have to take them out if you don't want too, personally I use them but they can easily be removed from a mod that has them. Naights mod uses alot of impurities to help cut down the viewing distance and I've gotten use to it.
It's up to you though whether to remove them... or you could have it as an option I guess to use it. :)
You don't have to take them out if you don't want too, personally I use them but they can easily be removed from a mod that has them. Naights mod uses alot of impurities to help cut down the viewing distance and I've gotten use to it.
It's up to you though whether to remove them... or you could have it as an option I guess to use it. :)
Most of the mods decreasing impurity particles, do it by altering the impurity.dds file. You can remove this file from the mod you are using, for restoring stock impurities :03:
7thSeal
02-26-13, 06:42 PM
Most of the mods decreasing impurity particles, do it by altering the impurity.dds file. You can remove this file from the mod you are using, for restoring stock impurities :03:
Yessir I've tried it both ways with the mod I have now and had gotten use to the thick impurity so I left it in there. Its always good having the options. :)
Yessir I've tried it both ways with the mod I have now and had gotten use to the thick impurity so I left it in there. Its always good having the options. :)
Indeed, I like impurities as well :03:
Considered weather and time of the day, imo the underwater visibility of your screenshot is a bit too low (at least for Mediterranean standards), yet it is a big improvement over other environmental mods.
After looking at it again with fresh eyes, I sort of agree with on this. I'll reduce the fog a little and continue working on this. If I decide to venture into the world of underwater up/down color/alpha it will be a while before I complete this. It seems those parameters are the secret to making the water darker at night and lighter during the day.
After looking at it again with fresh eyes, I sort of agree with on this. I'll reduce the fog a little and continue working on this.
I am glad you agree with me. The low level of transparence/luminosity shown in your screenshot occur only at dusk, or in connection with overcast weather/high waves (this is always relative to Mediterranean: I have not significant experience of Atlantic diving).
Tuning down the fog effect will hopefully minimize the underwater horizon effect :up:
If I decide to venture into the world of underwater up/down color/alpha it will be a while before I complete this. It seems those parameters are the secret to making the water darker at night and lighter during the day.
Yes, there's no other way to link undewater luminosity with season, weather and climate. :yep:
If, as I hope, you decide to make your changes over Dynamic Environment, I will provide you with as much assistance as I can :up:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.