Script intro: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
[http://cantfightthemonlight.wedged.info/ can t fight the monlight] [http://ikonomi.etotest.info/ ikonomi] [http://preferiscomio.etotest.info/ preferisco mio marito] [http://topmodel.wedged.info/ topmodel] [http://renaultmegane.demogen.info/ renault megane 15] [http://socket940asus.skains.info/ socket 940 asus] [http://kramergorni.demogen.info/ kramer gorni] [http://ischiahotel.skains.info/ ischia hotel terme] [http://radiofmrds.behav.info/ radio fm rds] [http://fourthdimension.skains.info/ fourth dimension] [http://decoderdtt4000.enlard.info/ decoder dtt 4000 humax] [http://nicon4600.etotest.info/ nicon 4600] [http://y10junior.wedged.info/ y10 junior] [http://bloccotrasporti.alient.info/ blocco trasporti] [http://telefaxleonardo.enlard.info/ telefax leonardo] [http://everibodychan.skains.info/ everibody chan] [http://lw22n23nsamsung.skains.info/ lw22n23n samsung] [http://nuovasorento.enlard.info/ nuova sorento auto nuove] [http://obiettivitelecamere.enlard.info/ obiettivi telecamere] [http://fotonatura.enlard.info/ foto natura] [http://dernierdanse.skains.info/ dernier danse] [http://etotest.info/index6_500.html link] [http://ilgiovaneholden.behav.info/ il giovane holden] [http://contattimsnragazze.alient.info/ contatti msn ragazze porche] [http://hyundaicoupe1999.demogen.info/ hyundai coupe 1999] [http://transtroia.alient.info/ trans troia] [http://venditanotebook.behav.info/ vendita notebook online] [http://catherineletizia.skains.info/ catherine letizia] [http://umtsbluetoot.demogen.info/ umts bluetoot] [http://meliconitv.etotest.info/ meliconi tv] [http://palmaregpsgarmin.wedged.info/ palmare gps garmin] [http://nuova147.behav.info/ nuova 147] [http://golf19tdiakm0.alient.info/ golf 1 9 tdi a km 0] [http://psicologiadelle.behav.info/ psicologia delle tossicodipendenze] [http://deanimator.skains.info/ deanimator] [http://mp36gb.enlard.info/ mp3 6 gb] [http://legge1933.wedged.info/ legge 1933] [http://concertovasco.enlard.info/ concerto vasco rossi bari] [http://amburgohotel.alient.info/ amburgo hotel] [http://metodopertromba.alient.info/ metodo per tromba] [http://madonnarevisited.alient.info/ madonna revisited] [http://nerovisiondvd.behav.info/ nerovision dvd] [http://fotoraccontierotici.demogen.info/ fotoracconti erotici di mature] [http://brevigranprix022.demogen.info/ brevi gran prix 022] [http://vicentefernandez.enlard.info/ vicente fernandez] [http://miguelbosesitegroup.enlard.info/ miguel bose site group msn com] [http://thacallingour.behav.info/ tha calling our lives] [http://garganovacanza.wedged.info/ gargano vacanza] [http://videorammstein.behav.info/ video rammstein] [http://lavatrice1600.enlard.info/ lavatrice 1600] [http://viavenetocombi.enlard.info/ via veneto combi] [http://evvivaespagna.etotest.info/ evviva espagna] [http://decapitazione.skains.info/ decapitazione dell americano amstrong] [http://getz11.demogen.info/ getz 1 1] [http://canon5018.demogen.info/ canon 50 1 8] [http://illagodicomo.enlard.info/ il lago di como] [http://slipeperizoma.behav.info/ slip e perizoma string intimo] [http://luomotigrevol.etotest.info/ l uomo tigre vol 09] [http://conlamortenon.etotest.info/ con la morte non si scherza] [http://ilcolonnellovon.alient.info/ il colonnello von ryan] [http://behav.info/ behav.info] [http://postcardprinting.behav.info/ postcard printing] [http://scaricabranomusicali.demogen.info/ scarica brano musicali] [http://aspire2023.enlard.info/ aspire 2023] [http://wireless11apci.behav.info/ wireless 11a pci] [http://escortcatania.etotest.info/ escort catania] [http://campionatoitaliano.demogen.info/ campionato italiano basket] [http://naivasha.wedged.info/ naivasha] [http://viaggixsingle.behav.info/ viaggi x single] [http://dominiitalia.etotest.info/ domini italia] [http://bottone.enlard.info/ bottone] [http://artritis.behav.info/ artritis] [http://regolatorecarica.skains.info/ regolatore carica] [http://tonerfaxnashuatec.enlard.info/ toner fax nashuatec] [http://giocattolie.alient.info/ giocattoli e bambole] [http://nbalive2004pc.behav.info/ nba live 2004 pc] [http://alfaromeo166usate.enlard.info/ alfa romeo 166 usate] [http://behav.info/index3_250.html home] [http://contattimsnragazze.demogen.info/ contatti msn ragazze bari] [http://ohmonamour.enlard.info/ oh mon amour] [http://cordone.behav.info/ cordone] [http://pacchettovacanza.skains.info/ pacchetto vacanza eurodisney] [http://viverepervivere.enlard.info/ vivere per vivere] [http://incoloniaalmare.demogen.info/ in colonia al mare] [http://partitureper.demogen.info/ partiture per banda] [http://siglacartoni.alient.info/ sigla cartoni animati] [http://sallyvascorossi.demogen.info/ sally vasco rossi] [http://ciccionetroie.skains.info/ ciccione troie] [http://peruta.wedged.info/ peruta] [http://hentaidragonball.demogen.info/ hentai dragon ball xxx] [http://dx-ball.alient.info/ dx-ball] [http://monitorlcdtouchscreen.behav.info/ monitor lcd touchscreen] [http://hys.enlard.info/ hys] [http://ombelicopiercing.demogen.info/ ombelico piercing] [http://bassomaestrogrosso.alient.info/ basso maestro grosso] [http://luiselzambos.alient.info/ luis el zambos] [http://appartamentiin.demogen.info/ appartamenti in affitto annuale a barcellona spagna] [http://canzonimietta.etotest.info/ canzoni mietta] [http://killzonehaun.skains.info/ killzone ha un nuovo sito ufficiale] [http://mozartilflauto.demogen.info/ mozart il flauto magico]
{{wrongtitle|title=script_intro}}
{{wrongtitle|title=script_intro}}



Revision as of 14:02, 25 October 2007

Template:Wrongtitle

Entity description

The script_intro entity is a singleplayer only entity that is used extensively in the intro sequence for Half-Life 2. It makes use of DirectX's buffer blending capabilities to overlay a second camera onto the main camera, i.e., the player's view, and to blend between the two views using various effects. This is also useful for doing traditional A-B camera exposition sequences.

Some of the possible uses for this entity include hallucination effects, and dream sequences, traditional A-B camera work for machinima, and so on.

The main issue with understanding this entity is the workflow isn't the same as other entities, in that it's highly time based. You don't just set keys and it works, but rather you'll have to trigger it at intervals using inputs, so a good working knowledge of Source's entity I/O system is required.

Using script_intro

There's only one key that you have to deal with on this entity, and that's it's targetname. Once you have a name to refer to the entity by, all the work is done by sending it inputs. First thing that you have to do to use script_intro is to send in an Activate input. This will (I believe) initialize the secondary framebuffer it uses.

There are several inputs you have to send to 'initialize' the entity, before it functions the way you expect it to. Each will be explained. They are SetCameraViewEntity, FadeTo, SetNextBlendMode, and SetNextBlendTime.

Start by sending the SetCameraViewEntity input, with the name of the point_camera entity that you'll be using as the second view as a parameter. Remember, the player's viewpoint is the first camera, so in traditional film terms, the player is the A camera, and the point_camera that script_intro is using is the B camera. You'll send further inputs to script_intro to control blending between the A and B cameras.

You'll use the FadeTo value to tell the second camera what Alpha value it should display at. This is what controls how transparent the camera will be when it's overlayed over the first view. You use the input by sending a parameter with it with two values separated by a space. The first value is an integer with a range of 0-255, where 255 is completely opaque, and 0 is completely transparent. The second value is a number in seconds, that the fade will occur over. Next you'll want to use the SetNextBlendMode and SetNextBlendTime to accompish effects. SetNextBlendMode with a parameter of '6' is the most natural of blend modes. It will produce a straight fade between the two cameras. The other blend modes will produce special effects, such as the black and white and inversion effects seen in HL2's intro. Send a SetNextBlendMode input with a integer parameter of 0 through 6, each produces a different effect. This sets up the blend; you next send an input of SetNextBlendTime to execute the blend, with a parameter that equals the time value that you want the blend effect to occur over, in seconds. The blend mode will cause the camera to change effects when executed; so it will blend from one effect to the next.

Of note, the FadeTo input is used hackishly in the intro sequence to fadeout the player's view. This is because the env_fade entity can't be iterated, i.e. you can't have two env_fades, and fade from one to the other.

Blend modes

This is an incomplete list of the apparent function of the blend modes. These can be set in the entity by sending it a SetNextBlendMode and SetNextBlendTime or just SetBlendMode.

values:

1: Inverted Black & White with levels. This appears to map the screenbuffer to grayscale, invert the colors, and apply some sort of posterize filter.

2: Black As far as I can tell, this blanks both primary and secondary screen buffers.

3: Black & White Blend This maps the screenbuffers to grayscale, and blends between them.

4: A cam is normal, B is black This appears to blank the secondary screenbuffer, and leaves the primary unaffected.

5: B cam is normal, A is black This is the reverse of 4.

6: Normal mix, Overlay This appears to be the most straightforward mix between the two screenbuffers, applying a straight blend.

Keyvalues

If set, the script will match env_zoom's FOV transition.

Inputs

  • Activate
Take control of the player's view and start blending the two scenes.
  • Deactivate
Stop controlling the view.
  • SetCameraViewEntity <target_destination>
Set the viewpoint to blend with the player's viewpoint.
  • FadeTo <string>
Fade to a specific alpha amount over a specified amount of time.
Format: <alpha> <duration>
  • SetFadeColor #000000
Set the fade color.
  • SetBlendMode <integer>
Set the blending mode to use.
  • SetNextBlendMode <integer>
Set the blending mode to blend to over time. Follow this with a SetNextBlendTime input to start the mode blend.
  • SetNextBlendTime <float>
Set the amount of time it should take to blend to the next mode, and start blending.
  • SetFOV <integer>
Set the fov for the second camera.
  • SetNextFOV <integer>
Set the FOV to blend to over time. Follow this with a SetFOVBlendTime input to start the fov blend.
  • SetFOVBlendTime <float>
Set the amount of time it should take to blend to the next fov target, and start blending.

Outputs