Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3   Go Down

Author Topic: Searchlight Beam and Illumination Color Mod  (Read 5665 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6051
Searchlight Beam and Illumination Color Mod
« on: April 14, 2021, 09:26:03 PM »

UPDATE: Mar 12, 2023 It was pointed out that I had overlooked to include the new glare.mat and glare.tga files. That's rectified in the updated archive.


This screenshot reflects the Aug 2, 2022 update. If it appears terribly dark, try viewing from a position well off to the side (this can result in a boost in brightness for some monitors, paradoxically enough.)

The island of Ie Shima (on the Okinawa map, long familiar to Il-2 '46 players) appears here in its entirety, which provides a useful sense of scale. The beams are 6km long. Their brightness now fades more quickly near the lamp, then fading more gradually toward the end. And at long view distances like this, where the far LOD will be in effect, the beam has a more realistic, thinner appearance. (The stock mesh had the beam fattening up too much for modern, higher resolution screens.)




UPDATE, Aug 2, 2022: The two changes:
- I've made the beam brightness fall off more quickly near the source, then more gradually toward the end.
- For the 6km beam ONLY, I've made the beam not get so 'fat' at longer LODs, for better realism.


UPDATE, Dec 3, 2021: The two changes:
- I've updated the mod by doubling the beam length from the stock 3km to 6km. You can easily go back to the stock dimensions if you wish.
- I've added a texture to the lamp housing face to give a better impression of the brilliance of the light emitted from within.


Get it here:

https://www.mediafire.com/file/tw39uwv9eubl3vy/Searchlight_beam_and_illumination_color.7z/file


From the updated readme file contained in the archive:


Searchlight color alteration, with selectable stock or doubled beam length, by WxTech

This will work with all game versions.


UPDATE: Aug 2, 2022. Altered the searchlight beam in two ways:

1) Made the beam fall off in brightness more rapidly near the lamp, then more gradually toward the end of the beam.

2) Altered the 6km mesh (ONLY!), so that the increase in beam width for successively more distant LODs is much smaller. For instance, for the nearest LOD the beam as it exits the lamp housing is 1m wide. At the farthest LOD the width previously had grown to a considerably fat 7m! Now that farthest LOD beam width is 3.5m. This makes for a far better appreciation of the thinness of the beam when seen from a long distance.

========================== end of update =============================


This mod alters the searchlight object in four ways:
1) The beam, ground and glare illumination color have been made more accurately bluish.
2) I've added a glow texture to the face of the lamp so as to give a better impression of the brilliance.
3) The toughness has been increased by 50%.
4) I've doubled the beam length to 6km, with the option to go back to the stock 3km long beam.

-----

I find the stock color to be too much of a cyan hue, instead of the real-world bluish white. For the searchlight object, the two files altered are the .tga for the beam and its .mat file, which concern only the beam itself. The texture color has been made blue, and the .mat file altered thus:

  tfBlendAdd 0  //1

This disables the addition of the beam texture luminance to that of the background against which it is seen. Such adding of brightness when tfBlendAdd is set to "1" makes for an artificial boost in brightness against brighter backgrounds where in reality there would actually be a loss of contrast. This makes for a more natural look.

-----

Beside these two alterations, it remains for you to open your game's technics.ini, find the object:

[SL_ManualBlue]

and edit at least three of the following lines listed below, they being "ColorR", "ColorG" and "ColorB". These control the color for the ground 'flare' texture representing the lit up ground immediately surrounding the searchlight via light spill, the color of the illumination upon ground and aerial objects, and the color of the glare you see when looking into the beam (upon it spotting you.)

Or you could copy/paste the entire block of text below (my 6 changes are noted)...

========================== start of object =============================

[SL_ManualBlue]
Description  A generic searchlight. Hands-driven, blue.
Icon         antiaircraft

// Models
MeshSummer   3do/Lights/SL_ManualBlue/hier.him
//MeshSummerDamage ....   FIXME: do it
//MeshWinter ....   FIXME: do it


// Panzer
PanzerType       Car
PanzerSubtype     1
PanzerBody      0.0015  //0.001  //WxTech change

