Post: Dynamic Lighting
10-17-2012, 10:14 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I always wanted to do something like this every since I came across it. My friend used to do it with RGB dvar values but I don't remember how he did it. (It looked real af.. not this gay shit) but you can use this whenever. Not as good and could be improved.

Q: What does it do?
A: Changes between day and night Winky Winky

Script:
    
lighting()
{
map = getDvar("mapname");
light = strTok( "icbm_sunrise0;icbm_sunrise1;icbm_sunrise2;icbm_sunrise3;icbm_sunrise4;"+map+";interior_concept;icbm_interior;icbm", ";" );
for(;Winky Winky
{
for(i=0;i<light.size;i++)
{
self VisionSetNakedForPlayer( light[i], 7 );
wait 7;
}
}
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 12 users say thank you to Jakes625 for this useful post:

*xActionMods*, Blackstorm, BlurzGoHard, CrEaTiiOnUNREAL, kilakaz, notoriousCFW, OmGRhys-x, RaspberryIce, Restxrt Modz, Valid♥, xePixTvx, xToysBoy_
10-17-2012, 10:47 PM #2
AgentSexyPig
Never give up!
Very Nice, i might use this.
10-17-2012, 11:21 PM #3
Restxrt Modz
Do a barrel roll!
Originally posted by GAMER View Post
I always wanted to do something like this every since I came across it. My friend used to do it with RGB dvar values but I don't remember how he did it. (It looked real af.. not this gay shit) but you can use this whenever. Not as good and could be improved.

Q: What does it do?
A: Changes between day and night Winky Winky

Script:
    
lighting()
{
map = getDvar("mapname");
light = strTok( "icbm_sunrise0;icbm_sunrise1;icbm_sunrise2;icbm_sunrise3;icbm_sunrise4;"+map+";interior_concept;icbm_interior;icbm", ";" );
for(;Winky Winky
{
for(i=0;i<light.size;i++)
{
self VisionSetNakedForPlayer( light[i], 7 );
wait 7;
}
}
}
that could be cool if you make like a clock Happy

The following 3 users say thank you to Restxrt Modz for this useful post:

BlurzGoHard, kilakaz, Valid♥
10-18-2012, 08:11 AM #4
247Yamato
< ^ > < ^ >
For the dvars, simply use the ones which start with "r_" :carling:
10-18-2012, 12:23 PM #5
Originally posted by 247Yamato View Post
For the dvars, simply use the ones which start with "r_" :carling:


List them? Maybe we can work on something.

Like I shit you not he had the realest looking night ever.
10-18-2012, 02:19 PM #6
Master Ro
I make food
Berry Good Needa
10-18-2012, 06:04 PM #7
247Yamato
< ^ > < ^ >
Originally posted by GAMER View Post
List them? Maybe we can work on something.

Like I shit you not he had the realest looking night ever.


They are mainly the filmtweak and glowtweak ones

    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"


Example of use from the latest mod I worked on:

    self setClientDvars("r_glowusetweaks",1,"r_glowtweakenable",1,"r_glowtweakbloomintensity0",2,"r_glowtweakbloomradius0",2,"r_glowtweakbloomcutoff",0.9,"r_filmusetweaks",1,"r_filmtweakenable",1,"r_filmtweakcontrast",1,"r_filmtweakdarktint","0.6 0.1 1 1","r_filmtweaklighttint","0.1 0.4 1 1","r_filmtweakdesaturation",0.3,"r_filmtweakinvert",0);

The following user thanked 247Yamato for this useful post:

OmGRhys-x

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo