Beta Test Note: This page is still in development for series 9, and will probably be updated in the future. Current features and downloads are experimental.


I have been experimenting with a completely new Dynamic Night Eye Shader effect for use in conjunction with the Oblivion Reloaded mod. It is significantly more advanced than what I was using with scanti's Switch Night-Eye Shader Plug-in.

Tools required

You can even experiment on your own outside the game to determine which settings work best for you. To do so, you will need to download and install some tools:

Shazzam!

Shazaam is a free tool for developing 2D hlsl shaders. The SDR Dynamic Night Eye Shader was developed on it. You will need it in order to experiment. It can be downloaded by clicking here. It's easy to install and has built in tutorials. When you first launch it, you will see a bunch of tabs at the top. These tabs allow you to preview your settings with a variety of images. You can also load your own. And I have provided some screen shot compilations below that you can use if you think it will help. Also note the "Compare" option. I find that very useful since the original image will be on the right and the altered image on the left.

SDR Night Eye .fx

There are a couple of .fx shader files you can experiment with. The first one I uploaded (on 3/23/2016) is sdrNightEye_beta_01. The more recent one (uploaded on 3/28/2016) which simplifies the brightness calculation by merging Threshold and LightLevelBrightnessImpact into one setting as well as some other minor tweaks is sdrNightEye_PS3_beta_03. Download them to a folder of your choice. When you launch Shazzam, you can then load the .fx file into it and start experimenting right away. See below for details on the settings and how to experiment.

Image Resources

In addition, I have created two compiled images that incorporate four screen shots as well as a color wheel. When experimenting, you can load one of the images and immediately see what affect your settings have. You can see them below. Just right click and save them to whichever folder you will be using for your experimenting.

Note: The "LL#" is the light level that was hitting the player at the time the screen shot was taken.

Sampler #1

Sampler #2

Working with Shazzam

Following is a quick tutorial to get you up and running.

General Info

The Shazzam Interface is split up into three sections: The Shader Loader/Settings panel on the far left, the Code/Tryout section on the bottom right, and the preview section on the top right.

Shader Loader

Click on the Shader Loader to view your options. There are three tabs: Your Folder, Sample Shaders, and Tutorial. Use the "Your Folder" to load up the sdrNightEye_beta_01.fx file.

Shazzam Settings

Click on Settings to vew your options. In order for Shazzam to properly test the sdrNightEye_beta_01.fx file, you have to make sure that Shazzam is targeted for the proper framework. Select WPF PS_3 for the sdrNightEye_beta_01.fx file. PS 3 stands for pixel shader 3.0, which can handle up to 512 instructions. PS 2 stands for pixel shader 2.0, which can handle up to 64 instructions. Oblivion Reloaded supports both PS 2 and PS 3. Scanti's Shader Night Eye Switcher plugin only supports PS 2.

Loading an Image

Click on "File" in the upper left corner and then select "Open Image File", or type Cntrl+i.

Select the image you want to use to preview the shader. I recommend using the ones I've provided, but of course you are free to use whatever image you want. The selected image will load into the "Custom Image" tab in the preview section. It's also worth going through the other tabs. The Compare tab is particularly handy since it will show you the original image and the altered image side by side.

Compiling/Applying the Shader

If you got an error the first time you loaded the shader, it was probably because the settings were set for WPF PS_2. After switching the setting over to WPF PS_3, you will need to recompile/apply the shader. Hit "F7" to compile it and then "F5" to apply it.

Also, if you decide to play around with the code, you will need to compile and then apply it every time you make changes. If you do decide to mess with the code, I recommend File/Save As and creating a duplicate so that you can always go back to the original code if things get messy.

Tweaking the Settings

In the lower right section, to the right of the tab that has the shader code loaded you will see a tab labeled "Tryout (adjust settings)". If you click on that tab, you should see a variety of sliders that allow you to tweak the brightness, color balance, saturation, mix, and tunneled effects. Details follow.

Explanation of the Settings

To provide maximum flexibility, there are numerous settings. Following is a description of each setting and how to apply them using Shazzam. I have yet to decide on what the settings will actually be called when implemented in SDR. It will depend on the feedback I get.

