Feature #4147

Searchlights provide unrealistic illumination.

Added by snarktactical almost 8 years ago. Updated over 5 years ago.

Status:Assigned Start date:08/29/2009
Priority:Normal Due date:
Assignee:- % Done:


Target version:-
Affected ArmA II version:Please select... First affected ArmA II version:
Reproduced by another DH user:No Single / Multi Player?:
I am using some Mods:No BIForumURL:
I am using: NGUrl:
Reproducible for you:No WIKIurl:
Related to content of DLC:


There are several problems with the way searchlights illuminate things in ArmA 2. Some of these issues are no doubt limitations of the graphics engine, but others are most certainly bugs.

1) Despite providing illumination in a wide arc rather than a narrow beam, searchlights remain excessively bright to a distance of 450 meters.
2) Grass is lit uniformly bright as a single large object, rather than per pixel like other objects. This is especially evident when comparing the brightness of grass to the relative darkness of the terrain nearby and underneath.
3) Light from searchlights pass through many large static objects illuminating objects behind them that should be dark.
4) Small static objects do not cast shadows from searchlights.

I have created a series of screen shots illustrating these problems. They were created by placing four searchlights at ground level facing each other in the courtyard of the town square of Chernogorsk. The time of day is 18:30 on Feb 9 with no fog. You should be able to repoduce similar results on any night in any settled region.

SearchLightProblem1.jpg - Note how the low walls here and some buildings do not block illumination from the searchlights in the town square. (252.3 kB) snarktactical, 08/29/2009 20:37

SearchLightProblem4.jpg - Illustrates improper illumination of grass. (104.4 kB) snarktactical, 08/29/2009 20:37

SearchLightProblemSeeMap.jpg - Illustrates improper attenuation of light with distance. See the picture below for the position of this builing. (152.7 kB) snarktactical, 08/29/2009 20:37

SearchLightProblemMap.jpg - Shows huge illumination range of searchlights. Note that each searchlight illuminates in an arc... I have placed four facing each other to produce the lighting my diagram illustrates. (454.4 kB) snarktactical, 08/29/2009 20:37

SearchLightProblem2.jpg - Note how distant buildings are just as brightly lit as nearby ones in this image. (338.5 kB) snarktactical, 08/29/2009 20:37

SearchLightProblem3.jpg - Note how the distant crane is just as brightly lit as nearby buidings, except where it is not in the cone of illumination. (356 kB) snarktactical, 08/29/2009 20:37

SearchLightProblem.zip - Compare how brightly the grass is lit vs. the ground. (967 Bytes) snarktactical, 07/25/2010 09:48

Related issues

related to ARMA2 Community Issue Tracker - Bug #5786: Searchlights' blinding effect is occluded by trees, but n... Assigned 11/11/2009 03/01/2012


Updated by zGuba almost 8 years ago

  • Due date set to 09/29/2009
  • Category changed from Visual to Rendering
  • Status changed from New to Assigned

Updated by JT almost 8 years ago

Pardoning the pun, but let's be realistic here. The lighting engine is constrained to the RGBA colour space, and the maximum brightness it can effect on an immediately adjacent target is equal to full 1.0,1.0,1.0 illumination -- i.e., the texture shows exactly as it would in pure daylight. If additional brightness were added beyond this, you would get an unsightly bloom/washout effect.

