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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 08-23-07, 07:09 AM   #1
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default [TEC] God's Lightswitch - FIXED!!!

In case you didn't see the thread I posted on this in the main SH3 forum, by "god's lightswitch" I mean the way the sky flicks bright/dark/bright/dark in the periscope view when water washes over the scope?

Well I fixed it! lil ol me fixed it! W00t!!

So, in case anyone else would also like this fixed...

The "lightswitch" problem is caused by the sky images in the SkyColours_XXX.dat files (Sky_atl1.tga, etc). I opened them in a freebie image editor and noticed that the day-night-cycle image seems to have two... er, channels? Layers? I don't really know image lingo but one "channel" has the actual colours (the night-time colour is blue-black in my version, which is the GWX version) and the other channel (a transparency channel? an "alpha" channel - whatever that is? I dunno) is grey for the night-time.

So, I fixed the problem by re-saving the images as single-channel images (just the colours) and voila - no more lightswitch! WOOHOO!

I can't be the ONLY person who found this anoying as hell

When you apply this "fix" the effect is to have the lights "on" all the time. This doesn't brighten anything except the sky, and even that is only bright because the night-time colours in the aforementioned images are quite bright (at least in the one's I have they are - mine are GWX, haven't looked at stock yet). You can fix this by just darkening the night-time colours (all the way to pitch-black if you want) and you're done.

I know how fussy everyone is about their colours so I thought I'd post the info rather than a mod (especially what with all the potential mod interdependency issues).

Any questions, put 'em here and I'll try.

OLC
onelifecrisis is offline   Reply With Quote
Old 08-23-07, 07:44 AM   #2
JCWolf
Admiral
 
Join Date: Jan 2006
Location: Spain , Crossing Gibraltar!
Posts: 2,292
Downloads: 202
Uploads: 1
Default

you posting it for download,
I would like to give it a try and check that!
__________________


JCWolf Mediafire SHIII Page

User name : JCWolf
Password : stefre@jcm
JCWolf is offline   Reply With Quote
Old 08-23-07, 07:49 AM   #3
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default

I've submitted a JSGME-ready mod (with suitably darkened night colours) to FilePlanet. I'll post a link when they approve the file.
onelifecrisis is offline   Reply With Quote
Old 08-23-07, 08:14 AM   #4
TarJak
Fleet Admiral
 
TarJak's Avatar
 
Join Date: Jul 2006
Location: Sydney, Australia
Posts: 17,052
Downloads: 150
Uploads: 8


Default

Have you tested how it looks when night changes to day? The alpha channel is used for transparency or reflectivity depending on the surface the texture is painted on. I think it would be worth checking whether this has adverse effects on lgithing conditions when not in either day or night and also on reflections on the water etc.

There was probably a good reason why there was an alpha channel on the sky, consodering they didn;t have one on things like ships (they are there in SH4), aircraft, buildings etc.

I'm not saying you might not have fixed the problem but I'd like to see some wider testing done before I'd go jumping into this edit wholeheartedly.
TarJak is offline   Reply With Quote
Old 08-23-07, 08:22 AM   #5
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default

@Tarjak

You're right, there probably was a good reason why they had the extra channel, and I've not found out what it was yet, and I'd very much like to know if this "fix" does break anything, but I can say it doesn't break any of the things you listed because I already tested them all.

The day/night cycle works sweet as ever. I tested in different weather conditions at different times of year, throughout the 24 hour cycle. Water reflections are also unaffected.

I'd love to have some help with the testing though - the more eyes the better. If anyone can host files, say so and I'll email the mod instead of waiting for fileplanet.
onelifecrisis is offline   Reply With Quote
Old 08-23-07, 12:05 PM   #6
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default

Someone help please - I've found out that the extra channel is definitely an alpha channel. To get the early/mid/late evening sky colours right I need to merge this channel with the RGB channels and output a standard RGB image as a result... but I don't know how to do this! I've installed GIMP, but it's bewildering. I'm sure this can be done with a few clicks of the mouse if you know how.

Does someone here know how?

Thanks
OLC
onelifecrisis is offline   Reply With Quote
Old 08-23-07, 12:36 PM   #7
danlisa
Navy Seal
 
danlisa's Avatar
 
Join Date: Oct 2005
Location: Cornwall, UK
Posts: 5,499
Downloads: 45
Uploads: 1
Default

Quote:
Originally Posted by onelifecrisis
Someone help please - I've found out that the extra channel is definitely an alpha channel. To get the early/mid/late evening sky colours right I need to merge this channel with the RGB channels and output a standard RGB image as a result... but I don't know how to do this!
You can't merge an alpha channel into a RGB image. Alpha channels are a transparency layer and only (in this instance) show when the conditions are right i.e when the day is in the process of changing into night. That is when the alpha comes into play.

The only thing you might be able to do is edit/change the alpha channel to something more to your liking.
__________________
danlisa is offline   Reply With Quote
Old 08-23-07, 12:43 PM   #8
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default

Perhaps I didn't explain myself very well.

I want to do something like this to every RGBA pixel:

Red:=Red*Alpha/255
Green:=Green*Alpha/255
Blue:=Blue*Alpha/255
Alpha:=255

Is that a better description?

This should save me from having tio manually edit the colours until they look right.
onelifecrisis is offline   Reply With Quote
Old 08-23-07, 01:42 PM   #9
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default

Nevermind - I did it the hard way.

Not sure why you think Alpha channel is used at sunrise/set - the alpha channel on the skies of all three oceans is pure white all morning/day/evening and only changes after the sun has vanished over the horizon (and is back to being white again before the sun appears on the horizon the next day). Whatever it affects, it affects it only at night.
onelifecrisis is offline   Reply With Quote
Old 08-23-07, 02:51 PM   #10
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default

I finally found out what the transparency in the sky is for - it's so you can see the stars! :rotfl:

By playing with the sky colours I've managed to get the mod so that it is indistinguishable from normal GWX, except for this one thing - and I don't think it can be worked around

Well for me personally god's lightswitch is more annoying than no stars, so I'm happy, but methinks the majority of people will want their evenings starlit :hmm:

Last edited by onelifecrisis; 08-23-07 at 04:12 PM.
onelifecrisis is offline   Reply With Quote
Old 08-23-07, 04:03 PM   #11
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default

Well seeing as this is the culmination of weeks of trial and error, here are the test shots anyway. BTW all though they aren't in these screenies (had to leave the camera in the default position to be sure of getting the same shot twice) the sun and moon both work fine... only the stars are missing.

One side of each screen has the lightswitch fix installed, the other doesn't.




onelifecrisis is offline   Reply With Quote
Old 08-24-07, 06:01 AM   #12
JCWolf
Admiral
 
Join Date: Jan 2006
Location: Spain , Crossing Gibraltar!
Posts: 2,292
Downloads: 202
Uploads: 1
Default

Yep thats what I missed 2, the stars also, with the last
16km mod from Reece there are some strange graphic failier
on the ships shadows on the water, it looks like rect lines
drawn on the sea water were is suposed to be the shadow,
however it hapends from time to time and not regulary!

forgot to take the Screenes sorry but I will next time....
I do not have the slightest idea on how to correct this,
maybe some one can!... REECE
__________________


JCWolf Mediafire SHIII Page

User name : JCWolf
Password : stefre@jcm
JCWolf 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 04:14 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.