Jump to content
Sign in to follow this  
granQ

NVG and FLIR

Recommended Posts

Many choppers, tanks and such have cool NVG/FLIR but in OFP we "stuck" with just the green light and I thought that was boring.

I found out a way to do a basic "NVG" and used it on the Btr 80

and yesterday i played around with the scripts little and made FLIR working..

flir.jpg

I would want more people to use this feature..

http://community.bistudio.com/wiki/setAperture

This command, use it !

My values I used was 0.07 (For NVG) and 0.01 for FLIR

Share this post


Link to post
Share on other sites

This is excellent !

I really appreciate this function, very nice and it's great you found it...

Malick

Share this post


Link to post
Share on other sites

This is a great feature, I will use it for sure on a project I have planned in the future biggrin_o.gif

Share this post


Link to post
Share on other sites

another idea is to use it with flashbangs.

Share this post


Link to post
Share on other sites

Well the color of the FLIR is about right, but the real purpose of it is sadly not covered by that. What do you think, is it possible to apply a different set of textures on an Object to make it a heat signature?

Share this post


Link to post
Share on other sites

But it's working only in night (like in Blood, Sweat and Tears mission intro).

However, during a day you are able to create "scorcher" atmosphere smile_o.gif

Share this post


Link to post
Share on other sites
But it's working only in night (like in Blood, Sweat and Tears mission intro).

However, during a day you are able to create "scorcher" atmosphere smile_o.gif

true, but for flashbangs you can still make use of it.

Share this post


Link to post
Share on other sites

This could be of use for helicopter gunners. You could make awsome realistic looking sights for the Ah-1.

Share this post


Link to post
Share on other sites

this is great! one question tho, if i wanted to use this as a replacment for the green NVG for heli gunners (like cobra gunner) how do i use it? is it a script of some sort?

Share this post


Link to post
Share on other sites
Guest
Well the color of the FLIR is about right, but the real purpose of it is sadly not covered by that. What do you think, is it possible to apply a different set of textures on an Object to make it a heat signature?

I faked it in vbs1 by making the unit pure white....

here is a video of it..

Nice Work! notworthy.gif

Share this post


Link to post
Share on other sites

After glancing over this thread, could the 'setaperture' command be adapted in conjunction with some custom goggles (i.e. thermal vision etc)?

Share this post


Link to post
Share on other sites

well, assuming its done via a useraction (much like your animated nv goggles were done) then the animation could also set the apeture command and remove it when raised..

worth a bit of experimentation I reckon

Share this post


Link to post
Share on other sites
After glancing over this thread, could the 'setaperture' command be adapted in conjunction with some custom goggles (i.e. thermal vision etc)?

yeap.. hopefully Bis gives us more control over the visual ways, "setColorOverlay" would be neat for other types.

sure it isnt 100% correct flir but its better then nothing, with a few more commands we could do awesome stuff.

Share this post


Link to post
Share on other sites

I think an invert layer would be needed for FLIR. I achieved that effect in one of my vids. It's not 100% real, but it's pretty close. You turn it black and white and then you just invert that and you get a pretty awsome effect, resembles FLIR IMO.

This is the vid.

Share this post


Link to post
Share on other sites

This is awesome!  wow_o.gif

It seems like such a simple solution, I'm surprised nobody's thought of it before. Excellent stuff once again, GranQ  thumbs-up.gif

P.S.

In french, "GranQ", if the Q is read as a separate letter, means BigAss  whistle.gif

Was this intentional?  rofl.gif

EDIT;

How would I implement this? I'd make a trigger and in the onactivation field put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">setAperture 0.01

but what would I use as the condition? It would be if the gunner of an armored vehicle or aircraft looked through his sights for instance.

Share this post


Link to post
Share on other sites
EDIT;

How would I implement this? I'd make a trigger and in the onactivation field put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">setAperture 0.01

but what would I use as the condition? It would be if the gunner of an armored vehicle or aircraft looked through his sights for instance.

Try editing the config.cpp wink_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class UserActions

{

class NightVision

{

displayName="Nightvision ON";

position="osa_dvere1";

radius=3.500000;

onlyForPlayer= true;

condition="NOT(SD_HaveNvg) AND (PLAYER == gunner this)";

statement="this exec ""\SD_Btr80\script\nightvision.sqs""";

};

class NightVisionOff

{

displayName="Nightvision Off";

position="osa_dvere1";

radius=3.500000;

onlyForPlayer= true;

condition="SD_HaveNvg AND (PLAYER == gunner this)";

statement="SD_HaveNvg = false";

};

};

nightvision.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_veh = _this

?!(gunner _veh == player) : goto "end";

setAperture 0.07;

SD_HaveNvg = true

#check

?!(alive player) : goto "end";

?!(gunner _veh == player) : goto "end";

?!(SD_HaveNvg) : goto "end";

~0.20

goto "check"

#end

setAperture -1;

Share this post


Link to post
Share on other sites

Is that what I would have to do, so that armored crew have this pseudo FLIR system?

I only want crew to have this capability, no other unit.

Also, where would I put nightvision.sqs? And SetAperture -1, shouldn't that be SetAperture 0.01?

And (sorry I'm an ArmA editing n00b), where do I find config.cpp?

Share this post


Link to post
Share on other sites

No, setAperture -1 will turn it back to normal value.

Share this post


Link to post
Share on other sites

Ah I see yeah, it's at the end of the script. But 0.07? 0.01 is what makes the image black hot

Ahaaa nevermind lol. I understand now. This is what you would add to a vehicle's config.cpp. I thought it was an explanation as to how to implement this feature to the game, globally. Nevermind. Guess I have some addon editing to do tounge2.gif

EDIT No.321654 : How do I convert .bin to .cpp?

Share this post


Link to post
Share on other sites

A magician never reveals his technique.... But I'll let you off this time  wink_o.gif

tounge2.gif

Thanks smile_o.gif

Hmmm ok so I tried editing air.pbo, here's the section on the Cobra;

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class AH1W: Helicopter {

selectionHRotorStill = "mainRotorStatic";

selectionHRotorMove = "mainRotorBlurred";

selectionVRotorStill = "tailRotorStatic";

selectionVRotorMove = "tailRotorBlurred";

memoryPointLMissile = "Missile_1";

memoryPointRMissile = "Missile_2";

memoryPointLRocket = "Rocket_1";

memoryPointRRocket = "Rocket_2";

selectionFireAnim = "muzzleflash";

crew = "SoldierWPilot";

scope = 2;

side = 1;

displayName = "$STR_DN_AH1Z";

nameSound = "cobra";

accuracy = 0.300000;

driverAction = "AH1Z_Pilot";

crewVulnerable = 0;

maxSpeed = 270;

typicalCargo = {"SoldierWPilot", "SoldierWPilot"};

soundGetIn = {"\ca\air\Data\Sound\heli_door1", 0.100000, 1};

soundGetOut = {"\ca\air\Data\Sound\heli_door1", 0.100000, 1};

soundEngine = {"\ca\air\Data\Sound\AH1_engine_v3a", 39.810719, 1};

armor = 60;

cost = 10000000;

model = "\ca\air\ah1z";

picture = "\ca\air\data\ico\ah1z_CA.paa";

mapSize = 13;

Icon = "\ca\air\data\map_ico\icomap_ah1z_CA.paa";

memoryPointsGetInDriver = "pos_driver";

memoryPointsGetInDriverDir = "pos_driver_dir";

class Turrets: Turrets {

class MainTurret: MainTurret {

gunnerAction = "AH1Z_Gunner";

gunnerInAction = "AH1Z_Gunner";

primary = 1;

weapons = {"M197", "FFARLauncher", "HellfireLauncher"};

magazines = {"750Rnd_M197_AH1", "38Rnd_FFAR", "8Rnd_Hellfire"};

memoryPointsGetInGunner = "pos_gunner";

memoryPointsGetInGunnerDir = "pos_gunner_dir";

memoryPointGun = "machinegun";

minElev = -60;

maxElev = 10;

initElev = 0;

minTurn = -70;

maxTurn = 70;

initTurn = 0;

gunnerOpticsModel = "\ca\air\optika_AH1Z";

};

};

threat = {0.300000, 1, 0.800000};

class AnimationSources: AnimationSources {

class 20mmBarrels {

source = "reload";

weapon = "M197";

};

};

laserScanner = 1;

class Library {

libTextDesc = "$STR_LIB_AH1Z";

};

dammageHalf = {"\ca\air\data\ah1z_glass_ca.paa", "\ca\air\data\ah1z_glassbr1_ca.paa", "\ca\air\data\ah1z_glass_ca.paa", "\ca\air\data\ah1z_glassbr1_ca.paa"};

dammageFull = {"\ca\air\data\ah1z_glass_ca.paa", "\ca\air\data\ah1z_glassbr2_ca.paa", "\ca\air\data\ah1z_glass_ca.paa", "\ca\air\data\ah1z_glassbr2_ca.paa", "\Ca\air\data\ah1z_monitor_glass_ca.paa", "\Ca\air\data\ah1z_monitor_glass_destr_co.paa"};

class Damage {

tex = {};

mat = {"ca\air\data\ah1z_body.rvmat", "ca\air\data\ah1z_body.rvmat", "ca\air\data\ah1z_body_destruct.rvmat", "ca\air\data\ah1z_cockpit.rvmat", "ca\air\data\ah1z_cockpit.rvmat", "ca\air\data\ah1z_cockpit_destruct.rvmat", "ca\air\data\ah1z_engines.rvmat", "ca\air\data\ah1z_engines.rvmat", "ca\air\data\ah1z_engines_destruct.rvmat", "Ca\air\data\ah1z_monitors.rvmat", "Ca\air\data\ah1z_monitors.rvmat", "Ca\air\data\ah1z_monitors_destruct.rvmat"};

};

};

class UserActions {

class NightVision

{

displayName="FLIR ON";

position="osa_dvere1";

radius=3.500000;

onlyForPlayer= true;

condition="NOT(SD_HaveNvg) AND (PLAYER == gunner this)";

statement="this exec ""\SD_Btr80\script\nightvision.sqs""";

};

class NightVisionOff

{

displayName="FLIR Off";

position="osa_dvere1";

radius=3.500000;

onlyForPlayer= true;

condition="SD_HaveNvg AND (PLAYER == gunner this)";

statement="SD_HaveNvg = false";

};

};

I added the new part (from the "class useractions" part onwards) to the end of all other aircraft sections, and when I try and launch ArmA I get an error message pointing to the config saying UH60MG base is not defined or something huh.gif

Share this post


Link to post
Share on other sites

hey Shashman ,

let me know once you've finished editing the config. i want to do the same to the cobra heli gunner and will need to know how/what you edited to the the result were looking for.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×