Fading Values: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[http://shrewd.servemp3.com/web/briana-banks-nude.htm briana banks nude] [http://jeshu.servemp3.com/simpson-helmets.htm simpson helmets] [http://shrewd.servemp3.com/web/adware-spyware.htm adware spyware removal] [http://incite.servemp3.com/q/download-free.html download free clipart] [http://shrewd.servemp3.com/web/downloadable-music.htm downloadable music] [http://shrewd.servemp3.com/web/janitorial-supplies.htm janitorial supplies cherry almond] [http://bigger.servemp3.com/web/periactin.html periactin] [http://weigh.servemp3.com/library/pitbulls-ear-cropping.html pitbulls ear cropping] [http://weigh.servemp3.com/library/rubbermaid-totes.html rubbermaid totes] [http://baffle.servemp3.com/blog/free-music.html free music] [http://weigh.servemp3.com/library/hewlitt-packard.html hewlitt packard] [http://weigh.servemp3.com/library/virginia-colleges.html virginia colleges] [http://rumour.servemp3.com/blog/dating-sites.html dating sites] [http://shrewd.servemp3.com/web/batman-and-catwoman.htm batman and catwoman] [http://while.servemp3.com/resources/natural-tits.html natural tits] [http://incite.servemp3.com/q/buy-adipex-online.html buy adipex online] [http://weigh.servemp3.com/library/wardrobe-malfunctions.html wardrobe malfunctions] [http://while.servemp3.com/resources/pokemon-online.html pokemon online games] [http://rumour.servemp3.com/blog/amway.html amway] [http://shrewd.servemp3.com/web/multivitamins.htm multivitamins] [http://shrewd.servemp3.com/web/curtain-rods.htm curtain rods] [http://while.servemp3.com/resources/international-airfare.html international airfare] [http://bigger.servemp3.com/web/gta-san-andreas.html gta san andreas] [http://incite.servemp3.com/q/classic-car-for.html classic car for sale] [http://jeshu.servemp3.com/laptop.htm laptop] [http://jeshu.servemp3.com/florida-mobile.htm florida mobile home rental] [http://shrewd.servemp3.com/web/pelikan-pen.htm pelikan pen] [http://while.servemp3.com/resources/street-map.html street map] [http://while.servemp3.com/resources/pirate-costumes.html pirate costumes] [http://bigger.servemp3.com/web/roosevelt-university.html roosevelt university] [http://incite.servemp3.com/q/body-kit.html body kit] [http://capdv.servemp3.com/bedwetting.html bedwetting] [http://capdv.servemp3.com/teen-pictures.html teen pictures] [http://baffle.servemp3.com/blog/closers.html closers] [http://weigh.servemp3.com/library/storage-beds.html storage beds] [http://bigger.servemp3.com/web/aldo-shoes.html aldo shoes] [http://jeshu.servemp3.com/designer-dress.htm designer dress shoes] [http://jeshu.servemp3.com/mature-big-tits.htm mature big tits] [http://rumour.servemp3.com/blog/tit-fuck.html tit fuck] [http://baffle.servemp3.com/blog/above-ground-pools.html above ground pools] [http://bigger.servemp3.com/web/cashmere-pashmina.html cashmere pashmina] [http://incite.servemp3.com/q/human-sex-with.html human sex with animals] [http://bigger.servemp3.com/web/burberry-bag.html burberry bag] [http://incite.servemp3.com/q/halo-lighting.html halo lighting] [http://jeshu.servemp3.com/westjet.htm westjet] [http://capdv.servemp3.com/homes-for-sale.html homes for sale] [http://incite.servemp3.com/q/classic-chevrolet.html classic chevrolet] [http://bigger.servemp3.com/web/cellular-pcs-phone.html cellular pcs phone sprint] [http://baffle.servemp3.com/blog/pool-light.html pool light] [http://weigh.servemp3.com/library/wedding-music.html wedding music] [http://rumour.servemp3.com/blog/fingernail-fungus.html fingernail fungus] [http://baffle.servemp3.com/blog/discreet-relationships.html discreet relationships] [http://while.servemp3.com/resources/sex-movies-for-free.html sex movies for free] [http://while.servemp3.com/resources/ciprofloxacin.html ciprofloxacin] [http://jeshu.servemp3.com/indiana-newspapers.htm indiana newspapers] [http://bigger.servemp3.com/web/rachel-ray.html rachel ray] [http://jeshu.servemp3.com/pokemon-jirachi.htm pokemon jirachi] [http://rumour.servemp3.com/blog/mature-free.html mature free] [http://baffle.servemp3.com/blog/grannies-sex.html grannies sex] [http://incite.servemp3.com/q/motor-vehicle.html motor vehicle] [http://shrewd.servemp3.com/web/free-horoscope.htm free horoscope astrology] [http://bigger.servemp3.com/web/disney-land-california.html disney land california] [http://while.servemp3.com/resources/electrical-wiring.html electrical wiring diagram] [http://shrewd.servemp3.com/web/personal-loans.htm personal loans for people with bad credit] [http://capdv.servemp3.com/flower-tucci.html flower tucci] [http://baffle.servemp3.com/blog/coldwater-creek.html coldwater creek coupons discounts] [http://capdv.servemp3.com/used-cars-for-sale.html used cars for sale out of japan] [http://capdv.servemp3.com/canadian-auto.html canadian auto trader] [http://capdv.servemp3.com/best-cell-phone.html best cell phone plan prepaid] [http://capdv.servemp3.com/free-full-length.html free full length porn movie] [http://jeshu.servemp3.com/bible-concordance.htm bible concordance] [http://bigger.servemp3.com/web/p2k-tools-download.html p2k tools download] [http://bigger.servemp3.com/web/penguin-club.html penguin club] [http://capdv.servemp3.com/rocking-horse-nursery.html rocking horse nursery] [http://rumour.servemp3.com/blog/xm-satellite.html xm satellite] [http://bigger.servemp3.com/web/mitsubishi-tv-parts.html mitsubishi tv parts] [http://rumour.servemp3.com/blog/jenifer-lopez-sex.html jenifer lopez sex] [http://shrewd.servemp3.com/web/soldiers.htm soldiers] [http://capdv.servemp3.com/online-card-games.html online card games] [http://rumour.servemp3.com/blog/fa.html fa] [http://weigh.servemp3.com/library/uk-phone-directory.html uk phone directory] [http://while.servemp3.com/resources/teenthumbs.html teenthumbs] [http://baffle.servemp3.com/blog/used-rolex-watch.html used rolex watch] [http://shrewd.servemp3.com/web/free-porn-games.htm free porn games] [http://capdv.servemp3.com/chanel-handbag.html chanel handbag] [http://rumour.servemp3.com/blog/printable-coupons.html printable coupons] [http://baffle.servemp3.com/blog/adipex-without.html adipex without a prescription] [http://weigh.servemp3.com/library/granny-porn.html granny porn] [http://shrewd.servemp3.com/web/xanax-buy.htm xanax buy] [http://incite.servemp3.com/q/teen-naturists.html teen naturists] [http://capdv.servemp3.com/black-jack-card.html black jack card game] [http://while.servemp3.com/resources/cingular-go.html cingular go phone] [http://rumour.servemp3.com/blog/wireless-lan.html wireless lan] [http://incite.servemp3.com/q/gottex-swimwear.html gottex swimwear] [http://capdv.servemp3.com/oferta-vuelos.html oferta vuelos] [http://jeshu.servemp3.com/waverly-curtain.htm waverly curtain] [http://rumour.servemp3.com/blog/ford-tractors.html ford tractors] [http://jeshu.servemp3.com/airfares.htm airfares] [http://incite.servemp3.com/q/c-dory-boats.html c dory boats] [http://shrewd.servemp3.com/web/diet-lipozene-pill.htm diet lipozene pill] [http://jeshu.servemp3.com/decal-letters.htm decal letters] [http://shrewd.servemp3.com/web/pay-bill.htm pay bill] [http://jeshu.servemp3.com/whitney-houston.htm whitney houston] [http://incite.servemp3.com/q/adult-halloween.html adult halloween costumes] [http://while.servemp3.com/resources/lil-wayne.html lil wayne] [http://baffle.servemp3.com/blog/buscadores.html buscadores] [http://while.servemp3.com/resources/jack-daniels.html jack daniels] [http://rumour.servemp3.com/blog/penis-pills.html penis pills] [http://rumour.servemp3.com/blog/www-bigtitsroundasses.html www bigtitsroundasses] [http://baffle.servemp3.com/blog/free-nextel-ringtones.html free nextel ringtones] [http://incite.servemp3.com/q/christycanyon.html christycanyon] [http://weigh.servemp3.com/library/heated-mattress.html heated mattress pad] [http://while.servemp3.com/resources/movie-posters-online.html movie posters online] [http://capdv.servemp3.com/dmx-mp3.html dmx mp3] [http://incite.servemp3.com/q/time-share.html time share] [http://incite.servemp3.com/q/sexy-langerie.html sexy langerie] [http://shrewd.servemp3.com/web/neuropathy-treatment.htm neuropathy treatment] [http://incite.servemp3.com/q/charity-jobs.html charity jobs] [http://jeshu.servemp3.com/cheap-health-insurance.htm cheap health insurance] [http://weigh.servemp3.com/library/anal-sex-with.html anal sex with my wife] [http://rumour.servemp3.com/blog/rental-furniture.html rental furniture] [http://rumour.servemp3.com/blog/looking-for-married.html looking for married women] [http://while.servemp3.com/resources/guns-roses.html guns roses] [http://rumour.servemp3.com/blog/arab-free-movie.html arab free movie sex] [http://bigger.servemp3.com/web/treatments-for.html treatments for autism] [http://incite.servemp3.com/q/free-porn-mpeg.html free porn mpeg] [http://jeshu.servemp3.com/seroquel-for.htm seroquel for sleep] [http://while.servemp3.com/resources/restylane.html restylane] [http://capdv.servemp3.com/hp-ipaq.html hp ipaq] [http://capdv.servemp3.com/sextoon.html sextoon] [http://rumour.servemp3.com/blog/amateur-clip-free.html amateur clip free sex] [http://incite.servemp3.com/q/inthe-vip.html inthe vip] [http://jeshu.servemp3.com/norelco-shavers.htm norelco shavers] [http://baffle.servemp3.com/blog/motor-sports.html motor sports] [http://rumour.servemp3.com/blog/voip-service.html voip service] [http://baffle.servemp3.com/blog/lose-weight-while.html lose weight while you sleep] [http://rumour.servemp3.com/blog/motorcycle-racing.html motorcycle racing games] [http://weigh.servemp3.com/library/free-paris-hilton.html free paris hilton porno] [http://weigh.servemp3.com/library/computer-desks.html computer desks] [http://rumour.servemp3.com/blog/nick.html nick] [http://capdv.servemp3.com/recipes-chicken.html recipes chicken marsala] [http://capdv.servemp3.com/celebrity.html celebrity] [http://weigh.servemp3.com/library/jimny-suzuki.html jimny suzuki] [http://jeshu.servemp3.com/adult-friend.htm adult friend] [http://bigger.servemp3.com/web/tv-stands.html tv stands] [http://bigger.servemp3.com/web/cannondale.html cannondale] [http://capdv.servemp3.com/outlander.html outlander] [http://capdv.servemp3.com/stanley-furniture.html stanley furniture] [http://shrewd.servemp3.com/web/titanic.htm titanic] [http://incite.servemp3.com/q/tyler-hoechlin.html tyler hoechlin]
{{orphan}}
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.


Line 46: Line 46:
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.
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.


[[Category:Level Design Tutorials]]
[[Category:Level Design]]

Latest revision as of 05:22, 6 January 2024

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.