Jump to content

Frenchy's NVG mod for DCS 1.5.x and 2.x


Recommended Posts

DCS 2.5 README

Based on requests from VR and multi monitor users I have picked this mod back up

 

Sorry to those that have waited a bit more than a week or two, been pretty busy with work.

Here is a Tacca's NVG mod for DCS 2.5

 

Version 1.2.0 - 27 March 2018

Change log

Added ability to change rendermode. 0 = full screen NVG, 1 = NVG without black ring and 2 = NVG with black ring. Default is set to Rendermode = 2

 

Features

Includes working option for NVG center, size and ring dimensions (like old mod)

Black ring effect with adjustable thickness settings.

Variable rendermode options

Fixed folder naming issue to be truly OVGME ready

 

Cannot currently change colour, noise levels or contrast

Download here. OVGME ready :)

As per old mod, change settings in the following file Tacca's NVG mod 1.1.0BazarshaderscommonMOD_nvg.hlsl (recommend using notepad ++)

 

render-modes.jpg

 

Upcoming

will look into adjustable noise and/or colour of NVG but will take a bit longer

 

Version 1.1.0 - 26 March 2018

Change log

Added black ring effect with adjustable thickness settings.

Fixed folder naming issue to be truly OVGME ready

 

Features

Includes working option for NVG center, size and ring dimensions (like old mod)

 

Cannot currently change colour, noise levels or contrast

Download here. OVGME ready :)

As per old mod, change settings in the following file Tacca's NVG mod 1.1.0BazarshaderscommonMOD_nvg.hlsl (recommend using notepad ++)

 

Current ring size is at settings recommended by a current Blackhawk pilot who uses VR (mainly flies huey in DCS)

 

Upcoming

ability to choose whole screen, basic or with ring NVG effect like old version

 

Version 1.0.0 - 25 March 2018

Only includes working option for NVG center and size (like old mod)

Does not include Black Ring

Cannot currently change colour, noise levels or contrast

Download here. OVGME ready

 

ED has finally implemented a new NVG. I must say it looks mighty familiar to what myself and nrgized before me were working towards (in particular the DOF). As of at this moment I dont feel the need to make changes unless the community provides consistent feedback on changes they want. You can still use the mod below but I would go with stock for now.

Frenchy

 

If you are still using DCS 1.5.X you can use the versions below

 

-------------OLD DCS 1.5 & 2.2 BELOW------------

 

Introduction

 

This is an NVG mod I reworked for DCS World 1.5 and 2.0 (2.2) to generate a realistic NVG effect instead of the stock effect. It is based on the work created Nrgized with the help of PeterP and few others from the eagle dynamic forums on this thread (in future I will refer to this as Version 1). The rework was required since DCS 1.5 and above uses the new Eagle Dynamics Graphics Engine (EDGE) which is based on DirextX11 (DX11). Version 1 was coded using DX9 and was not compatible at all due to the significant changes, for the better, in the Higher Level Shading Language (HLSL).

 

A quote of mine from the initial thread I started on the Online 1st Cav Div forums (online handle is Frenchy) can give some perspective on where I started skill wise in this endeavor. I want to emphasis I have no background in shader coding at all but all my maths studies at uni (some in writing code to calculate numerical solutions for 2nd order non linear differential equations for example) have given me a nice advantage.

 

Hey guys, Uni is finished for the year and this is number 1 on my to do list.

Spent all day breaking down the standard DCS NVG implementation and learning some basics of HLSL. Im now confident in how I need to go about making basic color and intensity changes.

Ive just started looking into what this actual mod did and how. Will take me a little bit (next few days around work etc) to figure it all out but I think I will be able to achieve something similar :) if not it will at least be stepping stones to getting close.

My plan of attack is first and easiest (i think) should be the color/intensities. Next will be the noise (or lack thereof if the scene is bright) and then finally the zoom and ring.

PS. I dont have the black shark so the A10 is my primary concern but once done i might get the blackshark and try to do that one as well.

Now that “few days” turned into a few weeks banging my head against a wall learning the intricacies of HLSL and decomposing the version 1 mod with no comments which overall wasn’t very clear or efficient.

 

DCS 1.5 & 2.2 Current Status

 

Version 2.0.7 patch for DCS 1.5 & DCS 2.2

- FIXED random little bug, dcs has taken out a shader they still reference in their own code???

- JSGME ready, just extract to your JSGME mod folder and then install with JSGME

– Download Here

 

only a one file patch rather than a whole version so people keep all their settings :megalol:

 

 

Instructions

 

1. Extract from .rar to JSGME mod folder

2. Adjust variables in “JSGME MOD FOLDERFrenchys NVG Mod 2.0.6BazarshaderscommonMOD_nvg.hlsl” to change shape etc. You MUST change the variables before applying the mod in JSGME

3. Apply Mod in JSGME

 

Variables Guide

 

Render Mode:

 

0 = full screen,

1 = NVG with no ring,

2 = NVG with Ring,

3 = NVG with ring and slight zoom (not functional)

 

Eye Size and position:

 

EYE_CENTER = sets center point of NVG effect on screen as percentage of X and Y starting at bottom left corner. eg (0.5f, 0.655f) = 50% across and 65.5% up.

EYE_SIZE = Sets X and Y diameter of NVG as percentage of screen size. eg (0.47f, 0.75f) = 47% of width of screen and 75% of screen height. Since most monitors aren’t square the y value will have to be larger than the x value to make a perfect circle; the ratio between the two numbers will be the same as your monitor aspect ratio

 

Gain/Noise controls:

 

NVG_LIFT = gain multiplication value (.10 for A10 and .08 for KA50 are good starting points)

NVG_NOISE = noise division value, larger value means less noise (3 for A10 and 4 for KA50 are good starting points)

 

Ring Thickness:

Note – if using render mode 1 nvg will only be size of RInner. ie size = RInner(percentage) * Eye_Size = actual size.

 

ROFade = % radius of circle where black ring starts to fade out to regular view

RMerge = % radius of circle where black ring becomes 100% black on inside edge

RInner = % radius of circle where green NVG lens start to transition to black ring

 

I personally prefer a thin ring and this mod is released as such but some real world users (thank you Giaco) recommend the following ring sizes (that you need to set yourself):

 

static const float ROFade = 0.90f;

static const float RMerge = 0.65f;

static const float RInner = 0.63f;

 

Release History

 

Version 2.0.7 for DCS 1.5& DCS 2.2

- Just combination of V2.0.6 and the patch from 2.0.6.1 to avoid download issues

 

Version 2.0.6.1 patch for DCS 1.X & DCS 2.X

- FIXED random little bug, dcs has taken out a shader they still reference in their own code???

- download version 2.0.6 of mod (if you dont already have it.)

- copy this nvd.fx file into /my mod folder/Bazar/shaders/PostEffects/nvd.fx and over write the old one.

-apply mod like normal using JSGME etc.

 

only a one file patch rather than a whole version so people keep all their settings :megalol:

 

Version 2.0.6

– NATO and Russian NVG’s simulated with user controllable gain, noise/grain, size and ring thickness.

– Third iteration of my code development to simplify understanding and make more efficient.

– JSGME ready, just extract to your JSGME mod folder and then install with JSGME

 

- Download Here

- Re coded noise and gain code to something I understand and a little simpler

- Added user controllable gain and noise settings

---- NVG_LIFT = gain multiplication value (.10 for A10 and .08 for KA50 are good starting points)

---- NVG_NOISE = noise division value, larger value means less noise (3 for A10 and 4 for KA50 are good starting points)

 

- Ring thickness now user controlled by adjustable parameters. (SAME AS 2.0.5)

---- ROFade = % radius of circle where black ring starts to fade out to regular view

---- RMerge = % radius of circle where black ring becomes 100% black on inside edge

---- RInner = % radius of circle where green NVG lens start to transition to black ring

 

NOTE1: if using render mode 1 nvg will only be size of RInner. ie size = RInner(percentage) * Eye_Size = actual size

 

NOTE2: I personally prefer a thin ring and this mod is released as such but some real world users (thankyou Giaco) recommend ring sizes as follows (that you need to set yourself):

static const float ROFade = 0.90f;

static const float RMerge = 0.65f;

static const float RInner = 0.63f;

 

- As per 2.0.4 DONT USE render mode 3, not implemented yet (possibly never, personally not very interested in the effect since mouse clicking buttons don't line up)

- Adjust variables in "Frenchys NVG Mod 2.0.6BazarshaderscommonMOD_nvg.hlsl" to change shape etc.

 

Version 2.0.5

- Download Here

- Re coded lens, ring and overall mask equations. Neater code in my opinion

- Fixed laser mask issue (possibly discovered bug in DCS with regards to laser rendering - see black line on laser path outside NVG ring in picture below)

- Ring thickness now user controlled by adjustable parameters.

---- ROFade = % radius of circle where black ring starts to fade out to regular view

---- RMerge = % radius of circle where black ring becomes 100% black on inside edge

---- RInner = % radius of circle where green NVG lens start to transition to black ring

NOTE: if using render mode 1 nvg will only be size of RInner. ie size = RInner(percentage) * Eye_Size = actual size

 

- As per 2.0.4 DONT USE render mode 3, not implemented yet

- Adjust variables in "Frenchys NVG Mod 2.0.5BazarshaderscommonMOD_nvg.hlsl" to change shape etc.

 

Screen_151109_233001.jpg

 

 

Version 2.0.4

- Download Here

- Included render mode setting, sets which NVG type to use. 0 = full screen, 1 = NVG with no ring, 2 = NVG with Ring, 3 = NVG with ring and slight zoom (not functional)

- Render mode 2 is default.

- As above DONT USE mode 3, not implemented yet

- Adjust variables in "Frenchys NVG Mod 2.0.4BazarEffectscommonMOD_nvg.hlsl" to change shape etc.

 

render-modes.jpg

 

Version 2.0.3

- Download Here

- Include fade and ring at edge of lens, this is based off my own code and not Nrgizers. I understood what his code did but not how so I wrote my own version. It may not be the most efficient code??? but it works and I know how to troubleshoot it

- Adjust variables in "Frenchys NVG Mod 2.0.3BazarEffectscommonMOD_nvg.hlsl" to change shape etc.

- Minimal comments/instructions in code at the moment. Implementation is extremely similar to V1.0...

 

Screen_151105_131046.jpg

 

Screen_151105_131232.jpg

 

 

Version 2.0.2

- Download Here

- Added user controlled parametric mask for shape, size and center point of NVG lens.

- Removes reliance on mask.png

- Doesn't include fade or ring at edge of lens, this will be the focus of the next release.

- Adjust variables in "Frenchys NVG Mod 2.0.2BazarshaderscommonMOD_nvg.hlsl" to change shape etc.

- Minimal comments/instructions in code at the moment. Implementation is extremely similar to V1.0...

 

 

shape-comparison.jpg

 

Version 2.0.1

 

- Download Here

- Updated Nrgizers mod here to DX11 standard

- JSMGE ready, just extract to your JSMGE folder.

- Achieves same color, intensity and noise effects as Nrgizers for BOTH NATO AND RUSSIAN NVG.

- Shape still relies on the focus.png file for mask, ring and size (main priority for next release is to have procedural mask user controls)

- Lots of excess code, comments user variable parameters that currently have no effect.

- Mod includes a large wide view focus.png If you dont like it UNAPPLY the mod and delete "Frenchys NVG Mod 2.0.1BazarEffectsPostEffectsfocus.png" or rename to anything else and mod will use stock NVG field of view native to DCS 1.5

 

campare-Nato-2.0.1.jpg

 

campare-russian-2.0.1.jpg

 

 

Pre Release Development

 

Hi, first of the guys from the Online 1st Cav Div know me as frenchy and it is my normal online handle but cant change my one on here.

 

Second, I cannot and will not take any credit for the amazing appearance/effect this NVG mod generates, its all by nrgized here on this thread with the help of PeterP and few others (in future I will refer to this as Version 1).

With nrgized last being active 04-17-2013 08:53 PM I have taken it upon myself to update this mod so it works for DX11 DCS1.5

 

With DCS1.5/2.0 changing to DX11 pretty much all shader/appearance mods wont work since the HLSL (High Level Shading Language that pretty makes up 2D rendering output component of DX9/10/11) used by graphics cards was changed (for the better) between DX9 and DX10.

 

All my effort currently and in the future is to rewrite the code to the new HLSL standard and DCS file format so it works and appears just the same as how nrgizer had it working.

 

A quote of mine from the old thread. I want to emphasis I have no background in coding at all (self taught in the last 4 days) but all my maths studies at uni are giving me a nice advantage.

Hey guys, Uni is finished and this is number 1 on my to do list.

 

Spent all day breaking down the standard DCS NVG implementation and learning some basics of HLSL. Im now confident in how I need to go about making basic color and intensity changes.

 

Ive just started looking into what this actual mod did and how. Will take me a little bit (next few days around work etc) to figure it all out but I think I will be able to achieve something similar :) if not it will at least be stepping stones to getting close.

 

My plan of attack is first and easiest (i think) should be the color/intensities. next will be the noise (or lack thereof if the scene is bright) and then finally the zoom and ring.

 

PS. I dont have the black shark so the A10 is my primary concern but once done i might get the blackshark and try to do that one as well.

 

Currently I don't have anything to upload but I am very close to getting nrgizer's basic intensity and color look for the NVG working. I have also now realized that getting the Blark Shark look wont take much at all either. Expect both of these within the next 2 to 3 days :)

 

The zoom, noise and adjustable ring size will take a bit longer as the coding is a bit more involved, particularly the shader/hlsl side of things so I personally have a bit more work to do.


Edited by tacca
fixing image links because photobucket is a POS
  • Like 8
Link to post
Share on other sites
  • Replies 298
  • Created
  • Last Reply

Top Posters In This Topic

thanks!! Looking really good. One thing though. The mask that now is on horizontal makes the image looks like this, as in not centered. Also maybe it was set on vertical for VR headsets users?

(the green line, I draw it)

 

MEswZ2p.jpg

[sIGPIC][/sIGPIC]

I5 4670k, 32GB, GTX 1070, Thrustmaster TFRP, G940 Throttle extremely modded with Bodnar 0836X and Bu0836A,

Warthog Joystick with F-18 grip, Oculus Rift S - Almost all is made from gifts from friends, the most expensive parts at least

Link to post
Share on other sites
thanks!! Looking really good. One thing though. The mask that now is on horizontal makes the image looks like this, as in not centered. Also maybe it was set on vertical for VR headsets users?

(the green line, I draw it)

 

Hi Zaelu, Im guessing being from Nice English isnt your first language?? As in the description it is very wide (horizontal) for this version because it was easy. I am working on it to make it like the old modification where you can make the size and shape to whatever you like. It will be a few days before I achieve this though.

 

If anyone has screen shots of how the old mod looked in the KA-50 and MI-8 can you please post them; I dont own either of them so Im not exactly sure what they looked like shape wise.

 

Thanks

Link to post
Share on other sites

Hey tacca, yes I am living in Nice, France but english I know better than french... it was just fast diagonal reading... sorry :) . I like it like it is on horizontal better than round like it looks if old mask is used and also like in the nrgized mod.

 

as for how it looked in old mod on mi-8 you can see here:

 

ajJtODVdm1E

 

I think it will be beter to have option to have it horizontal oval or round. Also a bit more centered to the screen.

[sIGPIC][/sIGPIC]

I5 4670k, 32GB, GTX 1070, Thrustmaster TFRP, G940 Throttle extremely modded with Bodnar 0836X and Bu0836A,

Warthog Joystick with F-18 grip, Oculus Rift S - Almost all is made from gifts from friends, the most expensive parts at least

Link to post
Share on other sites
With the frame missing, this is already a huge improvement!

 

Do you mean you like it without the dark rim around the NVG circle??

 

Hey tacca, yes I am living in Nice, France but english I know better than french... it was just fast diagonal reading... sorry :) . I like it like it is on horizontal better than round like it looks if old mask is used and also like in the nrgized mod.

 

as for how it looked in old mod on mi-8 you can see here:

....

I think it will be beter to have option to have it horizontal oval or round. Also a bit more centered to the screen.

 

Thanks Zaelu, I get what you mean now about wanting it more centered vertically. The MI-8 cockpit is definitely a bit different to the huey. The huey/a10 panels take up alot more of the bottom half of the screen compared to MI8 hence my my higher nvg placement.

 

Im going to make it so that (by default but people can change if they want) for NATO craft it stays at the higher location but for russian aircraft it is more centered.

 

Got user defined parametric masks working this morning (ie in laymans terms the shape isnt defined by a picture, it is defined by numbers that every person can change to what they want). I will refine it a little before I release the next version

 

here is a quick example.

 

shape-comparison.jpg

Link to post
Share on other sites

What I meant earlier is that even without the frame border, the fact that you managed to get rid of the vanilla DCS green is a huge improvement IMO.

 

Keep up the good work! I'm surprised your progress comes at such a fast pace, currently we see updates every day!

Link to post
Share on other sites
What I meant earlier is that even without the frame border, the fact that you managed to get rid of the vanilla DCS green is a huge improvement IMO.

 

Keep up the good work! I'm surprised your progress comes at such a fast pace, currently we see updates every day!

 

Thanks Grand, when you come off full time 3rd and 4th year uni maths study (exams last week) while also working 4 days a week the brain is pretty well primed and ready to do stuff like this.

Link to post
Share on other sites

I have an idea, why do we bother to reduce that much the already reduced FOV? I mean the game has it maxed at 135° and is very ugly... most of people play with far less... I have it locked in most planes at 90° and very few at 105°. That is far less that +180° we have in real life and while the NVG systems do reduce that field FOV... if we add the fact the details are also reduced in the game... I think a mask that looks more like a vignette would be better suited... like the default one only larger. Something like this:

 

1zAnhvo.jpg

 

What do you say?

[sIGPIC][/sIGPIC]

I5 4670k, 32GB, GTX 1070, Thrustmaster TFRP, G940 Throttle extremely modded with Bodnar 0836X and Bu0836A,

Warthog Joystick with F-18 grip, Oculus Rift S - Almost all is made from gifts from friends, the most expensive parts at least

Link to post
Share on other sites
I have an idea, why do we bother to reduce that much the already reduced FOV? I mean the game has it maxed at 135° and is very ugly... most of people play with far less... I have it locked in most planes at 90° and very few at 105°. That is far less that +180° we have in real life and while the NVG systems do reduce that field FOV... if we add the fact the details are also reduced in the game... I think a mask that looks more like a vignette would be better suited... like the default one only larger. Something like this:

....

What do you say?

 

I dont recommend having the nvg view take up the whole space. As per real life we can easily look under and to the sides beyond the nvgs when needing to see things not under nvg. This is something that was so great with the 1.2 nvg mod as i could easily look at mfds or whatnot while still having a nvg point of view outside of the pit. Downside to the whole screen being a nvg view is you wont have that realistic view point.

 

Hey guys,

 

thanks for the input. The reason why the original mod was so great that with the change of a few numbers anyone can achieve the size and position they want. This is now already implemented in my version 2.0.2 and within the next couple of releases I will include full instructions


Edited by tacca
clarification
Link to post
Share on other sites
Thank you for this!!

 

One problem though,

I have a 4th monitor for MFD extraction,

And when I turn on NVG - the 4th screen turns white/very bright...

How can it be constrained only to the main monitor??

 

Thanks!

 

Hey ron, not 100% sure how that is happening. Im a poor uni student with a single 1650 * 1080 monitor so not sure how to recreate the problem. It will most likely have to do with the perceived position of the MFD when you capture/export the data.

1st I want you to check what happens as you turn the nvg gain down, im hoping the MFD will become visible and eventually turn black as the gain goes to 0. If it does then its a mask problem.

 

The NVG use a mask to apply the effect (like photoshop layers) that is calculated procedurally. ie if this pixel (x,y) is inside this area (defined using equations for ellipses) then apply the effect, if outside this area do nothing. It will be a matter of figuring out why the mask is getting applied....

Link to post
Share on other sites

Frenchy, if I understand you correctly there are 3 variables in play here:

 

- Size

- Shape (circle vs oval)

- X, Y position of the center

 

Could you give us a quick explanation where to alter them? I'm especially interested in keeping it circular but increasing the size of the circle and if needed reposition the center of the circle.

 

edit: OOOOPS!

 

I just read the comments in the files. :)


Edited by Grand
Link to post
Share on other sites
Frenchy, if I understand you correctly there are 3 variables in play here:

 

- Size

- Shape (circle vs oval)

- X, Y position of the center

 

Could you give us a quick explanation where to alter them? I'm especially interested in keeping it circular but increasing the size of the circle and if needed reposition the center of the circle.

 

edit: OOOOPS!

 

I just read the comments in the files. :)

 

Glad you found the comments within the file. For other people, written in the first post

Adjust variables in "\Frenchys NVG Mod 2.0.1\Bazar\Effects\common\MOD_nvg.hlsl" to change shape etc.

 

and this post from the original version still applies pretty accurately

http://forums.eagle.ru/showpost.php?p=1654769&postcount=12

 

the thing to keep in mind is that nvg size is a percentage of screen width and height, and since our monitors aren't square if we want to keep the nvg as a circle the width percentage will be less than that of the height percentage by something similar to the aspect ratio of the monitor


Edited by tacca
Link to post
Share on other sites
×
×
  • Create New...