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

Reply
 
Thread Tools Display Modes
Old 03-14-08, 02:24 PM   #1
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default [TEC] How to adjust interior lights

The following is a repost of a post i made on the ubi forms awhile back:

----------------------------------------------------------------
Ok, heres a little gem for you gents before i make my made dash out of the door. As part of this release, i was going to mess with the interior lighting of the interiors. I opted not to because opinion about whats correct, or what people like is rather varied. So i left lighting alone.

Instead, ill tell you how to tweak it to your own personal taste.

Fire up S3D, and open up one of the interior dat files. I suggest backing this file up first before you do anythign to it. Personally, i just use the acutal mod as a backup (since deactiveating the mod restores the orginal), or just copy the dat straight to the desktop, and copy it back into the game directory later on in case i royaly screw up.

In this example, im opening up data/interior/NSS_Gato/NSS_Gato_CT.dat
This is for, as the name suggests, the conning tower.


Look where im navigating too. You can do this for daytime lights and nightime lights. if you press the button to the left of the little red arrow you'll get this popup box:


If you look at the previous screenshot, you'll see the default value for this is 235, for Red, green, and blue values, which is fairly bright. Im just going to make it darker. So lets save it, and fire up SH4. I use the bungo pete mission alot for testing since i can select any boat, and not have to start a new career game to do it. Plus the way i made the mission, your relatively unmolested at startup, so you have time to experiment and see what you did.

So, lets fire up the game, and run the bungo pete mission and go look in the conning tower.

While i kinda like the way the green lights stick out more, the lack of light bulbs sucks! EVerything went dark. How fun is that? Not very much in my opinion. Time to fix that.


Create yourself a little modlet to run in JSGME. The file your after is
Data\Shaders\InteriorIllumination\LightHalloPS.fx

Open this up in notepad, and you'll be looking at some bit of C code that will probably confuse the hell out of you if youve never done anything related before. Fear not. heres the bit, which probably wont format correct in the forum, but ill highlight the part you'll be changing.

Quote:
float3 Color : register(c0);

struct PS_IN
{
float2 Tex0 : TEXCOORD0;
};

float4 main( PS_IN In ) : COLOR
{

float dist = saturate(1-length(2*In.Tex0));

dist = pow(dist, 3.0);
dist *= 0.5;

return float4(Color * dist, 1);
}

dist *= 0.5 is what you'll be changing, but more specifically, the 0.5 in this variable. The higher you make this number, the greater the intensity of the light halo. So in this example, ill substitue 0.5 with 2.5

dist *= 2.5;


Still with me? Save the file, enable it in JSGME, and go fire up the bungo pete mission, and go check out your new lighting.



Well, now thats better isn't it? heck ya!

Now, some things to note here. Your adjustments made to lighting halos on the interior are univseral. Remember the control room which we did NOT darken? It now looks like this:


Jumpin' Jesus on a pogo stick im going blind! Basically what you do for darkness levels in one room, you must also apply to the other room as well. They dont neccessarily have to be the same color, but the darkness level should be dark enough in both areas to offset the increased light halo intensity. Also, the darker you make a room, the greater the light intensity that will be required in order for the lightbulbs to show "hey , yes were on, and theres light coming out of here".


Anyway, you could make this, any color you wanted.

A shade of blue:


Or a shade of yellow



You can have your CT one color, and the CR another if you like. Each area has a daytime and night time light setting. If you dont think the redlights at night are bright enough, you can change that. You dont like redlights and prefer bluelights at night? you can change it.

Gotta love that tool.

have fun, its friday, and i gotta get to work.

Last edited by Ducimus; 03-07-12 at 06:38 PM.
Ducimus is offline   Reply With Quote
Old 03-14-08, 02:35 PM   #2
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,549
Downloads: 26
Uploads: 3
Default

Now this what I like to see! Tutorials!

Nice work, Ducimus...
skwasjer is offline   Reply With Quote
Old 03-14-08, 02:39 PM   #3
Soundman
Commodore
 
Join Date: Jul 2006
Location: Orlando, Fl
Posts: 617
Downloads: 60
Uploads: 0
Default

Very Cool Duci.. You da man! Thanks
Soundman is offline   Reply With Quote
Old 03-14-08, 02:47 PM   #4
M. Sarsfield
Ace of the Deep
 
Join Date: Aug 2007
Location: Tulsa, OK
Posts: 1,016
Downloads: 0
Uploads: 0
Default

Very nice. Is it just as easy to change the colors of the interior walls or are we getting into the realm of skins?
__________________
MJS
USS Batfish Volunteer/Reenactor
www.ss310.com
www.ussbatfish.com



Communism killed over 100M people and all that I got was this lousy signature.*

*http://www.hawaii.edu/powerkills/COM.ART.HTM
M. Sarsfield is offline   Reply With Quote
Old 03-14-08, 04:54 PM   #5
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

Skins.
Ducimus is offline   Reply With Quote
Old 03-15-08, 04:29 PM   #6
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®
Posts: 2,492
Downloads: 122
Uploads: 1
Default


:hmm:
:rotfl:
__________________
Alex ®


Moses said: "Don't create yourself an idol"...
Anvart 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 12:10 AM.


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.