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 03-21-10, 06:43 PM   #1
wamphyri
Lieutenant
 
wamphyri's Avatar
 
Join Date: May 2004
Location: Lethbridge, Alberta
Posts: 260
Downloads: 40
Uploads: 0
Default [TEC]How to make the sky look slightly better

tired of the massive gradient lines in the sky? I sure was! So I looked into a way to fix it.

1. Travel to the texture directory : silent hunter 5/data/textures/tnormal/tex

2. Look for sky_pac.tga and sky_pac_hdr.dds

3. delete that ugly mofo sky_pac_hdr.dds

4. make a copy of sky_pac.tga and rename it sky_pac_hdr.tga making sure you keep it in the same directory as sky_pac.tga
(not sure if this is necessary but it's what I did)

5. That's it .. your done! There's still gradient in the sky but it's better looking than it was.


[Technical part]

Why is the sky the way it is? Well the sky_pac_hdr.dds is the exact same file as sky_pac.tga except it's being compressed. Given how small each type of sky is in each file the compression greatly exaggerates the gradient making it not only more noticeable but ugly as heck. The game has no problem loading up .tga's instead so we're just telling it to use the skies from sh3/4
wamphyri is offline   Reply With Quote
Old 03-21-10, 06:53 PM   #2
Scoochy
Sparky
 
Join Date: May 2005
Location: San diego Ca.
Posts: 150
Downloads: 31
Uploads: 0
Default

Could ya post a before and after?
__________________
Scoochy is offline   Reply With Quote
Old 03-21-10, 07:02 PM   #3
Barso
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

No need, do this.
It looks far better.
  Reply With Quote
Old 03-21-10, 08:32 PM   #4
rsvette12
Lieutenant
 
Join Date: Mar 2007
Posts: 263
Downloads: 132
Uploads: 0
Default

Worse for me but thanks anyway.

Rich
rsvette12 is offline   Reply With Quote
Old 03-21-10, 08:57 PM   #5
reboot
Mate
 
Join Date: Jul 2005
Location: Charlotte, NC USA
Posts: 59
Downloads: 64
Uploads: 0
Default

Looks good. Got tired of seeing those circles in the sky.
reboot is offline   Reply With Quote
Old 03-21-10, 10:24 PM   #6
wamphyri
Lieutenant
 
wamphyri's Avatar
 
Join Date: May 2004
Location: Lethbridge, Alberta
Posts: 260
Downloads: 40
Uploads: 0
Default

Quote:
Originally Posted by rsvette12 View Post
Worse for me but thanks anyway.

Rich
Don't see why it would be worse since the files are the same except one is compressed. We're just telling it to use the non compressed one. Tho some skies there's not much change such as late night, side by side I can notice a difference but neither looks good.
wamphyri is offline   Reply With Quote
Old 03-22-10, 03:17 PM   #7
xx4L0Mxx
Bilge Rat
 
Join Date: Jul 2007
Posts: 1
Downloads: 24
Uploads: 0
Default

I'm pretty sure the sky_pac and sky_pac_hdr textures do nothing.

Why do is say this?

Because my Sky-Pac and Sky_pac_hdr look like this :



...and the sky in game looks no different...lol.
It's driving me mad. I get horrendous banding at night, making the game almost unplayable, if i could just change that, i would be happy, any ideas?

I even retouched up the original files in photoshop to try and get rid of the poor pixellation but to no avail.

Hello, by the way. First post in 3 years..lol. I HATE the sky banding that much.
xx4L0Mxx is offline   Reply With Quote
Old 03-22-10, 07:30 PM   #8
W_clear
Ace of the Deep
 
Join Date: Apr 2005
Posts: 1,142
Downloads: 113
Uploads: 0
Default

This file an I furnishings. You want to change the sky, please go to:SH5\Data\Env
W_clear is offline   Reply With Quote
Old 03-22-10, 08:00 PM   #9
Chromius
Sailor man
 
Join Date: Aug 2009
Location: Manchester, NH
Posts: 43
Downloads: 151
Uploads: 0
Default

W Clear, what is that 1.1 gb worth of files? Can you show a picture, for those of us with Limited bandwidth?

If its a mod you have done is there a link to the post?

edit nvm, I take it that is this http://www.subsim.com/radioroom/showthread.php?t=165566

hmm I have to wait 21 days to download that.
Chromius is offline   Reply With Quote
Old 03-22-10, 11:02 PM   #10
W_clear
Ace of the Deep
 
Join Date: Apr 2005
Posts: 1,142
Downloads: 113
Uploads: 0
Default

Quote:
Originally Posted by Chromius View Post
W Clear, what is that 1.1 gb worth of files? Can you show a picture, for those of us with Limited bandwidth?

If its a mod you have done is there a link to the post?

edit nvm, I take it that is this http://www.subsim.com/radioroom/showthread.php?t=165566

hmm I have to wait 21 days to download that.
Atlantic Pacific submarine warfare MOD for SH4

大西洋太平洋潜艇战MOD的完成首先要感谢Richi的CA-24F、 Ducimus的TMO、OakGroove的UBM Type IX D2 High Res Skins 我的中国朋友kys20000和丹麦朋友kriller2.


大西洋太平洋潜艇战MOD以CA-24F和TMO为基础,把SH3里面的船都移动到这个MOD里面,并且纠正了所有船的涟漪和水花,调整了所 有船只的折射。最最重要的是我修正了U_boat addon里面德国潜艇的水花错误,在U_boat addon里面的德国潜艇都没有水花的。除了修正这个错误以外,我还重新制作了所有美国和德国潜艇的溅起的 水花, more white more long wake和增加了水花声效。

大西洋太平洋潜艇战MOD使用最新的环境MOD、最新的传感器、最新的强的AI,现在是的驱逐舰变得很聪明 ,反应灵敏,掉头及时,规避鱼雷能力极强,发现潜艇能力强,炮击潜望镜更是厉害。

我还制作了美国潜艇的潜望镜伸出水面的时候有水花和更白的涟漪,德国潜艇目前还没有,但是我会 继续努力 完成它。

大西洋太平洋潜艇战MOD使用我的黑烟MOD,没有完成的是开炮的烟。

大西洋太平洋潜艇战MOD的德国战役还是使用CA-24F的。我没有时间再制作了,以后等有了时间我会再制作新的德国战役。

原来SH3里面的人物(基地上的)乐队、士兵、护士、修理工...........都移动到这 个MOD里面 。

但愿大家能喜欢这个MOD

此MOD可操作的U艇型号为:
- Type IIB
- Type VIIC
- Type IXB
- Type IXC
还增加了很多型号的战舰
-- Revenge Class BB
-- Repulse Class Battle Cruisers
-- Class illustrious CV
-- A & B Class DD
-- C & D Class DD
-- E & F Class DD
-- Benham Class DD
-- Bristol Class DD
-- G & M Class DD
-- Class L DD
-- Class M DD
-- Class N DD
-- Or Class DD
-- P Class DD
-- Porter Class DD
-- Sims Class DD
-- Sumner Class DD
-- Town Class DD
-- Captain I / II Class DD
-- Argo Class USCG Cutter
-- Temptress Class PG
-- 497 Class Sub Chasers
-- Class Bathurst
-- Small Minelayer
-- Old Corvette
-- Ammunition Pyro Freighter
-- Illustrious Carrier
-- C & D Class Destroyer
-- J & K Class Destroyer

--从大西洋和太平洋舰队有:
--小舰队1: Kiel-Brest
-- 2小舰队: Wilhelmshaven-Lorient
-- 7小舰队: Kiel-StTrondheim-Nazaire
-- 10小舰队: Lorient-Penang-Jakarta
-- 11小舰队: Bergen
--小舰队23: Bordeaux
--小舰队12: 腊肠-LaSpezia-Toulon
--小舰队33: 康士坦茨湖-Flensburg
W_clear is offline   Reply With Quote
Old 03-23-10, 05:02 AM   #11
rededge
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Sky looks better for me - no more banding!

Thanks for the tip.
  Reply With Quote
Old 03-23-10, 07:52 AM   #12
Navarre
Helmsman
 
Join Date: Jul 2003
Location: Europe
Posts: 101
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by xx4L0Mxx View Post
I'm pretty sure the sky_pac and sky_pac_hdr textures do nothing.
That's correct, you can delete all sky textures incl. the hdr textures and get the same sky ingame because in SH5 the sky shader don't use textures anymore, see this shader code, no texture samplers in it

The sky color is full procedural rendered also the gradient lines. The color values comes from the Environment cfg files.

Quote:
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_invSunSize : register(c6);// 1.0 / (1 - g_sunDisk.w)

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;
};

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
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);
}
Navarre is offline   Reply With Quote
Old 03-23-10, 10:03 AM   #13
wamphyri
Lieutenant
 