One light source generates shadows, at present -- the sun or moon -- and a significant amount of GPU effort goes into it. If additional shadow/occlusion rendering for every light source was introduced, things could bog down a bit worse. Then again, yesteryear games like Far Cry and Mafia: The City of Lost Heaven both had occlusion-based lighting, where lighting would only affect targets directly impacted with the beam for each flashlight (in Far Cry's case) and each vehicle's headlights (in Mafia's case).

Not saying it's not possible and not saying it's an unreasonable suggestion. I too would love it. But I am saying it's unlikely to get it perfect. =)

Updated by snarktactical almost 8 years ago

I agree with you, JT, it probably is unrealistic to expect BI to implement a realistic HDR solution as a bugfix (though it would be nice for sequels to ArmA 2 in the future). I didn't specifically mention the lack of washout and edge hi-lighting for that reason. I also agree with you that allowing other objects to cast shadows might drastically hurt performance and could be an unreasonable suggestion. However, I do think the pixel shader code for lighting from a spotlight could use some work.

I suspect they have searchlights provide full <1.0,1.0,1.0> intensity for distances less than about 400m, do either linear or quadratic attenuation with a falloff coefficient for the next 300 or 400 meters, and then treat the light as if does not exist for greater distances. My problem isn't so much that they aren't doing HDR for the near distance, but rather that what is basically a floodlight not a spotlight is doing full illumination out to about 400m. I think they should do one of the following, either 1) change the cutoff parameter so the illumination cone is narrower (this would make the searchlights into spotlights), or 2) only provide full intensity illumination out to about 150m and play with the falloff coefficient to make the light look more physically correct.

I also think the way grass is lit by spotlights is a serious problem that should be addressed. Look at the image I uploaded entitled SearchLightProblem4.jpg. The grass in that shot looks very fake, and is not lit at all like the surrounding objects. I don't know exactly what the problem is... my suspicion is that they are grouping the grass in large clumps and then treating the clumps as a single large object and doing a single lighting intensity calculation for it. If this is the case, they could either use smaller clumps, or do real per-pixel lighting. I am guessing there is some compromise that is possible that will eliminate the artifacting without hurting performance too badly.

Updated by snarktactical almost 8 years ago

I might be wrong about the clumping being the problem with the way grass is illuminated. Headlights seem to illuminate grass properly, so it is probably just a bug that is causing the wierd illumination problem with grass and searchlights.

Updated by Fireball over 7 years ago

  • Due date changed from 09/29/2009 to 10/29/2009
  • Affected ArmA II version changed from 1.03.58627 to 1.04.59026
  • Reproduced by another DH user set to No

Updated by bartkusa over 7 years ago

May I add a comment?

I noticed a couple months ago that if I'm behind cover, and a spotlight is shined in my direction, I am slightly blinded even though I have no line-of-sight to the spotlight.

I haven't tried to repro this recently.

Updated by bartkusa over 7 years ago

Repro of my comment, with annotations: http://www.youtube.com/watch?v=iAL9OlhLaOY

Updated by Fireball over 7 years ago

  • Due date deleted (10/29/2009)

Bartkusa, I think this is a different issue. Could you open a new ticket for that?

Setting this to be a feature request.

Updated by Fireball over 7 years ago

  • Tracker changed from Bug to Feature

Updated by snarktactical over 7 years ago

Well, technically it's a bug... a bug that can either have a very simple "hack" solution (fixing the parameters in the pixel shader code for the searchlights), or a more realistic solution (HDR) that would require a major overhaul of shader code and possible induce performance problems. Issue 2 of the 4 I mentioned is the mysterious issue that I am not sure how to go about fixing. I'm not sure why the grass is being lit so differently than the terrain. Maybe the grass layer is blocking light to the terrain? I don't know -- it's just speculation on my part. Issue 4 of the 4 I mention is the only thing resembling a feature request...

Updated by kju almost 7 years ago

  • Affected ArmA II version changed from 1.04.59026 to Please select...
  • Audio card set to Please specify!
  • Size of OS swap file set to Please specify!

Updated by snarktactical almost 7 years ago

The aspects of this issue that are bugs and not feature requests are still present in OA 1.52. I have attached a sample missions that demonstrates the inconsistency in lighting between the ground and the vegetation, and the unrealisticly far search light illumination. For reference, you can swap between the two soldiers in the mission to see how headlights seem to match illumination of the ground and vegetation farily well while search lights do not.

Also available in: Atom PDF