SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 02-21-13, 05:36 PM   #16
Dignan
Seasoned Skipper
 
Join Date: Mar 2008
Posts: 698
Downloads: 262
Uploads: 0
Default

Quote:
Originally Posted by sober View Post
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);
}
__________________

Last edited by Dignan; 02-23-13 at 05:34 PM.
Dignan is offline   Reply With Quote
Old 02-25-13, 03:10 PM   #17
Dignan
Seasoned Skipper
 
Join Date: Mar 2008
Posts: 698
Downloads: 262
Uploads: 0
Default

I am making some progress on this. May try to release a beta by this weekend or sooner if I have time.
__________________
Dignan is offline   Reply With Quote
Old 02-25-13, 09:25 PM   #18
Dignan
Seasoned Skipper
 
Join Date: Mar 2008
Posts: 698
Downloads: 262
Uploads: 0
Default

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.


__________________
Dignan is offline   Reply With Quote
Old 02-25-13, 09:44 PM   #19
7thSeal
Samurai Navy
 
Join Date: Mar 2010
Posts: 592
Downloads: 199
Uploads: 0
Default

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.
7thSeal is offline   Reply With Quote
Old 02-25-13, 10:13 PM   #20
Dignan
Seasoned Skipper
 
Join Date: Mar 2008
Posts: 698
Downloads: 262
Uploads: 0
Default

Quote:
Originally Posted by 7thSeal View Post
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.
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.
__________________
Dignan is offline   Reply With Quote
Old 02-26-13, 04:09 AM   #21
Echolot
Seasoned Skipper
 
Join Date: Mar 2010
Location: Berlin, Germany
Posts: 718
Downloads: 575
Uploads: 0
Default

To remove the underwater depth of field effect change data/Shaders/HDR/DOF_PS.fx:

Quote:
#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:

Quote:
#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.

Before



After



Regards.

Echolt.
Echolot is offline   Reply With Quote
Old 02-26-13, 04:30 AM   #22
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Nice one Echolot
I do like to see what is going on
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 02-26-13, 09:16 AM   #23
Dignan
Seasoned Skipper
 
Join Date: Mar 2008
Posts: 698
Downloads: 262
Uploads: 0
Default

Quote:
Originally Posted by Echolot View Post
To remove the underwater depth of field effect change data/Shaders/HDR/DOF_PS.fx:
Regards.

Echolt.
Thanks for the tip Echolot. 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.
__________________
Dignan is offline   Reply With Quote
Old 02-26-13, 01:20 PM   #24
Hartmann
Sea Lord
 
Join Date: Mar 2005
Location: Grid CH 26, Spain ,Barcelona
Posts: 1,857
Downloads: 204
Uploads: 0
Default

Could be possible change the underwater and surface colours for anothers ?

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
__________________
But this ship can't sink!...

She is made of iron, sir. I assure you, she can. and she will. It is a mathematical certainty.

Strength and honor
Hartmann is offline   Reply With Quote
Old 02-26-13, 02:14 PM   #25
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Dignan View Post
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!

Quote:
Originally Posted by Dignan View Post
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 for another example). It seems to be related with underwater draw distances.

I hope you will manage finding the right compromise.

Quote:
Originally Posted by Dignan View Post
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

Quote:
Originally Posted by Dignan View Post
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

Quote:
Originally Posted by Echolot View Post
To remove the underwater depth of field effect change data/Shaders/HDR/DOF_PS.fx:
Interesting finding, Echolot. Thank you for sharing

Quote:
Originally Posted by Hartmann View Post
Could be possible change the underwater and surface colours for anothers ?

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
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
gap is offline   Reply With Quote
Old 02-26-13, 06:18 PM   #26
7thSeal
Samurai Navy
 
Join Date: Mar 2010
Posts: 592
Downloads: 199
Uploads: 0
Default

Quote:
Originally Posted by Dignan View Post
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.
7thSeal is offline   Reply With Quote
Old 02-26-13, 06:29 PM   #27
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by 7thSeal View Post
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
gap is offline   Reply With Quote
Old 02-26-13, 06:42 PM   #28
7thSeal
Samurai Navy
 
Join Date: Mar 2010
Posts: 592
Downloads: 199
Uploads: 0
Default

Quote:
Originally Posted by gap View Post
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
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.
7thSeal is offline   Reply With Quote
Old 02-26-13, 06:43 PM   #29
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by 7thSeal View Post
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
gap is offline   Reply With Quote
Old 02-26-13, 07:35 PM   #30
Dignan
Seasoned Skipper
 
Join Date: Mar 2008
Posts: 698
Downloads: 262
Uploads: 0
Default

Quote:
Originally Posted by gap View Post
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.
__________________
Dignan is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.