09-21-2011, 16:02
Hello,
A new tutorial, this one is about creating custom visions without using new vision files. For it we are going to use dvars with the command SetClientDvar. Example:
That example will give you more or less a sepia vision(I messed around a bit to get sepia but is not 100% true sepia).
Info:
The dvars you should use are the r_something, most of them are relationated with vision, this is a list copied from @d0h! post:
Now, lets use a good and easy function to make more and call them easily
Now just do and enjoy your "custom" vision:
Thats it,
A new tutorial, this one is about creating custom visions without using new vision files. For it we are going to use dvars with the command SetClientDvar. Example:
Code:
self SetClientDvar("r_blur",0.62);
self SetClientDvar("r_brightness",0.05);
self SetClientDvar("r_contrast",1);
self SetClientDvar("r_glow",1);
self SetClientDvar("r_glow_allowed",1);
self SetClientDvar("r_glowRadius0",0);
self SetClientDvar("r_glowBloomCutoff",0.97);
self SetClientDvar("r_glowBloomDesaturation",0.61);
self SetClientDvar("r_glowSkyBleedIntensity0",0.25);
self SetClientDvar("r_filmEnable",1);
self SetClientDvar("r_filmInvert",0);
self SetClientDvar("r_filmBrightness",0.14);
self SetClientDvar("r_filmDesaturation",0.98);
self SetClientDvar("r_filmLightTint","1 0.7 0.32");
self SetClientDvar("r_filmDarkTint","1 1.05 0.9");
self SetClientDvar("r_spotLightBrightness",14.32);
That example will give you more or less a sepia vision(I messed around a bit to get sepia but is not 100% true sepia).
Info:
Spoiler (Click to View)
If you are worried about space and long codes check here the SetClientDvars command:
http://www.itsmods.com/forum/Thread-Rand...ngs-2.html
http://www.itsmods.com/forum/Thread-Rand...ngs-2.html
Spoiler (Click to View)
r_aaAlpha "dither
r_aaMaxQuality "0"
r_aaSamples "2"
r_altModelLightingUpdate "0"
r_aspectRatio "auto"
r_atlasAnimFPS "15"
r_autopriority "0"
r_blacklevel "0"
r_blur "0"
r_brightness "0"
r_cacheModelLighting "1"
r_cacheSModelLighting "1"
r_clear "never"
r_clearColor "0
r_clearColor2 "0
r_colorMap "Unchanged"
r_contrast "1"
r_customMode ""
r_debugLineWidth "1"
r_debugShader "none"
r_depthPrepass "None"
r_desaturation "1"
r_detail "1"
r_detailMap "Unchanged"
r_diffuseColorScale "1"
r_displayRefresh "60
r_distortion "1"
r_dlightLimit "4"
r_dof_bias "0.5"
r_dof_enable "1"
r_dof_farBlur "1.8"
r_dof_farEnd "7000"
r_dof_farStart "1000"
r_dof_nearBlur "6"
r_dof_nearEnd "60"
r_dof_nearStart "10"
r_dof_tweak "0"
r_dof_viewModelEnd "8"
r_dof_viewModelStart "2"
r_dpvsFilterDebug "0"
r_drawDecals "1"
r_drawSun "1"
r_drawWater "1"
r_envMapExponent "5"
r_envMapMaxIntensity "0.5"
r_envMapMinIntensity "0.2"
r_envMapOverride "0"
r_envMapSunIntensity "2"
r_fastSkin "0"
r_filmAltShader "1"
r_filmTweakBrightness "0"
r_filmTweakContrast "1.4"
r_filmTweakDarkTint "0.7
r_filmTweakDesaturation "0.2"
r_filmTweakDesaturationDark "0.2"
r_filmTweakEnable "0"
r_filmTweakInvert "0"
r_filmTweakLightTint "1.1
r_filmTweakMediumTint "0.9
r_filmUseTweaks "0"
r_floatz "1"
r_fog "1"
r_forceLod "none"
r_fullbright "0"
r_fullscreen "0"
r_gamma "0.8"
r_glow "1"
r_glow_allowed "1"
r_glow_allowed_script_forced "0"
r_glowTweakBloomCutoff "0.5"
r_glowTweakBloomDesaturation "0"
r_glowTweakBloomIntensity0 "1"
r_glowTweakEnable "0"
r_glowTweakRadius0 "5"
r_glowUseTweaks "0"
r_gpuSync "off"
r_heroLighting "1"
r_highLodDist "-1"
r_ignore "0"
r_ignorehwgamma "0"
r_inGameVideo "1"
r_lightCacheLessFrequentMaxDistance "64"
r_lightCacheLessFrequentPeriod "10"
r_lightGridContrast "0"
r_lightGridEnableTweaks "0"
r_lightGridIntensity "1"
r_lightGridUseTweakedValues "1"
r_lightMap "Unchanged"
r_loadForRenderer "1"
r_lockPvs "0"
r_lodBiasRigid "0"
r_lodBiasSkinned "0"
r_lodScaleRigid "1"
r_lodScaleSkinned "1"
r_lowestLodDist "-1"
r_lowLodDist "-1"
r_mediumLodDist "-1"
r_mode "1024x768"
r_modelVertColor "1"
r_monitor "0"
r_multiGpu "0"
r_normal "1"
r_normalMap "Unchanged"
r_outdoor "1"
r_outdoorFeather "8"
r_picmip "0"
r_picmip_bump "0"
r_picmip_manual "0"
r_picmip_spec "0"
r_picmip_water "0"
r_polygonOffsetBias "-1"
r_polygonOffsetScale "-1"
r_portalBevels "0.7"
r_portalBevelsOnly "0"
r_portalMinClipArea "0.02"
r_portalMinRecurseDepth "2"
r_portalWalkLimit "0"
r_preloadShaders "0"
r_pretess "1"
r_primaryLightTweakDiffuseStrength "1"
r_primaryLightTweakSpecularStrength "1"
r_primaryLightUseTweaks "0"
r_reflectionProbeGenerate "0"
r_reflectionProbeGenerateExit "0"
r_reflectionProbeRegenerateAll "0"
r_rendererInUse "Shader
r_rendererPreference "Default"
r_resampleScene "1"
r_scaleViewport "1"
r_showFbColorDebug "None"
r_showFloatZDebug "0"
r_showLightGrid "0"
r_showMissingLightGrid "0"
r_showPortals "0"
r_showPortalsOverview "0"
r_singleCell "0"
r_skipPvs "0"
r_smc_enable "1"
r_smc_optimize "1"
r_smp_backend "1"
r_smp_worker "1"
r_smp_worker_thread0 "1"
r_smp_worker_thread1 "1"
r_specular "1"
r_specularColorScale "2.5"
r_specularMap "Unchanged"
r_spotLightBrightness "14"
r_spotLightEndRadius "196"
r_spotLightEntityShadows "1"
r_spotLightExponent "2"
r_spotLightFovInnerFraction "0.5"
r_spotLightMaxLength "5000"
r_spotLightShadows "1"
r_spotLightSModelShadows "1"
r_spotLightStartRadius "36"
r_sse_skinning "1"
r_subwindow "0
r_sun_from_dvars "0"
r_sun_fx_position "0
r_sunblind_fadein "0.5"
r_sunblind_fadeout "3"
r_sunblind_max_angle "5"
r_sunblind_max_darken "0.75"
r_sunblind_min_angle "30"
r_sunflare_fadein "1"
r_sunflare_fadeout "1"
r_sunflare_max_alpha "1"
r_sunflare_max_angle "2"
r_sunflare_max_size "2500"
r_sunflare_min_angle "45"
r_sunflare_min_size "0"
r_sunflare_shader "sun_flare"
r_sunglare_fadein "0.5"
r_sunglare_fadeout "3"
r_sunglare_max_angle "5"
r_sunglare_max_lighten "0.75"
r_sunglare_min_angle "30"
r_sunsprite_shader "sun"
r_sunsprite_size "16"
r_texFilterAnisoMax "4"
r_texFilterAnisoMin "1"
r_texFilterDisable "0"
r_texFilterMipBias "0"
r_texFilterMipMode "Unchanged"
r_useLayeredMaterials "0"
r_vc_makelog "0"
r_vc_showlog "0"
r_vsync "0"
r_warningRepeatDelay "5"
r_zfar "0"
r_zFeather "1"
r_znear "4"
r_znear_depthhack "0.1"
r_aaMaxQuality "0"
r_aaSamples "2"
r_altModelLightingUpdate "0"
r_aspectRatio "auto"
r_atlasAnimFPS "15"
r_autopriority "0"
r_blacklevel "0"
r_blur "0"
r_brightness "0"
r_cacheModelLighting "1"
r_cacheSModelLighting "1"
r_clear "never"
r_clearColor "0
r_clearColor2 "0
r_colorMap "Unchanged"
r_contrast "1"
r_customMode ""
r_debugLineWidth "1"
r_debugShader "none"
r_depthPrepass "None"
r_desaturation "1"
r_detail "1"
r_detailMap "Unchanged"
r_diffuseColorScale "1"
r_displayRefresh "60
r_distortion "1"
r_dlightLimit "4"
r_dof_bias "0.5"
r_dof_enable "1"
r_dof_farBlur "1.8"
r_dof_farEnd "7000"
r_dof_farStart "1000"
r_dof_nearBlur "6"
r_dof_nearEnd "60"
r_dof_nearStart "10"
r_dof_tweak "0"
r_dof_viewModelEnd "8"
r_dof_viewModelStart "2"
r_dpvsFilterDebug "0"
r_drawDecals "1"
r_drawSun "1"
r_drawWater "1"
r_envMapExponent "5"
r_envMapMaxIntensity "0.5"
r_envMapMinIntensity "0.2"
r_envMapOverride "0"
r_envMapSunIntensity "2"
r_fastSkin "0"
r_filmAltShader "1"
r_filmTweakBrightness "0"
r_filmTweakContrast "1.4"
r_filmTweakDarkTint "0.7
r_filmTweakDesaturation "0.2"
r_filmTweakDesaturationDark "0.2"
r_filmTweakEnable "0"
r_filmTweakInvert "0"
r_filmTweakLightTint "1.1
r_filmTweakMediumTint "0.9
r_filmUseTweaks "0"
r_floatz "1"
r_fog "1"
r_forceLod "none"
r_fullbright "0"
r_fullscreen "0"
r_gamma "0.8"
r_glow "1"
r_glow_allowed "1"
r_glow_allowed_script_forced "0"
r_glowTweakBloomCutoff "0.5"
r_glowTweakBloomDesaturation "0"
r_glowTweakBloomIntensity0 "1"
r_glowTweakEnable "0"
r_glowTweakRadius0 "5"
r_glowUseTweaks "0"
r_gpuSync "off"
r_heroLighting "1"
r_highLodDist "-1"
r_ignore "0"
r_ignorehwgamma "0"
r_inGameVideo "1"
r_lightCacheLessFrequentMaxDistance "64"
r_lightCacheLessFrequentPeriod "10"
r_lightGridContrast "0"
r_lightGridEnableTweaks "0"
r_lightGridIntensity "1"
r_lightGridUseTweakedValues "1"
r_lightMap "Unchanged"
r_loadForRenderer "1"
r_lockPvs "0"
r_lodBiasRigid "0"
r_lodBiasSkinned "0"
r_lodScaleRigid "1"
r_lodScaleSkinned "1"
r_lowestLodDist "-1"
r_lowLodDist "-1"
r_mediumLodDist "-1"
r_mode "1024x768"
r_modelVertColor "1"
r_monitor "0"
r_multiGpu "0"
r_normal "1"
r_normalMap "Unchanged"
r_outdoor "1"
r_outdoorFeather "8"
r_picmip "0"
r_picmip_bump "0"
r_picmip_manual "0"
r_picmip_spec "0"
r_picmip_water "0"
r_polygonOffsetBias "-1"
r_polygonOffsetScale "-1"
r_portalBevels "0.7"
r_portalBevelsOnly "0"
r_portalMinClipArea "0.02"
r_portalMinRecurseDepth "2"
r_portalWalkLimit "0"
r_preloadShaders "0"
r_pretess "1"
r_primaryLightTweakDiffuseStrength "1"
r_primaryLightTweakSpecularStrength "1"
r_primaryLightUseTweaks "0"
r_reflectionProbeGenerate "0"
r_reflectionProbeGenerateExit "0"
r_reflectionProbeRegenerateAll "0"
r_rendererInUse "Shader
r_rendererPreference "Default"
r_resampleScene "1"
r_scaleViewport "1"
r_showFbColorDebug "None"
r_showFloatZDebug "0"
r_showLightGrid "0"
r_showMissingLightGrid "0"
r_showPortals "0"
r_showPortalsOverview "0"
r_singleCell "0"
r_skipPvs "0"
r_smc_enable "1"
r_smc_optimize "1"
r_smp_backend "1"
r_smp_worker "1"
r_smp_worker_thread0 "1"
r_smp_worker_thread1 "1"
r_specular "1"
r_specularColorScale "2.5"
r_specularMap "Unchanged"
r_spotLightBrightness "14"
r_spotLightEndRadius "196"
r_spotLightEntityShadows "1"
r_spotLightExponent "2"
r_spotLightFovInnerFraction "0.5"
r_spotLightMaxLength "5000"
r_spotLightShadows "1"
r_spotLightSModelShadows "1"
r_spotLightStartRadius "36"
r_sse_skinning "1"
r_subwindow "0
r_sun_from_dvars "0"
r_sun_fx_position "0
r_sunblind_fadein "0.5"
r_sunblind_fadeout "3"
r_sunblind_max_angle "5"
r_sunblind_max_darken "0.75"
r_sunblind_min_angle "30"
r_sunflare_fadein "1"
r_sunflare_fadeout "1"
r_sunflare_max_alpha "1"
r_sunflare_max_angle "2"
r_sunflare_max_size "2500"
r_sunflare_min_angle "45"
r_sunflare_min_size "0"
r_sunflare_shader "sun_flare"
r_sunglare_fadein "0.5"
r_sunglare_fadeout "3"
r_sunglare_max_angle "5"
r_sunglare_max_lighten "0.75"
r_sunglare_min_angle "30"
r_sunsprite_shader "sun"
r_sunsprite_size "16"
r_texFilterAnisoMax "4"
r_texFilterAnisoMin "1"
r_texFilterDisable "0"
r_texFilterMipBias "0"
r_texFilterMipMode "Unchanged"
r_useLayeredMaterials "0"
r_vc_makelog "0"
r_vc_showlog "0"
r_vsync "0"
r_warningRepeatDelay "5"
r_zfar "0"
r_zFeather "1"
r_znear "4"
r_znear_depthhack "0.1"
Code:
SetVision(vision)
{
switch(vision)
{
case "sepia":
self SetClientDvar("r_blur",0.62);
self SetClientDvar("r_brightness",0.05);
self SetClientDvar("r_contrast",1);
self SetClientDvar("r_glow",1);
self SetClientDvar("r_glow_allowed",1);
self SetClientDvar("r_glowRadius0",0);
self SetClientDvar("r_glowBloomCutoff",0.97);
self SetClientDvar("r_glowBloomDesaturation",0.61);
self SetClientDvar("r_glowSkyBleedIntensity0",0.25);
self SetClientDvar("r_filmEnable",1);
self SetClientDvar("r_filmInvert",0);
self SetClientDvar("r_filmBrightness",0.14);
self SetClientDvar("r_filmDesaturation",0.98);
self SetClientDvar("r_filmLightTint","1 0.7 0.32");
self SetClientDvar("r_filmDarkTint","1 1.05 0.9");
self SetClientDvar("r_spotLightBrightness",14.32);
break;
case "superblurry":
self SetClientDvar("r_blur",2);
break;
}
}
Now just do and enjoy your "custom" vision:
Code:
self SetVision("sepia");
Thats it,