Light Level

Description: The Light Level variable represents how much light is hitting the player.
Value Range: Light Level scales from 0 (total darkness) to 100 (broad daylight/maximum firelight).
Game-play: In game, you can determine how much light is hitting the player (or any actor for that matter) with a scripted function "GetActorLightAmount".
Settings Options: In the game, when the Dynamic Night Eye shader is active, the light level will be constantly updated for you, so no settings required.
Experimentation: In Shazzam, the variable is included as a slider so that you can preview what happens with your various settings as the light level changes.
Detection Impact: Light Levels are using all the time in calculating the visual portion of the detection formula.

Threshold

Description: The Threshold setting determines how much brighter everything becomes.
Value Range: Threshold ranges from 0 to 100.
Game-play: At 0, brightness is exactly the same as normal vision. At 100, really bright areas start to get blown out a bit.
Settings Options: I would recommend a Threshold of somewhere between 50 and 75, but feel free to adjust to taste. This setting does not change or get modified during active gameplay.
Experimentation: In Shazzam, Threshold defaults to 50 in a range of 0 to 100.
Detection Impact: This setting absolutely impacts the detection formula, because if everything is brighter for you, then anyone else with Night Eye should receive the same benefit. The detection formula math mimics the effects of how the selected Threshold impacts the brightness of what you observe.

Light Level Brightness Impact

Description: This setting determines to what degree the current Light Level hitting the player affects the brightness levels determined by the Threshold.
Value Range: Brightness Impact ranges from 0 to 100.
Game-play: At 0, the brightness increase will be calculated the same regardless of light level. At 100, advantages to Threshold are completely negated when the Light Level reaches 100, and everything else scales accordingly in between.

Example: Assuming you go with 100 Brightness Impact and a Threshold of 75, let's say you are in a relatively dark dungeon, and the light level hitting you is 20. That would mean the darker areas would be brightend quite a bit. However, if you were to light a torch, which provides a light level of 100, the brightness of the torch and its proximity to you would interfere with the Night Vision. So although the immediate area within the torch radius would be brightened by the torch far more than your Night Vision provided, distant areas that were once brighter will now be back to their normal light levels as if you had normal vision.

Settings Options: If you want the brightness to be constant all the time, choose 0. If you want your vision to be 100% normal brightness in broad daylight or in close proximity to bright firelight/torchlight, choose 100. If you want a bit of a mix between the two, try picking something between 40 to 60. This setting does not change or get modified during active gameplay.
Experimentation: In Shazzam, Brightness Impact defaults to 100 in a range of 0 to 100. I would recommend experimenting with this variable, the Light Level slider, and the Threshold slider first before experimenting with colors.
Detection Impact: This setting also impacts the detection formula since it impacts the effectiveness of the Threshold setting in various lighting conditions.

Light Level Color Impact

Description: This setting determines to what degree the current Light Level hitting the player affects the color mix between the color/saturation settings for Night Vision and regular/normal vision.
Value Range: Color Impact ranges from 0 to 100.
Game-play: At 0, the color/saturation settings will apply constantly, regardless of light level. At 100, all colors/saturation return to normal when the Light Level reaches 100, and everything else scales accordingly in between. It functions essentially the same as the Brightness Impact setting, except that it affects the color mix.
Settings Options: If you want the Night Eye color/saturation to be constant all the time, choose 0. If you want the colors to return to normal in broad daylight or in close proximity to bright firelight/torchlight, choose 100. If you want a bit of a mix between the two, try picking something between 40 to 60. This setting does not change or get modified during active gameplay.
Experimentation: In Shazzam, Color Impact defaults to 0 in a range of 0 to 100. You will need to alter some of the color settings first before you can see how this will setting will affect the visuals.
Detection Impact: This setting does not impact the detection formula.

Tunnel Factor