// Weapon
MaxDistance      8000.0
HeadYawHalfRange      180.0
GunMinPitch            30.0
GunStdPitch            90.0
GunMaxPitch            90.0         // >=90 means 0-180
HeadMaxYawSpeed         6.0
GunMaxPitchSpeed        6.0
SearchMaxConeAngle     25.0
FoundMaxConeAngle       0.0
ColorR                  0.425  //0.75  //0.53  //WxTech change
ColorG                  0.425  //0.75  //0.84  //WxTech change
ColorB                  0.5  //1.0  //WxTech change
LandIntensity           1.5  //3.0  //ground illumination  //WxTech change
LandRadius             100.0  //70.0  //ground illumination  //WxTech change

========================== end of object =============================


I reduce the values of all colors so as to make for a subtler illumination of nearby objects. ColorB (Blue) remains at the highest intensity, here 0.5. With the stock value of Green being larger than for Red, this resulted in the cyan hue. If Red were larger than Green, the hue would tend to purplish or magenta. Leaving both equal ensures Blue is dominant, as it should be.

I wanted to tweak the lighting of ground objects in the lamp's vicinity, so as to reduce the intensity but also increase the distance over which the lighting operates. This makes for a less harsh change in illumination with distance. These are the parameters "LandIntensity" and "LandRadius". You don't need to do this, and indeed I may revert or otherwise change these again.

===========================================================================================

Based on a Forum suggestion, I've made a version of the beam that is doubled in length from the stock 3km to 6km. The width of the upper terminus has also been doubled so as to preserve proportion.

This 2X longer beam is in effect when you first install this mod.

If you want to go back to the stock beam length, open hier.him and find this:

[Ray_ON]
Mesh Ray_ON_6km
Parent Gun
Attaching 1 0 0   0 0 1   0 -1 0   0.812932 0 0

Change "6km" to "3km", so as to use the stock beam in Ray_ON_3km.msh instead of the longer beams's Ray_ON_6km.msh.

===========================================================================================

Note that I increased the PanzerBody value from 0.001 to 0.0015. To at least make the searchlight just a bit harder to destroy. At 0.001 it takes no more than 2 little MG bullets to kill it.

===========================================================================================

I include all files extracted from the SFS archive for this object (and I include the spreadsheet I worked from, in Open Office format). The meshes have all been converted to plain ASCII text. The files of immediate importance here are:

  Project.mat  (sets texture to use and its attributes)
  ray.tga  (my new beam texture, made more bluish and less cyan)
  ray_original.tga   (the original texture, should you wish to revert to stock)
  hier.him   (assembles the full object from its component meshes)
  Ray_ON_3km.msh  (originally named Ray_ON.msh; makes the stock beam 3D model, with various LODs)
  Ray_ON_6km.msh  (my new beam model, doubled in length and upper width)
  !_Readme.txt  (this file you're now reading)

The rest of the files are included if you should like to tinker with other elements. Otherwise, you can safely delete all files but the aforementioned seven.

If you already have a mod folder containing map objects, such as buildings, cars, etc., you could place this [../Lights] folder in that other mod folder's [3do] folder. That's what I've done.

===========================================================================================

As always with my mods, this work is offered for use by any and all, for any purpose, without restriction.


WxTech
3 December, 2021
2 August, 2022
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Epervier

  • 4.09 Guardian Angel !
  • SAS Team
  • member
  • Offline Offline
  • Posts: 9544
  • I'm French and Rebel_409! Nobody is perfect!
    • Some tinkering here
Re: Searchlight Beam and Illumination Color Mod
« Reply #1 on: April 16, 2021, 04:04:47 AM »

Thank you very much !  :)
Logged
If your results do not live up to your expectations, tell yourself that the great oak was once an acorn too. - Lao Zi -

Hans-Joachim Marseille

  • member
  • Offline Offline
  • Posts: 540
Re: Searchlight Beam and Illumination Color Mod
« Reply #2 on: April 16, 2021, 06:06:22 AM »

Thx for this. I wanna suggest to add a screenshot or two to illustrate what this actually does. Just sayin'.  ;)
Logged
"United we stand against Evil." #FCKPTN. #SlavaUkraini

DESPEREAUX

  • Modder
  • member
  • Offline Offline
  • Posts: 618
