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 > Silent Hunter 5
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-24-10, 08:24 AM   #16
AVGWarhawk
Lucky Jack
 
AVGWarhawk's Avatar
 
Join Date: Jun 2005
Location: In a 1954 Buick.
Posts: 28,254
Downloads: 90
Uploads: 0


Default

kriller2 speaks truth!
__________________
“You're painfully alive in a drugged and dying culture.”
― Richard Yates, Revolutionary Road
AVGWarhawk is offline   Reply With Quote
Old 03-24-10, 08:47 AM   #17
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

SH5 does not use any more textures for the sky, neither external or embedded textures in the DAT/GR2 files. The gradations of the sky and the colors are calculated by the Sky_Shader. The input colors come from the CFG's in /data/env. There are the colors for different regions and daytime. You have SkyTopColor and SkyBottomColor and the shader now interpolates the colors and transitions between them. To get rid of the sky gradient bandings you must define a better and smoother algorithm within the shader.
__________________
--
Vapor-ware is always easier to sell because there's no limit what it can do!
Seeadler is offline   Reply With Quote
Old 03-24-10, 11:04 AM   #18
Coldcall
Chief
 
Join Date: Mar 2010
Posts: 325
Downloads: 42
Uploads: 0
Default

Quote:
Originally Posted by Seeadler View Post
SH5 does not use any more textures for the sky, neither external or embedded textures in the DAT/GR2 files. The gradations of the sky and the colors are calculated by the Sky_Shader. The input colors come from the CFG's in /data/env. There are the colors for different regions and daytime. You have SkyTopColor and SkyBottomColor and the shader now interpolates the colors and transitions between them. To get rid of the sky gradient bandings you must define a better and smoother algorithm within the shader.
so could some GPUs be handling that better than others? Is there a way to alter this oneself, or do we need a patch from the devs?
Coldcall is offline   Reply With Quote
Old 03-24-10, 11:20 AM   #19
java`s revenge
Ace of the Deep
 
Join Date: Jan 2007
Location: at periscope depth
Posts: 1,204
Downloads: 97
Uploads: 0
Default

Sorry to say but i didn`t see it in sh3 and sh4.

I have now a nvidia 260GTX and see also the banding in the sky so maybe it`s videocard related.
__________________
java`s revenge is offline   Reply With Quote
Old 03-24-10, 11:31 AM   #20
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by Coldcall View Post
Is there a way to alter this oneself, or do we need a patch from the devs?
it's all in the sky shaders (\Silent Hunter 5\data\Shaders\Sky)
and EnvColors_xxx.cfg's (\Silent Hunter 5\data\Env\)

Code:
// 1. base gradient, from top to bottom    
float heightRatio = pow(In.eyeDir.w / 992.0, g_skyBottomColor.w);    
color  = lerp(g_skyBottomColor.rgb, g_skyTopColor.rgb, heightRatio);
Values for g_skyBottomColor and g_skyTopColor are set in EnvColors_xxx.cfg

Now in the above pixel shader code for each pixel the virtual camera eye is directed on, the color value will be calculated with a linear interpolation (x*(1-s) + y*s) between top- and bottom-color. This is done by the HLSL lerp() function.
You can now implement a different algorithm for example with smoothstep() functions which calculate a smoother intepolation based on the Hermite Interpolation instead of linear interpolation but this can cause lower framerates if alot of smoothstep's are used.
__________________
--
Vapor-ware is always easier to sell because there's no limit what it can do!
Seeadler is offline   Reply With Quote
Old 03-24-10, 11:37 AM   #21
Coldcall
Chief
 
Join Date: Mar 2010
Posts: 325
Downloads: 42
Uploads: 0
Default

Quote:
Originally Posted by Seeadler View Post
it's all in the sky shaders (\Silent Hunter 5\data\Shaders\Sky)
and EnvColors_xxx.cfg's (\Silent Hunter 5\data\Env\)

Code:
// 1. base gradient, from top to bottom    
float heightRatio = pow(In.eyeDir.w / 992.0, g_skyBottomColor.w);    
color  = lerp(g_skyBottomColor.rgb, g_skyTopColor.rgb, heightRatio);
Values for g_skyBottomColor and g_skyTopColor are set in EnvColors_xxx.cfg

Now in the above pixel shader code for each pixel the virtual camera eye is directed on, the color value will be calculated with a linear interpolation (x*(1-s) + y*s) between top- and bottom-color. This is done by the HLSL lerp() function.
You can now implement a different algorithm for example with smoothstep() functions which calculate a smoother intepolation based on the Hermite Interpolation instead of linear interpolation but this can cause lower framerates if alot of smoothstep's are used.
Thank you veyr much, though its all a bit ove rmy head. I'll wait for someone smart like you to do a mod :-)
Coldcall is offline   Reply With Quote
Old 10-29-10, 11:04 PM   #22
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

Quote:
Originally Posted by Seeadler View Post
it's all in the sky shaders (\Silent Hunter 5\data\Shaders\Sky)
and EnvColors_xxx.cfg's (\Silent Hunter 5\data\Env\)