Description: This setting determines to what degree a "Tunnel Vision" effect hits the player.
Value Range: Tunnel Factor ranges from 0 to 100.
Game-play: The tunnel vision effect represents the concept that those that have highly sensitive night vision get sensory overload in bright light. Visually this will be a fuzzy/cloudy/darkness that shows up in a bit of an oval pattern around the edge of the screen. The thickness/depth of the tunnel varies by how much light is hitting the player. At 0 Light Level, the tunnel disappears. At 100 Light Level, the tunnel is at its maximum depth/thickness.
Settings Options: At 0, the tunnel vision effect is disabled. At low levels, the effect is barely noticeable. At high levels it might get obnoxious in bright light. I would recommend somewhere between 40 to 60.
Experimentation: In Shazzam, Tunnel Factor defaults to 0 in a range of 0 to 100. I recommend experimenting with the Light Level slider at full 100 so you can see how bad it can get, then dial it down from there.
Detection Impact: This setting does not impact the detection formula.

Color Balance

Description: These settings determine how strong the Red, Blue, Green, Yellow, Cyan, and Magenta colors are relative to each other.
Value Range: Color Balance ranges from -100 to 100 for each color spectrum.
Game-play: The color balance settings are fixed during active gameplay. The impact of which can be modified by Light Level and the Color Impact setting.

Example: Assuming you have a Color Impact setting at 100, this is how it would work. At 0 light level, the colors will be balanced to the full extent of the settings you selected. As the light level scales up towards 100, the mix between your set color levels and normal levels will be mixed proportionally. When the light level reaches 100, the color balance levels will return to 0/normal as if Night Eye was not in effect.

Settings Options: There are three color balance variables: Cyan-Red, Magenta-Green, and Yellow-Blue. For every point up or down for a given color variable, the other two color variables go up or down half that amount in the other direction. This makes sure that the overall brightness doesn't change too much so that any changes here primarily affect just the color balance.
Experimentation: In Shazzam, the Color Balance variable has three sliders marked X, Y, Z. The X slider represents the Cyan-Red spectrum, where negative numbers push towards Cyan and positive numbers push towards Red. The Y slider represents the Magenta-Green spectrum, where negative numbers push towards Magenta and positive numbers push towards Green. The Z slider represents the Yellow-Blue spectrum, where negative numbers push towards Yellow and positive numbers push towards Blue. All three settings default to 0, which is the current color passed to the shader by the original image. The extremes at -100/100 are intentionally overblown so that you have a nice gamut of options available.
Detection Impact: This setting does not impact the detection formula.

Color Desaturation

Description: These settings determine how saturated the Red, Blue, Green, Yellow, Cyan, and Magenta colors are relative to greyscale.
Value Range: Desaturation values range from 0 to 100, where 0 is normal/fully saturated and 100 is completely greyscale.
Game-play: The desaturation settings are fixed during active gameplay. The impact of which can be modified by Light Level and the Color Impact setting.

Example: Assuming you have a Color Impact setting at 100, this is how it would work. At 0 light level, the colors will be desaturated to the full extent of the settings you selected. As the light level scales up towards 100, the mix between desaturation and normal levels will be mixed proportionally. When the light level reaches 100, the saturations levels will return to 0/normal as if Night Eye was not in effect.

Settings Options: There are six desaturation variables, one for each of the three primaries (Red, Green, Blue) and three secondaries (Yellow, Cyan, Magenta).
Experimentation: In Shazzam, there are two groups of three Desaturation settings. The first group handles desaturation for Red, Green, Blue, using the X, Y, and Z sliders respectively. The second group handles desaturation for Yellow, Cyan, and Magenta, using the X, Y, and Z sliders respectively. All three settings default to 0, which is the current color passed to the shader by the original image. Although the desaturation ranges from 0 to 100, it desaturates very quickly in the 0 to 40 range. The impact then slows down after that. The brighter parts of the spectrum desaturate first and then the desaturation continues to permeate through darker variations until you get to 100 which should be complete greyscale for that color. To have everything 100% grey-scale, set all six sliders to 100.
Detection Impact: This setting does not impact the detection formula.

Interior vs. Exterior Option?

One of the options I have been considering is allowing for two groups of settings for the Color Balance and Saturation variables. One group kicks in when the player is in an exterior setting, and the other kicks in when the player is in an interior setting. I would like some feedback from anyone who experiments to see if that is something they would like to have.