Difference between revisions of "Fading Values"

From Valve Developer Community
Jump to: navigation, search
m
m (Spam revert)
Line 1: Line 1:
[http://love-heart.gosailor.cn/ love heart] [http://math-sites.charie.cn/ math sites] [http://activities-for.indevout.cn/ activities for kids] [http://anal-sex-tips.drongo.cn/ anal sex tips] [http://young-ass-thong.abjur.cn/ young ass thong] [http://googl.moon-ray.cn/ googl] [http://world-bank-notes.counite.cn/ world bank notes for sale] [http://olds.tiddle.cn/ olds] [http://girl-masturbates.counite.cn/ girl masturbates] [http://free-math-help.moon-ray.cn/ free math help] [http://jessica-alba.tiddle.cn/ jessica alba fucking] [http://hentai-children.tiddle.cn/ hentai children gallery] [http://girls-making.drongo.cn/ girls making out] [http://john-wilkes-booth.tiddle.cn/ john wilkes booth] [http://mature-whore.erhear.cn/ mature whore] [http://wrap.counite.cn/ wrap] [http://fuck-slut.abjur.cn/ fuck slut] [http://low-potassium.charie.cn/ low potassium] [http://massive-blow-job.emetic.cn/ massive blow job] [http://world-bank.abjur.cn/ world bank] [http://mature-grannies.indevout.cn/ mature grannies thumbs] [http://border-collie.gosailor.cn/ border collie puppies] [http://foam-mattress.charie.cn/ foam mattress] [http://violent-sex.moon-ray.cn/ violent sex] [http://amy-wong.charie.cn/ amy wong] [http://free-online-recipes.abjur.cn/ free online recipes] [http://alzheimer-disease.drongo.cn/ alzheimer disease] [http://little-princess.indevout.cn/ little princess dress] [http://playboy-bunnies.tiddle.cn/ playboy bunnies] [http://missouri-home-builders.charie.cn/ missouri home builders association] [http://milwaukee-bmw.indevout.cn/ milwaukee bmw] [http://moist-vagina.erhear.cn/ moist vagina] [http://mo-weather.tiddle.cn/ mo weather] [http://ping-server.gosailor.cn/ ping server virtual] [http://3rd-grade-science.abjur.cn/ 3rd grade science project] [http://the-hollies.emetic.cn/ the hollies] [http://free-lesbian.drongo.cn/ free lesbian sex video] [http://lawn-edging.gosailor.cn/ lawn edging] [http://ocean-city-new.erhear.cn/ ocean city new jersey rentals] [http://microsoft-exchange.gosailor.cn/ microsoft exchange 2000 system manager] [http://nicole-naked.indevout.cn/ nicole naked] [http://hentia-sex.emetic.cn/ hentia sex] [http://beautiful-feet.charie.cn/ beautiful feet contest] [http://latina-nude-models.tiddle.cn/ latina nude models] [http://nudist-vacation.abjur.cn/ nudist vacation gallery] [http://florida-campgrounds.indevout.cn/ florida campgrounds] [http://studio-props-supply.counite.cn/ studio props supply] [http://iud-cost.moon-ray.cn/ iud cost] [http://jamaican-blue.gosailor.cn/ jamaican blue mountain coffee] [http://bridal-shops.tiddle.cn/ bridal shops] [http://franklin-mint-collectible.erhear.cn/ franklin mint collectible] [http://incontinencesupport.abjur.cn/ incontinencesupport] [http://paulina.erhear.cn/ paulina] [http://california-male.gosailor.cn/ california male strippers] [http://vine-tattoos.gosailor.cn/ vine tattoos] [http://website-design.gosailor.cn/ website design mn] [http://kari-digimon.erhear.cn/ kari digimon] [http://ce.emetic.cn/ ce] [http://mood-swing-wild.erhear.cn/ mood swing wild] [http://circuit-board.moon-ray.cn/ circuit board repair] [http://hot-booty.drongo.cn/ hot booty] [http://lesbian-twister.counite.cn/ lesbian twister] [http://teens-doing-it.abjur.cn/ teens doing it] [http://girls-xxx.charie.cn/ girls xxx] [http://yorktowne-cabinets.gosailor.cn/ yorktowne cabinets] [http://powerball-number.moon-ray.cn/ powerball number] [http://jeanette-lee.moon-ray.cn/ jeanette lee] [http://firm-ass.erhear.cn/ firm ass] [http://free-dating-service.indevout.cn/ free dating service] [http://big-boob-patrol.abjur.cn/ big boob patrol] [http://best-home-businesses.drongo.cn/ best home businesses] [http://georgia-state.erhear.cn/ georgia state parks] [http://allison.erhear.cn/ allison] [http://cb-antennas.abjur.cn/ cb antennas] [http://homemade-hydrogen.erhear.cn/ homemade hydrogen] [http://the-documentary.gosailor.cn/ the documentary] [http://hentai-animated.abjur.cn/ hentai animated gif] [http://womens-ministry.drongo.cn/ womens ministry programs] [http://girls-licking-boobs.moon-ray.cn/ girls licking boobs] [http://incredibles-naked.indevout.cn/ incredibles naked] [http://house-for-rent.gosailor.cn/ house for rent] [http://creative-writing.moon-ray.cn/ creative writing software] [http://gold-coast.drongo.cn/ gold coast] [http://coal-chamber.gosailor.cn/ coal chamber] [http://whirlpool.abjur.cn/ whirlpool] [http://lluvia-dorada.emetic.cn/ lluvia dorada] [http://kelly-naked.indevout.cn/ kelly naked] [http://a-world-of-art.drongo.cn/ a world of art] [http://naked-patch-warcraft.moon-ray.cn/ naked patch warcraft world] [http://number-obtaining.counite.cn/ number obtaining security social] [http://best-adult-sites.erhear.cn/ best adult sites] [http://emma-watsons.indevout.cn/ emma watsons panties] [http://die-prinzen.abjur.cn/ die prinzen] [http://xm-radio.moon-ray.cn/ xm radio] [http://monster-porn.tiddle.cn/ monster porn] [http://after-dark-screen.emetic.cn/ after dark screen saver for pc] [http://elastigirl.moon-ray.cn/ elastigirl] [http://idaho-football.tiddle.cn/ idaho football camp] [http://lagwagon.gosailor.cn/ lagwagon] [http://child-pornography.counite.cn/ child pornography]
 
 
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 20:32, 2 December 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.