This is a small tutorial on how to make vision files and add a script to change them dynamically with triggers. This helps to make each area of your map unique with different filters, you map can go from this:
To this:
It might not look like too much, but you can make areas look more bright and colorful or the total opposite, making them dark and greedy, to add that extra layer of visualization, so let's begin:
1. First off all we need to know exactly what we want in our vision files, to achieve this run your map after compiling it and open the console, there we can use the following commands:
r_filmUseTweaks = Defaults to 0 (can be changed between 0 to 1), overrides the actual vision file with default values.
r_filmTweakEnable = Defaults to 0 (can be changed between 0 to 1), enable the tweaks you can manually do (you need this and r_filmUseTweaks to see changes in real time).
r_filmTweakBrightness = Defaults to 0 (can be changed between -1 to 1), changes the Brightness of the filter.
r_filmTweakContrast = Defaults to 1.4 (can be changed between 0 to 4), changes the contrast of the filter.
r_filmTweakDarkTint = Defaults to 0.7 0.85 1 (any of these values can be change between 0 to 2. Admits decimal values), changes the dark tint of the filter which influences the tone of the dark colors. The values correspond to the RGB values of the filter, being 0.7 = Red, 0.85 = Green, 1= Blue.
r_filmTweakSaturation = Defaults to 0.2 (can be changed between 0 to 1), changes the saturation of colors, so high values make things look grayscale.
r_filmTweakInvert = Defaults to 0 (can be changed between 0 to 1. It doesn't admit decimal values), invert all the colors of the filter, making it look like negative
r_filmTweakLightTint = Defaults to 1.1 1.05 0.85 (can be change between 0 to 2. Admits decimal values), changes the light tint of the filter which influences more vivid colors and overall illumination of the map, follows the same excheme as darktint.
Also we can modify the glowing effect (known as bloom) so light sources and light reflection can be bright or less bright, these are all the values we can modify for the glow effect:
r_glow = Defaults to 1 (can be changed between 0 to 1), enables and disables the glow effect.
r_glow_allowed = Defaults to 1 (can be changed between 0 to 1), same as r_glow.
r_glowUseTweaks = Defaults to 0 (can be changed between 0 to 1), overrides the actual glow values with default ones
r_glowTweakEnable = Defaults to 0 (can be changed between 0 to 1), enables the tweaks you can manually do to the glowing effect.
r_glowTweakBloomCutoff = Defaults to 0.5 (can be changed between 0 to 1), changes the distance when the bloom is cut off.
r_glowTweakBloomDesaturation = Defaults to 0 (can be changed between 0 to 1), changes the desaturation of the bloom effect, so it can go into grayscale instead of editing the actual filter.
r_glowTweakBloomIntensity = Defaults to 1 (can be changed between 0 to 20. Admits decimals), changes the intensity of the bloom effect
r_glowTweakRadius0 = Defaults to 5 (can be changed between 0 to 32. Admits decimals), changes the radius of how far the bloom effect travels.
r_glowTweakRayExpansion = Defaults to 0 (can be changed between 0 to 4. Admit decimals), this changes how far the sun rays travel when looking directly at the sun.
r_glowTweakRayIntensity = Defaults to 1 (can be changed between 0 to 20. Admit decimals), changes how intense the sun rays glow.
After we played a bit with all the different values we can tweak we might get a result that we enjoy, now we need to make a file and import it into our map with these values
2. Go to your waw directory and open the "raw>vision" and copy "zombie_factory.vision", change the name of the file to whatever name you want and open it. Once you open it you can see there's all the different values we manually modify inside our map, now add them to this file to save the values.
3. Once you're done with your vision file add this line to your map's mod.csv:
Code Snippet
gamescript
rawfile,vision/your_vision_file_name.vision
4. Now go to your mapname folder, go into "maps>createart" and open "mapname_art.gsc" and modify this line to add the name of your vision file:
And we're done adding a custom vision file into our map.
(Optional) Now i'll show you a script to change them in real time, so you can have different vision files for unique areas or made indoors/outdoors filters :
1. Go to your map folder, inside "maps" open your "mapname.gsc", scroll to the bottom and add this (There's some commented code to debug your vision file triggers):
You need to add your vision file name under the script_noteworthy value
And you're done, you should have now a custom vision file and a script to change them whenever a player touch the triggers. For any questions or errors just leave a comment