Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IR Flashlights #6563

Merged
merged 12 commits into from Sep 17, 2023
Merged

Add IR Flashlights #6563

merged 12 commits into from Sep 17, 2023

Conversation

BaerMitUmlaut
Copy link
Member

@BaerMitUmlaut BaerMitUmlaut commented Sep 4, 2018

When merged this pull request will:

  • Add a DBAL-A3 multi function laser
  • Add a SPIR IR flashlight
  • Add a momentary switch for flashlights

Major todos:

@PabstMirror PabstMirror added this to the Ongoing milestone Sep 22, 2018
@jonpas jonpas added kind/feature Release Notes: **ADDED:** and removed kind/feature labels Nov 9, 2018
@thojkooi thojkooi changed the title IR flashlights WIP: IR flashlights Nov 19, 2018
@Steve161st
Copy link

Will it be possible to have both an IR flashlight and IR pointer turned on at the same time?
This would certainly be the ideal situation but may require new mechanics?

@BaerMitUmlaut
Copy link
Member Author

Click the link in the OP.

@derbismarck
Copy link
Contributor

Blocking engine-level issues with the alignment of IR flashlights have been fixed in the latest A3 update, v2.00

@derbismarck
Copy link
Contributor

Classname "attenuation" for the ACE IR flashlight is misspelled to "attentuation"

@Neviothr
Copy link
Contributor

Neviothr commented Jun 2, 2021

https://forums.bohemia.net/forums/topic/140837-development-branch-changelog/?do=findComment&comment=3438862

Added: irLight entry to all light config classes to turn a light source into a InfraRed-only light
Added: irDotSize entry to weapon IR laser attachment config classes for the size of the IR dot on laser impact

@BaerMitUmlaut
Copy link
Member Author

BaerMitUmlaut commented Jun 2, 2021

I'm aware and already adjusting everything. This change was at least partially influenced by us. Thanks for the ping though!

@derbismarck
Copy link
Contributor

derbismarck commented Jun 22, 2021

Have you had issues with that particular method for removing/re-adding a flashlight or IR attachment? I remember having a lot of trouble with that, but ended up settling on a solution that handled both of these edge cases:

  • Weapons changing firemodes when you attempt to force the new attachment to be turned on (solution: forceWeaponFire)
  • Secondary/launcher weapons being swapped away from when you attempt to change the attachment, general inability to force the light/laser on a secondary/launcher weapon to be on if the player has a primary weapon (solution: remove primary weapon for a frame)

@Slatery
Copy link

Slatery commented Aug 10, 2021

Given the engine doesn't stop flashlights from going through walls or terrain, could I suggest lowering the values on the DBAL illuminator.
https://www.youtube.com/watch?v=tV_Z8djf8S0
As seen in this video here, there are two levels for the illuminator, the low power one seems to go out to about 25/35m before dropping off, and the high power seems to be able to go out to about 100m.

Meanwhile the illuminator on the DBAL in this PR seems to go several hundred meters
image
image
Given that vehicle mounted IR driving lights go out to ~650m it seems absurd that a single LED can get similar performance.

A side effect of this as well seems to be that the illuminator completely washes out visibility of the target, making it mostly useless for anything closer than 150m
image
image

@BaerMitUmlaut
Copy link
Member Author

As seen in this video here, there are two levels for the illuminator, the low power one seems to go out to about 25/35m before dropping off, and the high power seems to be able to go out to about 100m.

That has to be the worst demonstration video I've ever seen, I assume the lighting conditions make it look so weak. Please check out literally any other IR illuminator demo video on YouTube. The DBAL-A3 is a bit rare, but you can compare it to the A2 (aka. AN/PEQ-15A), which has a more focused, but lower power illuminator (depends on the variant).

Given that vehicle mounted IR driving lights go out to ~650m it seems absurd that a single LED can get similar performance.

Just like the DBAL-A2, the A3 uses a diffused laser, not an LED light. The brightness depends on the variant, with the highest wattage ones being specified to illuminate up to 4000 m. I have of course toned that down.

The SPIR, the IR flashlight that this PR introduces, does use an LED. It still has an impressive range.

A side effect of this as well seems to be that the illuminator completely washes out visibility of the target, making it mostly useless for anything closer than 150m

Some washing out is normal and to be expected, but I "balanced" the intensity for ACE night vision. The color shade of your screenshot looks more like the bright green vanilla night vision. Which one are you using?

Thank you for testing this and providing feedback, much appreciated.

@Slatery
Copy link

Slatery commented Aug 10, 2021

Ah, if it's a laser that makes a bit more sense.
Judging from this video then they are fairly bright under nods, but it still seems a bit less intense compared to the current values: https://www.youtube.com/watch?v=8tKv98IFdB4
The night vision I'm using is from the different NV colors PR, which is using a custom version of the green. The environment is June 26th 2035 (no moon) full overcast on Tanoa with brightness all the way down. Funnily enough, the IR illuminator strength is perfectly usable with our White Phosphor.
White Phosphor:
image
Amber: image
Our Green:
image
ACE Gen4:
image
Zeus/Vanilla:
image

