NVG Mod - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 01-16-2013, 01:09 PM   #1
nrgized
Member
 
Join Date: Jul 2012
Location: Los Angeles, CA
Posts: 205
Default NVG Mod

Info:

So while I have a few *issues* with nighttime in this game (insert smiley face), I decided to mess with the NVGs a little bit. Credit goes to this post of getting me thinking of this mod, wish I could of done more but this is all for now.

Installation:

Download the attached zip from this post and install files to DCS World.

Make sure to edit DCS World/config/graphics and change PrecompiledEffects mode to "USE_PRECOMPILED_EFFECTS_FOR_UNCHANGED_FILES" (Its already there, but commented out).

Not doing so will not let this mod work!
Color:
The NVG mod desaturates the areas under the NVGs as their brightness increases. This reflects what you see in most images taken through night vision goggles such as the image below.

Noise:
A Slight hint of noise is added to the area under the effect of the NVGs
Perception:
While this is a hack in its current form it none the less is trying to produce something based on the real world.

Because the sensor on NVGs is not at the same XYZ coordinate as your eyeballs retina in real life, the image that you see makes objects appear to be closer. Think of the AH-64 Apache, its nightvision cameras are on the front of the aircraft. What the pilot see's through his helmet display is not that as if it were through his eye but some 5-8ft or so in front of him.

The NVG mod does a half baked version of this and simply scales the image area under the effect of the NVGs up.
Fullscreen Mode (Optional):
You can run with NVGs in full screen.
Options:
You can tweak the mod through few options to customize the output to something more of your fitting.
Release notes 1.0v2:

Quote:
------------------
- Installation
------------------

Make sure to edit DCS World/config/graphics and change PrecompiledEffects mode
to "USE_PRECOMPILED_EFFECTS_FOR_UNCHANGED_FILES" (Its already there, but commented out).

Not doing so will not let this mod work!

------------------
- Tweaking
------------------

// Center of the circle used to represent the NVGs.
//
// Now let's imagine we use 1000x1000 Pixels as In-game Resolution:
// And lets say we want the center at 300px from the left and 650px from the bottom.
//
// 1000px=1 so 300px = 0.3
//
// The Values are starting to count from the Bottom-Left corner of your Res, first is for for
// Horizontal position and the second for Vertical:
//
//
const float2 EYE_CENTER = float2(0.5f, 0.57f);

// In precent of screen size. Since most monitors are not 1:1 aspect ratio most often you will
// choose your height was the percent value then you take the pixel value of that percentage and
// divide that by your screen width.
//
// Example: Resolution = 1920x1080
// You want the eye to be 85% the size of 1080. You take 1080*.85=918, now to figure out same
// size width take 918/1920=0.4781. Now your circle will be the same width and height.
//
// Here are the some numbers for different common aspect-ratios:
// 4:3 = 1.333 -> Triplehead 4:3 = 4
// 5:4 = 1.25 -> Triplehead 5:4 = 3.75
// 16:10 = 1.6 -> Triplehead 16:10 = 4.8
// 16:9 = 1.78 -> riplehead 16:9 = 5.333
//
// First value is for width second for height:
//
//const float2 EYE_SIZE = float2(0.5344f, 0.95f);
const float2 EYE_SIZE = float2(0.5906f, 1.05f);

// How much to scale the image in RENDER_MODE=1. Anything greater then 20% is a bit crazy!
const float EYE_SCALE = 0.19f;

// Min value to multiply noise.
const float NOISE_MIN[2] =
{
0.5f, // A-10C
0.75f // KA-50
};

// Max value to multiply noise.
const float NOISE_MAX[2] =
{
0.5f, // A-10C
0.75f // KA-50
};

// Color to use for NVGs.
const float2x3 COLORIZE_COLOR =
{
{0.65f, 1.00f, 0.35f}, // A-10C
{0.2f, 0.46f, 0.22f} // KA-50
};

// Based on the NVG magnification the image is lifted by this.
// (COLORIZE_COLOR * nvgmag) * this

const float NVG_COLOR_LIFT[2] =
{
0.175f, // A-10C
0.175f // KA-50
};

// Changes the Circle rendering mode.
//
// 0 = Circle without zoom
// 1 = Circle with zoom
// 2 = Fullscreen without zoom.
//
const int RENDER_MODE = 1;

// Enables a slight distortion along the edges of the NVG glass.
const bool ENABLE_RIM_DISTORT = true;

// Changes the blur rendering mode.
//
// 0 = Use default game blur
//
// Not yet implemented
//
const int NVG_INNER_BLUR_MODE = 0;

------------------
- Changes
------------------

verison 1.0v4b2:
* Fixed a bug that use incorrect translations coords in RENDER_MODE=1 for users of multi-display
setups.

* Fixed a bug that rendered the IR laser outside the NVG area. Also made it so that the IR laser no
longer uses a texture file to define the NVG area mask. Just like the NVG area the IR laser uses
a on the fly generated mask.

* Reverted the feature that when the NVG gain was set to 0 the NVG area would render like binoculars
instead of drawing black.

version 1.0v2:

* Changed NVG Shape.

* Tweaked NVG color. Noise no longer affects bright illuminated areas and its affect
increases/decreases with the NVGs sensitivity setting as well.

* Added lens distortions to the rim of the NVG Glass.

* Added a few more configuration variables.
Attached Thumbnails
Click image for larger version

Name:	NVG Mod 001.jpg
Views:	12089
Size:	818.2 KB
ID:	76414   Click image for larger version

Name:	NVG Mod 002.jpg
Views:	8447
Size:	921.4 KB
ID:	76415  
Attached Files
File Type: zip nvg_mod_1.0v4b2.zip (1.70 MB, 3514 views)

Last edited by nrgized; 01-24-2013 at 10:47 PM.
nrgized is offline   Reply With Quote
Old 01-16-2013, 02:25 PM   #2
skouras
Senior Member
 
skouras's Avatar
 
Join Date: Apr 2009
Location: Athens-HELLAS
Posts: 1,300
Default

wow nice work
thank you
skouras is offline   Reply With Quote
Old 01-16-2013, 05:06 PM   #3
PeterP
Veteran
 
PeterP's Avatar
 
Join Date: Mar 2009
Location: Germany / UTC+1
Posts: 5,180
Default

EDIT: this is manly for all Ka-50 pilots:

>>> nrgized nvgmod_1.0v3 with Ka-50.zip

Quote:
Originally Posted by PeterP View Post
Now the Ka-50 works also with Nrgized NVG Mod.

Sorry I couldn't carry over the periodic static, but I tried hard to be so close as I could to the original OVN-1 Skosok NVG (..and its limitations).

Please read the README - there are some changes and new options.







>>> NVG ANVS-9 more REAL...


@nrgized

OK !
Great implementation!

...

Still I have some remarks about the read-me, I fear that some will have to follow all necessary steps when they use a "unexpected" monitor-setup:
>>> http://forums.eagle.ru/showthread.ph...69#post1654769
__________________


Last edited by PeterP; 01-21-2013 at 11:01 PM.
PeterP is offline   Reply With Quote
Old 01-17-2013, 12:30 PM   #4
nrgized
Member
 
Join Date: Jul 2012
Location: Los Angeles, CA
Posts: 205
Default

Hi Peter,

The config options in the file allow for multiple monitor and different aspect ratio setups. Everything is UV coord based so you can move and re-shape things.

The shape was minimal as it was a first pass

I've just uploaded a new version (At the start of the thread attached) that tweaked the noise, shape, and also adds lens distortion to the edges of the lens for those that are interested. If you dont like the distortion you can turn it off in the file by setting ENABLE_RIM_DISTORT to "0".

You can see the lens distortion at the top of the HUD.

Cheers!


Last edited by nrgized; 01-17-2013 at 12:34 PM.
nrgized is offline   Reply With Quote
Old 01-17-2013, 01:49 PM   #5
JG14_Smil
Senior Member
 
Join Date: Dec 2008
Posts: 2,387
Send a message via MSN to JG14_Smil
Default

Anyone that can navigate "Confusion Corner" can obviously come up with a great mod

(it is a Port St Lucie joke)
JG14_Smil is offline   Reply With Quote
Old 01-17-2013, 03:06 PM   #6
ajax
Member
 
ajax's Avatar
 
Join Date: Feb 2010
Posts: 477
Default

I thought Confusion Corner was in Stuart?
ajax is offline   Reply With Quote
Old 01-17-2013, 04:49 PM   #7
PeterP
Veteran
 
PeterP's Avatar
 
Join Date: Mar 2009
Location: Germany / UTC+1
Posts: 5,180
Default

Nrgized, this looks simply fantastic! espacialy the zoom.

... I'm hope I don't ask too much , but:
Do you think that implementing a 'framerate friendly' DOF filter that blurs the cockpit is possible with the the NVG shader ?
__________________

PeterP is offline   Reply With Quote
Old 01-18-2013, 10:32 AM   #8
nrgized
Member
 
Join Date: Jul 2012
Location: Los Angeles, CA
Posts: 205
Default

Don't have a new version today, spent yesterday just messing around with ideas.

As Peter pointed out depth of field would be killer, unfortunately post process effects have no access to the zbuffer.

ED would have to pass the zbuffer in as a texture and it would be super killer if they added that feature. Currently the textures alpha is just a straight value of 1.0 and I wouldn't see it being missed if it were instead replaced with the z That or pass it in as a second single channel texture.

@JG14 and ajax
I came to PSL for the fail train of DD and just havent left yet, even though its been over a year now I dont know the local area much nor the lingo .

Even though the images (attached to this post) are totally incorrect in depth, bokeh, etc... None the less its still cool to see what it could possibly look like. I've included a few screenshots of the mod heavily tweaked trying its darnedest to show what it could look like if the zbuffer were available. I wont release this bastardized version as it only looks nice in the screenshots. Anywhere else and your cockpit is lit up like someone droped a couple hundred glowsticks on your lap .

Cheers!
Attached Thumbnails
Click image for larger version

Name:	nvg_fake_depth.png
Views:	1666
Size:	747.5 KB
ID:	76144   Click image for larger version

Name:	nvg_fake_depth_bokeh_a.png
Views:	1931
Size:	1.01 MB
ID:	76145   Click image for larger version

Name:	nvg_fake_depth_bokeh_b.png
Views:	1762
Size:	1,021.1 KB
ID:	76146  

nrgized is offline   Reply With Quote
Old 01-18-2013, 12:43 PM   #9
nrgized
Member
 
Join Date: Jul 2012
Location: Los Angeles, CA
Posts: 205
Default

You know, when I was doing the look dev on the blur I was just flying in circles. I wondered what it was like flying the mountains and what it would be like with the limited view.

Well let me tell ya... Its claustrophobic as all hell having no peripheral vision!

Who do I have to pay at ED for the zdepth pass given to the post process effects buffer?

nrgized is offline   Reply With Quote
Old 01-18-2013, 01:05 PM   #10
sobek
Veteran
 
sobek's Avatar
 
Join Date: May 2008
Location: Austria
Posts: 11,915
Default

Start with alex o kean He's the API guy AFAIK.
__________________
Good, fast, cheap. Choose any two.
Come let's eat grandpa!
Use punctuation, save lives!
sobek is offline   Reply With Quote
Reply

Tags
blur, dof, nvg

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:26 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.