View Single Post
Old 09-19-08, 10:01 AM   #1091
onelifecrisis
Maverick Modder
 
Join Date: Aug 2007
Location: England
Posts: 3,895
Downloads: 65
Uploads: 3
Default

Nevermind. For my own satisfaction I just ran a quick test (on a single mission - no time for a campaign test at this moment) using a VIIB. Then I ran the same test again using an IXB. In both tests I was spotted at the exact same time/distance (1400m, but the night was not fully dark). This was a slight surprise cos I was expecting the IXB to be spotted slightly sooner... maybe luck was a factor there...

Anyway I wanted to point out that IRL, surfaced U-boats frequently came within 1000 yards of the ships they were attacking - without being spotted. I wouldn't go as far as to claim that night-time spotting in GWX+OLCE2 is "realistic" but I'd say it's not too far off.

Moving on, to answer your question...

There are two environmental light nodes which affect visual sensors. They are called sun light and ambient light. There's also a third environmental light source called sun reflect but it has no effect on sensors in SH3 (and anyway that one is zero at all times in OLCE2, for other reasons).

In scene.dat each of these light sources has an intensity (in the range 0..1) and in env_colors.dat each has an RGB colour (0..255,0..255,0..255) for each time of day (0..6, with 0 being noon and 6 being night... or it might be 5, I can't remember exactly).

Lets say that
Si = sun light intensity
Sr = sun light colour red channel
Sg = sun light colour green channel
Sb = sun light colour blue channel
Ai = ambient light intensity
Ar = ambient colour red channel
Ag = ambient colour green channel
Ab = ambient colour blue channel

As far as the visual sensors are concerned, the "colour" (brightness) of a ship or sub is

red = MIN(255, Ai.Ar+Si.Sr)
green = MIN(255, Ai.Ag+Si.Sg)
blue = MIN(255, Ai.Ab+Si.Sb)

This is assuming that sunlight multiplication (in envcolor.dat) is 1. Higher values of sunlight multiplication may or may not affect sensors - I never tested it because in OLCE2 the multiplication is always 1 except at noon, when the brightness of all objects is anyway already maxed out at 255,255,255.

An object is most visible when it's brightness is 255,255,255 and least visible when it is 0,0,0.

So if you want to change the night brightness levels, that's one way to do it.

Another way to alter spotting distances is to start messing around in sensors.cfg and sensors.dat, but the former proved too complex for me so my advice is to steer well clear of it (given that you asked for a "quick" fix) so as to avoid accidentally breaking things.

HTH
OLC
__________________
Freedom of speech - priceless. For everything else there's Mastercard.
onelifecrisis is offline   Reply With Quote