![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 |
Maverick Modder
![]() Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
|
![]()
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 |
![]() |
![]() |
![]() |
#2 |
Admiral
![]() Join Date: Jan 2006
Location: Spain , Crossing Gibraltar!
Posts: 2,292
Downloads: 202
Uploads: 1
|
![]()
you posting it for download,
I would like to give it a try and check that! ![]() ![]() |
![]() |
![]() |
![]() |
#3 |
Maverick Modder
![]() Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
|
![]()
I've submitted a JSGME-ready mod (with suitably darkened night colours) to FilePlanet. I'll post a link when they approve the file.
![]() |
![]() |
![]() |
![]() |
#4 |
Fleet Admiral
![]() |
![]()
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. |
![]() |
![]() |
![]() |
#5 |
Maverick Modder
![]() Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
|
![]()
@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. ![]() |
![]() |
![]() |
![]() |
#6 |
Maverick Modder
![]() Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
|
![]()
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 |
![]() |
![]() |
![]() |
#7 | |
Navy Seal
![]() Join Date: Oct 2005
Location: Cornwall, UK
Posts: 5,499
Downloads: 45
Uploads: 1
|
![]() Quote:
The only thing you might be able to do is edit/change the alpha channel to something more to your liking.
__________________
![]() |
|
![]() |
![]() |
![]() |
#8 |
Maverick Modder
![]() Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
|
![]()
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. |
![]() |
![]() |
![]() |
#9 |
Maverick Modder
![]() Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
|
![]()
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. |
![]() |
![]() |
![]() |
#10 |
Maverick Modder
![]() Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
|
![]()
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. |
![]() |
![]() |
![]() |
#11 |
Maverick Modder
![]() Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
|
![]()
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. ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
![]() |
#12 |
Admiral
![]() Join Date: Jan 2006
Location: Spain , Crossing Gibraltar!
Posts: 2,292
Downloads: 202
Uploads: 1
|
![]()
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!... ![]() ![]() ![]() |
![]() |
![]() |
![]() |
|
|