Re: Searchlight Beam and Illumination Color Mod
« Reply #3 on: April 24, 2021, 08:29:36 AM »

Thank you WxTech!  Now everyone can customize their spotlight color  ;D
Logged

Atoka220

  • Bomber
  • Modder
  • member
  • Offline Offline
  • Posts: 804
Re: Searchlight Beam and Illumination Color Mod
« Reply #4 on: November 27, 2021, 06:42:59 PM »

Here are some screens
It's a good little addition
Now we can be blinded with the correct colors ;D






Glenn If I can suggest, you should integrate it in your effects mod, and if possible, the beams should be a bit longer
Logged
There are 2 certain things in life: Death and CTDs

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6051
Re: Searchlight Beam and Illumination Color Mod
« Reply #5 on: December 03, 2021, 01:31:26 AM »

Atoka,
A belated thanks for the screenies!

I have since added a texture to the face of the lamp  that makes it brighter and more visible.

I'll look at lengthening the beam.

An update for the new texture, at least, will be issued soon...
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6051
Re: Searchlight Beam and Illumination Color Mod
« Reply #6 on: December 03, 2021, 02:25:55 AM »

I just lengthened the searchlight beam from the stock 3km to 6km. Of course, proportionality has been preserved by also doubling the width at the upper termination. Now the beam reaches up almost to the high cirrus clouds.

In the mod update I'll retain both beams, leaving the selection of that preferred up to the player. Instructions on selection will make the process simple.

As mentioned just above, I had already added a texture to the face of the lamp housing that boosts the impression of brightness of light emitted from within. This texture is co-planar with the face, meaning that as the view angle goes from face-on to edge-on, the texture shrinks in visible area due to foreshortening of the circular texture, and thus varying in apparent total brightness commensurate with the apparent shrinking in angular area of the glass face.

A couple of screenies, taken from the Okinawa map, whose island (and airfield) dimensions should be well familiar as fiducials for comparative 'measurement.'




Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6051
Re: Searchlight Beam and Illumination Color Mod
« Reply #7 on: December 03, 2021, 02:38:01 AM »

It's possible the stock length is a mere 3km so that where the cumulus clouds are present there is a reduced incongruity of the beam appearing well above the cloud tops, where one would expect the beam to be absorbed in the cloud. These longer beams would be more appropriate for less cloudy conditions, or where the low cumulus cloud base is set high enough that the tops go up to roughly 6,000m. The worse the weather as set, the higher the cumulus tops for a given base height.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6051
Re: Searchlight Beam and Illumination Color Mod
« Reply #8 on: December 03, 2021, 03:28:40 AM »

UPDATE, Dec 3, 2021: The two changes:
- I've updated the mod by doubling the beam length from the stock 3km to 6km. You can easily go back to the stock dimensions if you wish.
- I've added a texture to the lamp housing face to give a better impression of the brilliance of the light emitted from within.

The same d/l link in the top post applies.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6051
Re: Searchlight Beam and Illumination Color Mod
« Reply #9 on: December 03, 2021, 03:39:04 AM »

I'm not so keen on including this mod with my effects pack because it's more appropriately an object, like static vehicles and such, and not an effect per se. I think it's best to keep some separation between these two very different species.  ;)

When I get round to releasing the pack of objects I've been doing a bunch of fixes on (surface normals, shadows, collision boxes, flickering at longest LOD, etc.), the searchlight will be among them because it's an object, too.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

Atoka220

  • Bomber
  • Modder
  • member
  • Offline Offline
  • Posts: 804
Re: Searchlight Beam and Illumination Color Mod
« Reply #10 on: December 03, 2021, 01:12:24 PM »

Sweet work as always

Now we can be blinded E V E N  M O R E with the correct colors ;D

This is what looking directly into them looks like from lower altitude

Logged
There are 2 certain things in life: Death and CTDs

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6051
Re: Searchlight Beam and Illumination Color Mod
« Reply #11 on: August 02, 2022, 11:08:48 PM »

UPDATE: Aug 2, 2022. I've made a couple of further refinements. The same d/l link at the top post applies...
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1] 2 3   Go Up
 

Page created in 0.046 seconds with 24 queries.