@dedmen
Copy link
Contributor

dedmen commented Aug 18, 2021

By the way vanilla 2.06 now also has visible flashlight cones.
Not sure if that makes sense for IR flashlights, but engine has specific IR support for these too to only show them in NV

Here a image of not fully working one from QA
image

The vanilla cone is in /A3/Data_f/VolumeLightFlashlight.p3d
To do that just use

volumeShape	= "a3\data_f\VolumeLightFlashlight.p3d";
scale[]		= {1,1,1};

I think the angle of them might not fit the tighter angle IR lights?
You can either mess with the scale to try to fix that, or I can send you the source p3d if you want to make a own

@dedmen
Copy link
Contributor

dedmen commented Aug 26, 2021

Somewhat related.
You can also set irDotSize in the Pointer class to specify the size of the IR dot when it impacts an object.
Default is 0.1, as far as I can see this feature is completely undocumented.

@Slatery
Copy link

Slatery commented Aug 30, 2021

I did a bit of messing around, looking to get an effect similar to the timestamped portion of this video but at a slightly lower power, so instead of that effect at 300yrds it's at 200m: https://youtu.be/y7-26aVB__Y

Main difference is that it doesn't wash out whatever you're looking at, eg against the SPIR,
as before, the conditions are June 26th 2035, full overcast:
image

Illuminator on:
image

SPIR Narrow (only difference to the original DBAL values is slightly longer throw)
image

Same date, but clear sky
image

Illuminator:
image

SPIR:
image

June 11th 2035 (full moon)
image

Illuminator:
image

SPIR:
image

Throw comparison:
image
SPIR:
image

All the images and the video where done using the CSAT compact NVGs. I'm guessing but it looks like the original values where made to be used in full moonlight, because otherwise it is very over saturated

@rautamiekka
Copy link
Contributor

A year later, what's the status on this ?

@PabstMirror
Copy link
Contributor

PabstMirror commented Aug 30, 2023

seems to be working well on current arma

in my opinion the flashlight is a bit strong
real life mil-version of this has a physical block that can limit output to eye-safe low power mode
I was thinking of using CBATeam/CBA_A3#1595
to emulate this and make it a setting?

edit:

The High Power Modes of operation are blocked with a blue
Safety Screw.
https://www.steiner-optics.com/sites/default/files/manuals/DBAL-I2_1.pdf

@BaerMitUmlaut
Copy link
Member Author

This can only be finished once the attenuation bug is fixed: https://feedback.bistudio.com/T170990
I haven't tested if it's fixed in 2.14.

@BaerMitUmlaut
Copy link
Member Author

Oh and I have some unfinished commits that have adjusted values, with a high power and low power variant. Would appreciate if you could wait for that.

@BaerMitUmlaut BaerMitUmlaut changed the title WIP: IR flashlights IR flashlights Sep 14, 2023
Copy link
Member

@jonpas jonpas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pedantic but proper Markdown.

docs/wiki/feature/irlight.md Show resolved Hide resolved
docs/wiki/feature/irlight.md Show resolved Hide resolved
docs/wiki/feature/irlight.md Show resolved Hide resolved
docs/wiki/feature/irlight.md Show resolved Hide resolved
docs/wiki/feature/irlight.md Show resolved Hide resolved
addons/laserpointer/script_component.hpp Outdated Show resolved Hide resolved
sections[] = {""};
skeletonName = "";
};
class irglow: Default {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be prefixed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Maybe - I'll check.

Co-authored-by: jonpas <jonpas33@gmail.com>
@jonpas jonpas modified the milestones: Ongoing, 3.16.0 Sep 14, 2023
@jonpas jonpas changed the title IR flashlights Add IR Flashlights Sep 14, 2023
BaerMitUmlaut and others added 5 commits September 14, 2023 21:35
Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: jonpas <jonpas33@gmail.com>
Copy link
Contributor

@LinkIsGrim LinkIsGrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's more. You get the idea.

addons/irlight/CfgWeapons.hpp Outdated Show resolved Hide resolved
addons/irlight/CfgWeapons.hpp Outdated Show resolved Hide resolved
addons/irlight/CfgWeapons.hpp Show resolved Hide resolved
addons/irlight/CfgWeapons.hpp Show resolved Hide resolved
addons/irlight/CfgWeapons.hpp Outdated Show resolved Hide resolved
addons/irlight/CfgWeapons.hpp Outdated Show resolved Hide resolved
addons/irlight/CfgWeapons.hpp Outdated Show resolved Hide resolved
addons/irlight/CfgWeapons.hpp Outdated Show resolved Hide resolved
@BaerMitUmlaut BaerMitUmlaut merged commit d6faac5 into master Sep 17, 2023
5 checks passed
@jonpas jonpas deleted the irlight branch September 17, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants