Introduces a shader based NVG effect to Stalker Anomaly, instead of the more limited .ppe effect. Currently replaces Gen1 thru Gen3 head mounted NVG effects. Can be expanded by modders to create additional effects, such as non-fullscreen NVG scopes and other possibilities.
Beef's NVGs v0.9 is archived for helping resolve any mods who have dependencies on it, v1.0 will be uploaded soon(tm).
Beef's Shader Based NVGs v0.9
Settings for "Best Visuals" still in-progress
Preview - (slightly outdated)
**********************************************
MUST READ THIS SECTION
**********************************************
Functions on DX10/11 only - future DX8/9 compatibility is possible, but I'm not touching it until after I get v1.0 of the NVGs completed.
After installing this mod or making any adjustments to night_vision.h, you must restart the game and select DELETE SHADER CACHE or changes will not take effect. The Anomaly launcher recompiles its shaders from the gamedata/shaders folder ONLY if this option is checked. Once you have done this once, you will not need to do it again unless you make changes to head_mounted_nvg_shader.h or other shaders.
**********************************************
END MUST READ
**********************************************
- v0.9 - complete rewrite, introduces tons of new bugs, but improves performance/adjustability
- v0.85 - updated for RC19 compatibility - patches may be out of date
- v0.84 - updated all compatibility patches for Feel_Fried's animations
- v0.83 - version update for the people who downloaded .82 before I ninja-updated an error
- v0.82 - added compatibility patch for Nav's Definitive Masks
- v0.81 - added two new configurations, brighter and brighter+arcade
- v0.8 - fixed distortion, improved effects, implemented new features, uploaded to MODDB
Installation Steps:
1: Install Beef's NVGs
2: Profit
Please provide any feedback or bug reports so I can get v1.0 out the door and into your hands.
Intent:
I want to create NVGs for Stalker that mirror real-life NVGs, without overdoing it. Likewise, I also want these NVGs to be highly configurable, to allow users to edit them without having to dig through files to change lines of code. To achieve this, I created this shader-based NVG effect to fill what I saw as a missing piece of the Stalker experience.
Current features:
- NVGs allow unaltered, but somewhat limited, peripheral vision, since real-life NVGs do not fully obscure the entire FOV of their users
- NVGs are depth aware now, dimming far objects (with the exception of light sources) to mimic light attenuation
- Another depth effect, close objects are blurred, mimicking the limited DOF that NVGs have
- CRT, noise, and scintillation effects are added to mimic the visual effects of image intensifier tubes
- Washout on overlight bright objects is implemented (although can produce visual artifacts at times still)
- NVG color satuation is adjustable
- Adjustable vignette effect applied on the border of NVGs
- Added the headlamp switching animation to the NVG enable/disable effect
- Improved bloom effect, although it can't be further improved until further shader pipeline improvements :(
Partially implemented:
- Gen1 NVGs have multiple pre-configured options allowing for offset to the L or R, or centered, no keybind or user-selectable option created yet
- NVG color satuation, vignette, noise, blur, light attenuation, and many other settings are easily adjustable and fully commented with descriptions in night_vision.h, but not yet available to edit once in-game (will add options tab in future implementation)
Future implementation:
- Create tab within the options screen allowing users to select various presets or create their own preset for each NVG generation
- Create a visual turn on / turn off effect beyond the vanilla sound effect
- Add 2d overlays for greater immersion at the cost of peripheral vision
- Create or assist modders in implementing the NVG shader for 2d and 3d scopes.
Hello, I'm reporting that headlamp switching animation to the NVG enable/disable effect does not work on 1.5.1.
That is correct - unfortunately I was not able to get the animation to play correctly for v0.9 of my mod due to complete rewrite of how the shaders, and therefore the .script, function.
Once I get everything ported to a standalone .script, I have many more functions that will enable things like low battery indicators, adjustable brightness, turn-on/turn-off animation for the night vision tubes themselves, and glitch effects when you have damaged night vision devices or during blowouts. As well as the headlamp switching animation. There is much yet to do for the NVG mod, and you'll see most of this as I slowly work my way towards v1.0 of the NVG mod
This comment is currently awaiting admin approval, join now to view.
this work in Dx8?
No. With release v1.0 I'll get DX9 support added, but not DX8 unfortunately. It will take more time than I am able to commit to make it work.
Really good work, one of the best depictions of NVGs I've seen in any game.
Thanks - it's still got a way to go before its good.
Is there a guide how to edit the files?
It has too much bloom for me, things being too bright, mine don't look like it does on your video.
in night_vision.h, you can change lines 62 and 63 (gen_1_bloom_threshold and gen_1_bloom_multiplier) so that the threshold is higher (where the washout is applied) and the multiplier is lower (which impacts the intensity of the washout when its applied). You can do the same for the gen_2 and gen_3 to adjust them to your liking
Some of comments in night_vision.h are somewhat out-of-date as I haven't gotten around to cleaning them up just yet.
Hey!
Does this work with ENHANCED SHADERS AND COLOR GRADING?
Really want to use this mod with newest provaks Anomaly weapon overhaul v2.3, but it uses enhanced shaders and color grading, so this might not work anymore. Could you maybe add compability patch? Thanks for great visual mod!
There's a compatibility patch I put out on Discord, but I didn't post it here yet since it ends up being washed out with the enhanced shaders and color grading mod.
Привет. С чем может конфликтовать столь великолепный мод?
Играю на DX9 (R2a) - эффектов, увы, нет.
еще не работает с DX9 - когда закончу v1.0, портирую на DX9
I do not display the effect of NVG at all, and I also do not have a NVG mask. Possibly influenced by "P.R.O.S.P.E.R.I.T.Y Reshade".
Are you using DX10 or DX11? Did you check the "clear shader cache" box in the launcher after enabling the mod?
Reshade shouldn't impact any of the display, the only conflict would be that could make the colors different or too bright/dark or something along those lines.
ok, I cleared the shader cache and it worked. And yes, I see almost nothing in the first 2 NVGs, perhaps due to the influence of "P. R. O. S. P. E. R. I. T. Y Reshade". Can I get around this somehow? (I use the preset Light and DirectX 11)
because of your addon, i'm taking naps during the day, so i can go out at night with my nvgs... taking caffeine pills (and other stuff ;) to keep my stalker awake. why bro? lol
all joking aside, great work man!
Thanks, it's got a long way to go until v1.0, but it's a step in the right direction and will continue to improve over the coming months. EFT and Arma3 using ACE3 both have decent NVGs, but EFT's are too "movie" style, and the ACE3 ones are still somewhat off.
The biggest limiting factor is my knowledge of shaders and LUA, or progress would be much faster (since I started learning to code only 7 months ago).
i like your addon but since I add this in my list Moddb.com you addon doesent work anymore can you make it compatible please
Since both this and my Remove Dropping Weapons from Damage mod edit the same files, I have made a compatible version of my mod. It's already available for download. First you install Beef's and then mine. Moddb.com
Is it possible to use this mod with ENHANCED SHADERS AND COLOR GRADING FOR 1.5.1? Moddb.com EDIT: I've seen that you have already answered to a similar post some time ago. I think that this mod is great, it would be wonderful if it could be mixed with Enhanced etc.
In the forum I've seen someone who managed to create picture-in- picture. I don't know if it's worth it, but maybe it's an idea.
There's an older version of the compatibility file over on discord that works with enhanced shaders, but to be honest it looks like crap when they're combined. I've been busy with real life the past few months so I haven't made enough progress yet where my shaders are easily configurable. Until I get the configurations exposed to the end-users in the options menu there's really no point in the compatibility with enhanced shaders and color grading.
i been trying to reduce the brightness on the night_vision.h file but i can't make it work, i deleted the shader cache on the anomaly launcher, idk what to do. Every texture that is a little more clear than the other in the outside (like walls and stuff like that) look too brighty, anyway how to fix this? or is intended to be like this, also when i'm inside a building and is dark, the night vision looks like bright white, and i can only distinct my weapon.
great mod btw tho :/
It's likely got to do with the bloom - try reducing the bloom values in night_vision.h
I'm (slowly) working on building it so everything is configurable from the options menu and there's a few presets...
i cant get it to work even though im on dx 10?
Do you crash? If so, could you put the last lines from the log file that have the shader errors into pastebin? I don't have trouble running it on DX10 but perhaps there's something I missed
im sorry i found what the problem was. it was a clash with my current shaders and another mod, because sometimes it doesnt set properly so i had to restart a few times but it works now
Thanks for this mod man.
Is there any way to make the on/off animations play on 1.5.1?
greetings
Hey. I got a problem. The NVG works wonders but i don't get any vignette at all. It's just a green circle in the middle of the screen with the regular image around it. Is there any fix for it?
Hi. In my understanding of your description, that is intentional. It simulates wearing a NVG without eyecups so one can see the periphery without light amplification. For more info on this topic, take a look at this video (https://www.youtube.com/watch?v=sOrUP0Rq6Jg). Probably there is an option somewhere in the mod to adjust the vignette, but I don't know where.
hello. im new to mods. i downloaded the mod, and tried to install it on MO2, but MO2 keeps saying that the mod is invalid and wont let me install
really good addon.how can i make NVGs less light sensitive? everything is too bright
any hope for dx8 ?
Hi, i got shader error compiling using last anomaly version, how i can solve? (i do the shader reset in anomaly launcher)
So this bloom thing bothered the **** out of me and my mod organiser didn't detect any overlap with other mods. So I investigated because I literally spent 30 minutes editing night_vision.h (and it didn't do a difference if I set all values to 0 or all to 1) and after looking at the code it was sound so... The blooming issue seems to happen when you have Michiko's Weather Revamp active (along with the Soundscape Overhaul Patch / Weather Revamp patch).
Why? I have no freaking clue.
I put an album here to show the issue: Imgur.com
Is there a way to adjust the brightness of the NVGs in the files?
See above posts:
It's likely got to do with the bloom - try reducing the bloom values in night_vision.h
I'm (slowly) working on building it so everything is configurable from the options menu and there's a few presets...
I have this weird problem with the mod. I installed the mod, ticked the option "delete shader cache", started the game from the launcher and it failed immediately, saying "shaders failed to compile". Here's the crash log:
Drive.google.com
My solution was to deactivate the mod, relaunch the game, make sure the loaded save is successfully loaded, save again, exit the game then activate the mod. Everything works fine.
But once I go to a different map, the game crashes again, showing the same prompt "shaders failed to compile". I will then have to exit the game, deactivate the mod, load the save (for the new map my character is in), save the game, exit and reactivate the mod. Things work fine.
Not something on the level of game-breaking bug but not exactly convenient either. I also find it weird that no one here has the same problem.
I'm running the game on DX11 and using provak's weapon pack.
I hope you can help, as I notice this is THE ONLY NVG mod that works with PiP scopes. I guess that's the good thing about shader-based NVG right ( ͡° ͜ʖ ͡°).
Hey, I installed this and Enhanced Shaders and Color Grading, and it seems that the edges of the night vision have become clear or at least transparent enough to where I can clearly distinguish colors where it's meant to be black. Reinstalling the NVG mod over the shaders mod causes a compliation fail error. Any fixes?
so does it fix long range scopes where you see sprite of scope normal colour and everything else in Night Vision colour
does it work with BaS?
I use it with BaS, they work just fine together.
Is there any way to replace the overlays....very awesome work by the way
For some reason I cannot turn on night vision with this mod installed. I press my key bind and nothing happens. Sorry for the bother but do you know why this could be happening? I tested with no other add-ons. I am on DX11 btw
I assume it isn't compatible with Enhanced Shaders and Color Grading?
the blur on the near plane is too much. Is there a number I can tweak somewhere. To reduce it by "about half"
edit: found some knobs in night_vision.h that look promising
Why is everything so bright?
Media.discordapp.net
It's a pity that development has stopped
Or has it? Slowly working on a version that fixes some of the frustrations I have with the current pipeline, for instance by separating the rendering pipeline image / albedo / lighting channels as the data progresses through each of the shaders in order to achieve a more realistic depiction of night vision. I won't state a definite date to be done, but will be a large improvement, similar to the current v0.9 being a large improvement over the v0.8 series.
Hello,
I just want to point out that the config file is extremely wrong and so many things are not clear or bad.
The best example I can give is the blur part:
// NVG BLUR OPTIONS: (DEPTH INFLUENCED, CLOSE OBJECTS ARE AT MAX BLUR, FAR OBJECTS ARE AT MIN BLUR)
#define gen_1_min_blur_factor float (0.25) // Gen 1 - minimum blur applied to image (at far distance), 1 is no blur, higher is more
#define gen_1_max_blur_factor float (0.95) // maximum blur applied to image (at camera)
#define gen_2_min_blur_factor float (0.2) // Gen 1 - minimum blur applied to image (at far distance), 1 is no blur, higher is more
#define gen_2_max_blur_factor float (0.8) // maximum blur applied to image (at camera)
#define gen_3_min_blur_factor float (0.1) // Gen 1 - minimum blur applied to image (at far distance), 1 is no blur, higher is more
#define gen_3_max_blur_factor float (0.6) // maximum blur applied to image (at camera)
Here you say that 1 is no blur and higher is more. So first off that means gen 1 have less blur than gen 3, which feels off.
Next, it's written Gen 1 on the desc after // but it's fine.
And finally, 1 is FULL blur not NO blur, I have tested it by setting it to 1 and it's more blury than the original settings.
And there is so many things like that, considering it's already a pain to restart the game and load to test new settings, making the whole document false doesn't make things easier, it's very frustrating.
There's also a lot of settings that I personally do not understand at all, and I'm probably not the only one because effects of changing this or this setting isn't always easy to understand (the mistakes not helping that of course).
I would suggest a total rewrite of the config file, just go in, read everything, you must know what every settings do since you're the creator so that shouldn't take years to rewrite. At least doing that until you do some correct in-game settings like you planned.
Thank you for reading,
Have a nice day
You've got a few things wrong. For example:
You say: "Here you say that 1 is no blur and higher is more. So first off that means gen 1 have less blur than gen 3, which feels off."
If you pay close attention to the file, you will see that the variables differ in min and max.
See here:
gen_1_min_blur_factor float (0.25)
--> Gen 1 has applied far distance blur value of 0.25.
Now see this:
gen_2_min_blur_factor float (0.2)
--> Gen 2 has applied a lower far distance blur value than Gen 1.
The variables in between are defining the max blur values.
And now you can see that Gen 1 has the highest blur values while higher Gens have lower blur values. Keep in mind that every Gen has 2 configuration lines for each blur definition: min blur factor and max blur factor. After these come the next Gen.
So the file is absolutely right. You just didn't pay enough attention to it :)
Shader development is a tricky thing. So you can be certain that this guy knows what he is doing.
Thanks, but it's also not very intuitive currently - it will be much easier to use an in-game settings menu, or at least be able to tune fewer options in order to achieve more specific results without them interacting with each other and requiring hours of guess and check, as they currently do.
Thanks - and yes, the comments in the config aren't 100% correct anymore unfortunately, as it's on its third rewrite and therefore some things aren't clear and/or are now incorrect.
That's why I'm working on the new version that uses an entirely new rendering method to avoid all the troubles we're currently having with brightness varying between machines and the fact I can't implement an autoexposure feature with the current way.