Fading Values: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(CLeaned more spam)
Line 1: Line 1:
[http://lacumparsitatango.etotest.info/ la cumparsita tango argentino] [http://belledonne.enlard.info/ belledonne] [http://zainoreflexfotocamere.demogen.info/ zaino reflex fotocamere] [http://fotomammenude.skains.info/ foto mamme nude] [http://telefonipalmari.enlard.info/ telefoni palmari i mate] [http://clipartdrago.wedged.info/ clipart drago] [http://drivermodemmotorola.alient.info/ driver modem motorola 525] [http://frankestain.wedged.info/ frankestain] [http://partidelcorpoumano.skains.info/ parti del corpo umano] [http://zoomnikkoraf-s.skains.info/ zoom nikkor af-s vr 200-400] [http://the411onmyknees.wedged.info/ the 411 on my knees] [http://cronachedel22.demogen.info/ cronache del 22] [http://kyocerafs1200.wedged.info/ kyocera fs1200] [http://pavelnovotny.behav.info/ pavel novotny] [http://navigatorgpsacer.skains.info/ navigator gps acer d100] [http://davai.etotest.info/ davai] [http://forumfree.etotest.info/ forumfree] [http://accademiadifrancia.demogen.info/ accademia di francia] [http://wwwrossifumi.enlard.info/ www rossifumi it] [http://mmsemail.alient.info/ mms email] [http://volofrancoforte.skains.info/ volo francoforte] [http://calafell.skains.info/ calafell] [http://episodio3.wedged.info/ episodio 3] [http://fotofabiocannavaro.alient.info/ foto fabio cannavaro] [http://scaricaregiochi.enlard.info/ scaricare giochi ps2] [http://etotest.info/index2_250.html site] [http://letraorejadevangogh.behav.info/ letra oreja de vangogh] [http://incestoracconti.behav.info/ incesto racconti erotici] [http://macchinaxpane.demogen.info/ macchina x pane amstrad] [http://inflash.etotest.info/ in flash] [http://skains.info/index1_500.html page] [http://chatterraes.skains.info/ chat terra es] [http://cavophonocar.demogen.info/ cavo phonocar] [http://ijustcalled.behav.info/ i just called] [http://maxmutzke.skains.info/ max mutzke] [http://mercandede.etotest.info/ mercan dede] [http://mpcorn.skains.info/ mp corn] [http://enlard.info/index6_250.html map] [http://barrysears.alient.info/ barry sears] [http://sexvideoitaliani.enlard.info/ sex video italiani] [http://downloadmovies.alient.info/ download movies] [http://wd200gb.behav.info/ wd 200gb] [http://prenotazionealbergo.alient.info/ prenotazione albergo barcellona] [http://vigilanzaurbana.alient.info/ vigilanza urbana] [http://alfaromeo33imola.skains.info/ alfa romeo 33 imola] [http://asiatichenude.skains.info/ asiatiche nude gratis] [http://agp2x4x128.alient.info/ agp 2x 4x 128] [http://fotofighepelose.skains.info/ foto fighe pelose] [http://decapitazioneusa.skains.info/ decapitazione usa in iraq] [http://usaanthem.behav.info/ usa anthem] [http://frasiauguraliper.behav.info/ frasi augurali per battesimo] [http://tatuaggi.demogen.info/ tatuaggi] [http://malamoureno.demogen.info/ ma l amoure no] [http://icooloadercrack.behav.info/ icooloader crack] [http://localidiscambisti.wedged.info/ locali di scambisti in campania] [http://piastra-tostapane.behav.info/ piastra - tostapane] [http://hotelpremiere.demogen.info/ hotel premiere classe la seyne sur mer i] [http://nuovabmw1auto.etotest.info/ nuova bmw 1 auto nuove] [http://letteregotiche.demogen.info/ lettere gotiche] [http://giustiziaamministrativa.wedged.info/ giustizia amministrativa] [http://teleguida.etotest.info/ teleguida] [http://tvboxsintonizzatore.skains.info/ tv box sintonizzatore tv] [http://drivermotorolac650.skains.info/ driver motorola c650 free] [http://usbflash1gb.demogen.info/ usb flash 1gb] [http://solventedf1.skains.info/ solvente df  1 fl 100 ml] [http://gfungherese.skains.info/ gf ungherese] [http://profumolondon.behav.info/ profumo london di burberry] [http://checosacie.wedged.info/ che cosa cie] [http://incontridisesso.enlard.info/ incontri di sesso con uomini] [http://tomatedetila.behav.info/ toma te de tila] [http://cevoli.etotest.info/ cevoli] [http://skains.info/index2_1000.html page] [http://arnoldschwarzenegger.behav.info/ arnold schwarzenegger] [http://dragr.wedged.info/ drag r] [http://havananights.enlard.info/ havana nights] [http://incontrisesso.demogen.info/ incontri sesso gratis] [http://licenzeterminal.enlard.info/ licenze terminal server] [http://hentaidragonballx.enlard.info/ hentai dragonballx] [http://moquetteliscia.alient.info/ moquette liscia] [http://capo.etotest.info/ capo] [http://dvd-rwusb.demogen.info/ dvd-rw usb] [http://animalisexy.alient.info/ animali sexy] [http://cucchiaiodargento.skains.info/ cucchiaio d argento] [http://wwwwinxclubit.etotest.info/ www winx club it] [http://casalinghecalendario.enlard.info/ casalinghe calendario] [http://amoredistrega.etotest.info/ amore di strega] [http://loredanadicicco.skains.info/ loredana di cicco] [http://de220.wedged.info/ de 220] [http://secrederai.demogen.info/ se crederai] [http://billycook.skains.info/ billy cook] [http://striscialanotizia.demogen.info/ striscialanotizia it] [http://seilormoon.wedged.info/ seilormoon] [http://testidennis.etotest.info/ testi dennis roussos] [http://leschuches.wedged.info/ les chuches] [http://grecoditufo.wedged.info/ greco di tufo produzione] [http://giovaninel1968.behav.info/ giovani nel 1968] [http://lettoridvdedivx.alient.info/ lettori dvd e divx daewoo dv 500] [http://alient.info/index7_250.html map] [http://roackone.etotest.info/ roack one] [http://upsneo.alient.info/ ups neo]
This article describes an advanced effect in the [[Source]] engine, used to fade fog between different values, but it can be used for any entity that has a color value to change over time. You might also use that article to shift the Z-plane on a map to reduce the visibility, etc.
This article describes an advanced effect in the [[Source]] engine, used to fade fog between different values, but it can be used for any entity that has a color value to change over time. You might also use that article to shift the Z-plane on a map to reduce the visibility, etc.



Revision as of 15:16, 22 October 2007

This article describes an advanced effect in the Source engine, used to fade fog between different values, but it can be used for any entity that has a color value to change over time. You might also use that article to shift the Z-plane on a map to reduce the visibility, etc.

This trick is quite powerful, as it allows you to alter values that we usually leave static on a map: it would add game immersion.

Entities required

  • logic_relay is perfect to change game values or to abstract the routine. It also makes it much easier to duplicate the effect in other maps.
  • logic_timer is the basis of the effect, this entities is designed for measuring the time ticks.
  • math_counter keeps track of the evolution of the values uppon time for our effect.
  • math_colorblend or math_remap do essentially the same thing: they remap a value based on the input value.

Entity setup

Logic_relay
targetname fade_value1
OnTrigger counter SetValue 0
OnTrigger timer 
OnTrigger timer Enable
Logic_timer
targetname timer
RefireTime .2
StartDisabled 1
OnTimer counter Add .01
math_counter
targetname counter
max 1
OnHitMax timer Disable
OutValue colorblend InValue
math_colorblend
targetname colorblend
colormin "0 0 0"
colormax "255 255 255"
OutColor env_fog_controller SetColor

Process description

You trigger the logic_relay with another entity, or from the console with ent_fire fade_value1 trigger. This will start the sequence. The logic_relay starts the logic_timer and resets the math_counter. The logic_timer re-fires every .2 seconds, firing its output OnTimer, which adds .01 to the math_counter's stored value. The math_counter outputs its OutValue whenever its value is changed, which is in turn put into the math_colorblend. The math_colorblend takes the input value, which is a range from 0-1, and changes the colors based on that.

This range allows for 100 steps. The values that are setup are a compromise between making the blend really smooth and performance. It's slightly "steppy" because it happens only 5 times a second. It would be a lot smoother if you increased it to happen more often, with less of a step. You could do that by only adding .005 or a smaller value than the default .01.

Once the math_counter hits its maximum value (1) it will fire an output telling the logic_timer to disable. This effectively stops the sequence until the logic_relay is fired again.

OutColor and OutValue outputs both accept a parameter in Hammer, but make sure you do not specify one. The parameter they pass will be dynamically generated by the entity itself.

You can change OutColor on the math_colorblend to target any entity that will accept a color value, and it should work just the same. This entity rig can be further adapted to work with a math_remap, and used to fade between any two values, allowing you to affect the values of pretty much any entity in the game, and change them over time.