wamphyri's Avatar
 
Join Date: May 2004
Location: Lethbridge, Alberta
Posts: 260
Downloads: 40
Uploads: 0
Default

Interesting. Since sh3 did things differently (they used a .dat controller) I thought this was how they did it. I hope someone has the patience to try out some different colour combinations in the env files cause I know I sure don't.

I'm getting a little annoyed with all the files and settings that are left over from sh3/4.
wamphyri is offline   Reply With Quote
Old 03-23-10, 07:31 PM   #14
UBoat_Paddy
Nub
 
Join Date: Mar 2010
Location: Ireland
Posts: 4
Downloads: 15
Uploads: 0
Default

A word of caution if you are going to change the .tga filename: Turn off online syncing or else your savegames might get corrupted. http://www.subsim.com/radioroom/show...s+won%27t+load

Happened to me just after sinking a capital ship, 2 destroyers and evading the other 3 destroyers in Op Weserubung.
UBoat_Paddy is offline   Reply With Quote
Old 03-24-10, 04:26 AM   #15
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

Quote:
Originally Posted by xx4L0Mxx View Post
I'm pretty sure the sky_pac and sky_pac_hdr textures do nothing.
So this was a 'placebo mod', but now the magic spell is broken . Welcome aboard by the way!
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 07:37 PM.


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