Log in

View Full Version : Sky comparison. SH2 vs SH5. 2001 vs 2010.


Baleur
03-23-10, 11:27 PM
Silent Hunter 2 (beta build)
Requirements: Pentium II 266Mhz
Platform: Windows 95/98/98SE/Millennium Edition CD-ROM, 64MB RAM

http://www.subsim.com/ssr/sh2/prev12.jpg



Silent Hunter 5
Recommended system configuration:

CPU: Intel® Core2Duo® E6850 or AMD® Athlon™ 64 X2 5600+ or higher
Operating System: Windows® XP (with Service Pack 3) or Windows Vista® (with Service Pack 2) or Windows® 7
RAM: 2 GB (XP / Vista / Win7)
DVD-ROM: DVD-ROM speed 4x, dual-layer drive
Recommended Drive Space: 15 GB
Video Card: 512 MB DirectX® 9.0c-compliant video card (ATI® Radeon HD3000 series / GeForce® 9 Series or better)
Sound Card: DirectX® 9.0c-compliant sound card
DirectX Version: DirectX 9.0c (included on disc)
(wall-of-text)
Internet connection required

http://img9.imageshack.us/img9/8249/alol.jpg

It makes you think, doesnt it? Its alot like the Unreal Engine 3 fiasko, where they focus so incredibly on every aspect of the graphics, but totally forgetting about the one thing that makes or breakes immersion, anti-aliasing.
Except in the Silent Hunter world, it is the sky (since you'll see it alot).
"I'm the commander of a submarine, i'm stalking the... OH WAIT, look at those blocky sky effects. I'm just wasting my time in a game."

:yeah:

Onkel Neal
03-24-10, 12:55 AM
Actually, that top pic is SH2.

Coldcall
03-24-10, 03:46 AM
Sorry i cant understand what the thread is about.

SH5 has anti-aliasing. I play on just x2 as its enough to get rid of most blockiness on the horizon.

Sonarman
03-24-10, 03:50 AM
Interesting the OP chose a straight and level shot for thier image as any degree of roll would have shown the horribly jagged horizon of SH2.

flakmonkey
03-24-10, 04:06 AM
Well youre not wrong that sh5 deserves a kicking in some regards but the skys, really??

Granted it could use a few more stars but certainly the daytime skys with those beautiful 3d clouds are the best skys ive seen since crysis.


Re: system specs, just as an interesting note i recently tried to install sh2 (just for nostalgia) and was told by the installer that i didnt have enough ram and should upgrade to at least 16Mb!?! i have 3Gb!

Nisgeis
03-24-10, 04:11 AM
Re: system specs, just as an interesting note i recently tried to install sh2 (just for nostalgia) and was told by the installer that i didnt have enough ram and should upgrade to at least 16Mb!?! i have 3Gb!

I once had a game installer tell me "Your CD-ROM is operating faster than is possible!" hehe, welcome to the future.

Commie
03-24-10, 05:45 AM
The OP is talking about the horrible visible sky gradient in SH5 and comparing it to the much smoother SH2 one(gets SH's mixed up). I agree that it looks pretty dated, wouldn't be so bad if the rest of the game looked more archaic, but like this it really stands out, just as the low res pixellated backgrounds in Half Life when going outside. Weird.

cherbert
03-24-10, 05:57 AM
I agree with OP. This is a big issue in SH5. The sky is horrible when there are no clouds to hide the terrible colour banding. Other games can do it better so there should be no excuses.

I would hope its just a simple case of modding a better quality texture for the Skybox?

Nordmann
03-24-10, 06:57 AM
If you look closely, the SH2 sky has the same problem, and if memory serves, both 3 and 4 also have the noticeable banding. Perhaps it is not something easily fixed, if at all.

Dowly
03-24-10, 07:04 AM
I think the problem is that SH uses gradiant color for sky, instead of some games using textures. The game can't handle all the colors in the "line" going from blue to light blue and you get the banding. Same is in OFP/ArmA/ArmA 2 for example.

flakmonkey
03-24-10, 07:09 AM
I always thought the color banding issue was a problem with lcd screens, i cant say i ever saw this sort of thing back in the days of crt monitors.

Coldcall
03-24-10, 07:21 AM
I dont think everyone is having the same experience re Banding. And that has nothign to do with AA, so i still dopnt understand what the OP is saying. The banding is some sort of hardware issues, settings, graphics error, i dont know what...

I first started playing SH5 on a computer with a GT 8600, and i had no banding whatsoever (which demsonrates its not what SH5 is supposed to look like). I'm currently on another computer which is one of those HP Pavillion boxes (Samsung 23 inch widescreen synchmaster) with a nice lil processor i5 770, but a GT 220 for video, which while a little more powerful than the GT 8600 has now made banding a real problem. I've gone through 3 different driver sets and nothing reduces the banding.

The only other difference to when i was playing before with zero noticable banding was that i am playing on widescreen resolutions 1680 x 1050, or sometimes dipping down to approx 1300 x 900 (cant remember the exact value for that setting).

So why is it some computers are having this major banding issue and others not? It would be interesting to know what other types of rigs are having the banding issues.

PS: One other thing i noticed is that its really bad in foggy weather, the foggier the worse it gets.

Bilge_Rat
03-24-10, 07:53 AM
Is it a Nvidia issue? I am playing with a ATI 4890 on a 27" LCD monitor at 1920x1200 and I can't say I have noticed anything unusual at night.

Coldcall
03-24-10, 08:01 AM
Is it a Nvidia issue? I am playing with a ATI 4890 on a 27" LCD monitor at 1920x1200 and I can't say I have noticed anything unusual at night.

I dont think its nvidia as my GT 8600 had no banding but the GT 220 does. Maybe its their newer cards like the 200 series. I wouldnt be surprised as im shocked at how little improvement there is on the GT 220 compared to the old 2007 GT 8600. Its only slightly faster.

But leaving aside the ****ty gpu im currently stuck with unless i upgrade my psu, i dont think its just an nvidia thing.

kriller2
03-24-10, 08:15 AM
Interesting..
The reason for the colour banding is because of the sky in SH4 (maybe allso SH5 im sorry I haven't bought this time waiting for patches...) is made out of a 256x256 or 512x512 pixels texture. Where the colour-information of how the sky should look at different times of day is shown. To get rid of it you need to make a better texture (takes alot of time and experiement..) or make a higher resolution of the texture.

AVGWarhawk
03-24-10, 08:24 AM
kriller2 speaks truth! :yep:

Seeadler
03-24-10, 08:47 AM
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.

Coldcall
03-24-10, 11:04 AM
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?

java`s revenge
03-24-10, 11:20 AM
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.

Seeadler
03-24-10, 11:31 AM
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\)


// 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.

Coldcall
03-24-10, 11:37 AM
it's all in the sky shaders (\Silent Hunter 5\data\Shaders\Sky)
and EnvColors_xxx.cfg's (\Silent Hunter 5\data\Env\)


// 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 :-)

THE_MASK
10-29-10, 11:04 PM
it's all in the sky shaders (\Silent Hunter 5\data\Shaders\Sky)
and EnvColors_xxx.cfg's (\Silent Hunter 5\data\Env\)


// 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 .

panosrxo
10-30-10, 07:35 AM
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

Sailor Steve
10-30-10, 10:28 AM
I see it in SH4, and not in SH3. I have no idea about anything involved with this, I'm just sayin'.

divittor
10-30-10, 11:47 AM
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.

the_tyrant
10-31-10, 08:12 PM
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

rik007
10-31-10, 11:53 PM
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. :down:

THE_MASK
11-01-10, 12:46 AM
I can get rid of the banding completely by deleting the gradiant but it deletes the sun as well .

Seeadler
11-01-10, 08:02 AM
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:

// 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:


// 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.

THE_MASK
11-01-10, 02:10 PM
How it looks in game . The pic was auto enhanced so the banding is easier seen . Doesnt look quite so bad ingame . Thanks seeadler .
http://img708.imageshack.us/img708/9718/gradl.jpg (http://img708.imageshack.us/i/gradl.jpg/)
http://img294.imageshack.us/img294/4701/gradd.jpg (http://img294.imageshack.us/i/gradd.jpg/)

Seeadler
11-01-10, 10:04 PM
If i remember right, there are more interpolations for gradients in the sky pixel shader, this was just the base gradient in a chain of 3 or more lerp() functions in that shader file. There must be in addition one for horizon haze gradients and one for around the sun gradients like in other games and perhaps some more...

I'm here at a B&B with only a notebook and no access to the SH5 files, so I can't verify this.:hmmm:

THE_MASK
11-01-10, 10:16 PM
If i remember right, there are more interpolations for gradients in the sky pixel shader, this was just the base gradient in a chain of 3 or more lerp() functions in that shader file. There must be in addition one for horizon haze gradients and one for around the sun gradients like in other games and perhaps some more...

I'm here at a B&B with only a notebook and no access to the SH5 files, so I can't verify this.:hmmm:

float3 g_sunDir : register(c0);
float3 g_orthogonalSunDir : register(c1);// at a 90 deg angle from sunDir
float3 g_fogColor : register(c2);
float2 g_fogParams : register(c3);
float g_sunDiskVisibility : register(c4);
float g_clipHeightOffset : register(c5);
float g_sunSize : register(c6);
float4 g_skyTopColor : register(c7);// with global sky color multiplier in "w"
float4 g_skyBottomColor : register(c8);// with height in "w"
float3 g_skyAroundSunColor : register(c9);
float3 g_skyAroundSunColor2 : register(c10);
float3 g_skyOppositeSunColor : register(c11);
float3 g_skyHazeColor : register(c12);// color
float3 g_skyHazeHeight : register(c13);// .z is the real height, clamped to max 180
float4 g_sunDisk : register(c14);// color & size
struct PS_IN
{
float4 eyeDir : TEXCOORD0;// eyeDir.w hold Y pos
float3 normal : TEXCOORD1;
};
float fastsin(float x)
{
float3 xx;
float3 coefs = float3(1, -0.1666666, 0.0083333);
float x2 = x*x;
xx.x = x;
xx.y = xx.x * x2;
xx.z = xx.y * x2;
return dot(xx, coefs);
}
float4 main( PS_IN In ) : COLOR
{
float3 color;
clip(In.eyeDir.w + g_clipHeightOffset);

float theta = dot(In.eyeDir.xyz, g_sunDir) / length(In.eyeDir.xyz);
float thetaSquared = theta * theta;

// 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);
// 2. around sun color 1 - haze a larger radius
float aroundSunMask = pow(saturate(theta), 7);
color = lerp(color, g_skyAroundSunColor, aroundSunMask);
// 3. opposite sun color at 90 degrees
//float oppositeMask = saturate(dot(g_orthogonalSunDir, In.eyeDir.xyz));
//oppositeMask = pow(oppositeMask, 3);
//color = lerp(color, g_skyOppositeSunColor, oppositeMask);
// 4. opposite sun color at 180 degrees
//float oppositeMask = pow(-theta * 0.5 + 0.5, 3);
//color = lerp(color, g_skyOppositeSunColor, oppositeMask);
// 5. around sun color 2 - has a smaller radius
// use the vertex normal for cos(alpha) this time, because it deforms the lighting a little on the horizon
float thetaNormal = saturate(dot(In.normal, g_sunDir) / length(In.normal));
aroundSunMask = pow(thetaNormal, 80);
color = lerp(color, g_skyAroundSunColor2, aroundSunMask);

// 6. horizont haze
float hazeMask = smoothstep(1, 0, saturate(In.eyeDir.w * g_skyHazeHeight.x - g_skyHazeHeight.y));
color = lerp(color, g_skyHazeColor, hazeMask);
// 7. multiply by global sky multiplier (in g_skyTopColor.w)
color *= g_skyTopColor.w;
// 8. sun disk
// TODO - pass constants in register
if ( theta > 0.98 )
{
float dotNS = acos(theta);
float diskMask = saturate((dotNS - 0) * g_sunSize);
diskMask = saturate(0.5 - (fastsin(3.14159 *(diskMask - 0.5f)) + 1) * 0.5f);
//float diskMask = saturate((theta - g_sunDisk.w) * g_invSunSize);
float sunShadow = min(1, In.eyeDir.w / g_skyHazeHeight.z);
color = lerp(color, g_sunDisk.rgb, diskMask * g_sunDiskVisibility * sunShadow);
}
float coef = 1.0 - saturate(In.eyeDir.w * g_fogParams.x - g_fogParams.y);
color = lerp(color, g_fogColor, coef);

float shaftsMask = log(theta);
float alpha = 30 + shaftsMask;//lerp(shaftsMask, 0, coef);
return float4(color, alpha);
}