Code:
// 1. base gradient, from top to bottom    
float heightRatio = pow(In.eyeDir.w / 992.0, g_skyBottomColor.w);    
color  = lerp(g_skyBottomColor.rgb, g_skyTopColor.rgb, heightRatio);
Values for g_skyBottomColor and g_skyTopColor are set in EnvColors_xxx.cfg

Now in the above pixel shader code for each pixel the virtual camera eye is directed on, the color value will be calculated with a linear interpolation (x*(1-s) + y*s) between top- and bottom-color. This is done by the HLSL lerp() function.
You can now implement a different algorithm for example with smoothstep() functions which calculate a smoother intepolation based on the Hermite Interpolation instead of linear interpolation but this can cause lower framerates if alot of smoothstep's are used.
Using a gradient causes the sky banding . I just deleted the bit in green and it seems much better .

Last edited by THE_MASK; 10-30-10 at 12:02 AM.
THE_MASK is offline   Reply With Quote
Old 10-30-10, 07:35 AM   #23
panosrxo
Planesman
 
Join Date: Jan 2010
Location: Greece
Posts: 188
Downloads: 115
Uploads: 0
Default

Quote:
Originally Posted by sober View Post
Using a gradient causes the sky banding . I just deleted the bit in green and it seems much better .
pow is a power function, if you are to remove the function you should also remove this part: , g_skyBottomColor.w

power function is pow(x,y)=x^y
panosrxo is offline   Reply With Quote
Old 10-30-10, 10:28 AM   #24
Sailor Steve
Eternal Patrol
 
Sailor Steve's Avatar
 
Join Date: Nov 2002
Location: High in the mountains of Utah
Posts: 50,369
Downloads: 745
Uploads: 249


Default

I see it in SH4, and not in SH3. I have no idea about anything involved with this, I'm just sayin'.
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Reply With Quote
Old 10-30-10, 11:47 AM   #25
divittor
Bosun
 
Join Date: Oct 2010
Location: UK
Posts: 65
Downloads: 56
Uploads: 0
Default

I get the banding in sh5 didn't notice it so much in 3 and 4.

I have an i7 quad core so i guess it's not something cpu related.

My cards are 2 x NVIDIA GTX 470 in SLI althought i read somewhere SLI
does not work in game ?

4gb RAM Windows 7 64 bit

Screen is a Samsung Syncmaster P2450

My res in game is 1900x1080 i think (not got it running at moment )
and have maxed most graphics options in game.

I personally think the latest nvidia cards accenctuate the banding maybe?

TDW uses a Nvidia GTX480 do you get the banding TDW?

Which enviroment MOD available at the moment best deals with this issue?

I don't really want to mess with stock files and I'm guessing i could reduce the banding by tweaking my personal settings.

Any ideas to reduce or eliminate it would be most welcome.
__________________
Don't dive, ram .
divittor is offline   Reply With Quote
Old 10-31-10, 08:12 PM   #26
the_tyrant
Admiral
 
Join Date: Jun 2010
Location: Canada
Posts: 2,272
Downloads: 58
Uploads: 0
Default

the best explanation is that it is the video card
just like how games designed for nvidia cards are horrible on ati cards
Ubisoft optimizes for ATI, so that is probably why
the_tyrant is offline   Reply With Quote
Old 10-31-10, 11:53 PM   #27
rik007
Grey Wolf
 
Join Date: Jan 2002
Location: Holland
Posts: 785
Downloads: 122
Uploads: 0
Default

Quote:
Originally Posted by sober View Post
Using a gradient causes the sky banding . I just deleted the bit in green and it seems much better .
You can adapt the shader but it will still be called 992 times by SH-5 each time a screen is drawn. You would have liked that the shader is called 1984 (2 * 992) or more but therefore you need to change the code unfortunately.
rik007 is offline   Reply With Quote
Old 11-01-10, 12:46 AM   #28
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

I can get rid of the banding completely by deleting the gradiant but it deletes the sun as well .
THE_MASK is offline   Reply With Quote
Old 11-01-10, 08:02 AM   #29
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by sober View Post
I can get rid of the banding completely by deleting the gradiant but it deletes the sun as well .
based on the posted shader function above, set the interpolate value in the lerp() function to a constant value. That ought to repeal the individual gradients but does not affect the pixel color for the sun.

change from:
Code:
 // 1. base gradient, from top to bottom    
 float heightRatio = pow(In.eyeDir.w / 992.0, g_skyBottomColor.w);    
 color = lerp(g_skyBottomColor.rgb, g_skyTopColor.rgb, heightRatio);
to:

Code:
// 1. base gradient, from top to bottom    
// float heightRatio = pow(In.eyeDir.w / 992.0, g_skyBottomColor.w);    
color = lerp(g_skyBottomColor.rgb, g_skyTopColor.rgb, 1 /*heightRatio*/);
I can not say if it work and/or how it will look in the game, I have SH5 not installed on my PC.
__________________
--
Vapor-ware is always easier to sell because there's no limit what it can do!
Seeadler is offline   Reply With Quote
Old 11-01-10, 02:10 PM   #30
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

How it looks in game . The pic was auto enhanced so the banding is easier seen . Doesnt look quite so bad ingame . Thanks seeadler .


Last edited by THE_MASK; 11-01-10 at 02:55 PM.
THE_MASK 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 06:18 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.