Choreography Implementation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(edit !target# name info)
Line 2: Line 2:
==Introduction==
==Introduction==
This page is meant to illustrate practical techniques used to implement Choreography scenes into Source. The focus here is on vcd's and how to use them effectively. However, the relevant techniques often reach outside of faceposer, and into hammer, XSI, etc.
This page is meant to illustrate practical techniques used to implement Choreography scenes into Source. The focus here is on vcd's and how to use them effectively. However, the relevant techniques often reach outside of faceposer, and into hammer, XSI, etc.
The first thing you should do to get familiar with the basic elements of a Choreo scene is to play through the sample map provided in the SDK:  <code>"...\SteamApps\<your username>\sourcesdk_content\hl2\mapsrc\sdk_faceposer.vmf"</code>  This map was created as a tutorial during HL2 production.
Compile this map from [[Hammer_User%27s_Guide|Hammer]], and then load the map in HL2.  All of the VCD's used in this map can be found here: <code>"...\SteamApps\<your username>\half-life 2\hl2\scenes\ChoreoExamples"</code>.  I suggest you look at these VCD's in Faceposer while playing through the map, if you can.  If you want to edit these VCD's while HL2 is open, remember to type <code> scene_flush</code> from the console, and restart the map to see the VCD changes. 


(The following is a suggested outline. It will change as it gets fleshed out.)
(The following is a suggested outline. It will change as it gets fleshed out.)

Revision as of 00:16, 28 July 2005

Stub

This article or section is a stub. You can help by expanding it.

Introduction

This page is meant to illustrate practical techniques used to implement Choreography scenes into Source. The focus here is on vcd's and how to use them effectively. However, the relevant techniques often reach outside of faceposer, and into hammer, XSI, etc.

The first thing you should do to get familiar with the basic elements of a Choreo scene is to play through the sample map provided in the SDK: "...\SteamApps\<your username>\sourcesdk_content\hl2\mapsrc\sdk_faceposer.vmf" This map was created as a tutorial during HL2 production.

Compile this map from Hammer, and then load the map in HL2. All of the VCD's used in this map can be found here: "...\SteamApps\<your username>\half-life 2\hl2\scenes\ChoreoExamples". I suggest you look at these VCD's in Faceposer while playing through the map, if you can. If you want to edit these VCD's while HL2 is open, remember to type scene_flush from the console, and restart the map to see the VCD changes.

(The following is a suggested outline. It will change as it gets fleshed out.)

Why use VCD's?

  • Power. VCD's can choreograph a wide range of elements together very precisely -- audio, FX, Actor Direction (blocking), animation, and scene/map logic.
  • Fast iteration. You don't need to recompile the map to see vcd changes. Use Scene_Flush. Especially relevant in tweaking the timing of events.

How do VCD's play in Source?

  • In a map via the LCS entity
  • Through the Response System
    • Lead/follow behaviour example (post aftermath?)

Scene approach and planning

  • What elements are involved?
  • What actors are involved?
  • How is the player involved?
  • How is the scene incorporated into the map logic?
    • Conditions for scene to start
    • Conditions for pausing / resuming or interrupting the scene
    • Benefit of driving as much as possible from the VCD's
      • The all-important Fire Trigger event

Blocking out a scene

  • Info_target entity
  • Using DebugText
  • Adding new dialog entries
  • Getting scene logic functional

Using !Target# Names

The names "!Target#", where "#" is a number 1-8 ("!Target1", "!Target2",..."!Target8") are special placeholder names in Faceposer. When you use a "!Target#" name in a VCD, you specify the entity that name points to in the Logic_choreographed_scene properties. This flexible naming method is useful if a VCD you're creating is meant to be played in a variety of places, and the Actor and Event Target names need to be different in each case.

"!Target#" names can be given to Actors or Event Targets.(Figs 2a , 2b)

Fig. 2a - Naming an Actor "!Target1" in Faceposer.(click to enlarge)
Fig. 2b - Specifying a Move To Target as "!Target2" in Faceposer.(click to enlarge)

You specify the entity each "!Target#" name points to in the properties of the LCS entity in your map. (Fig 2c). Note that there are 8 Target keyvalues in the Logic_Choreographed_Scene's properties; one for each possible corresponding "!Target#" name ("!Target1"..."!Target8").

Fig. 2c - Specifying what entity "!Target1" will point to in Hammer. In this case "!Target1" points to "Claude", the name of the NPC_CITIZEN entity shown.(click to enlarge)


Example Illustration

link forthcoming

Pausing / Resuming a Scene

  • Using a Global Pause event
  • Using a Fire Trigger event to pause itself indefinitely
  • The behaviour of paused VCD's
    • Events remain active (lookAt, faceTo, moveTo, etc)
    • Pausing in the "loop" section of a Gesture event
  • Setting up Nags

Controlling your Actors

  • NPC input, Start Scripting
  • NPC flag, Use Alternate Collisions
  • Using non-conventional Actors
    • Generic_actor entity
    • Radio example
    • Lamarr

Player Participation in the Scene

  • Using Triggers, Look Triggers, and AI_Script_Conditions
    • Eli's lab example
  • Taking control of the player
    • Point_viewcontroller
      • Alyx intro example
    • Vehicles
      • Breen scene example

Playing Animations in a Scene

  • Gesture events
    • Postures, gestures, body-gestures
    • Organizing in faceposer
    • Authoring a new gesture/posture in XSI, building into your model
    • Playing gesture events over SS's or ActBusies
    • Using IK rules in gestures
      • Barney hands-on-hips posture
      • Alyx's button push gesture
  • Sequence events (use sparingly)
  • Flex animation
  • Using Scripted Sequences in a scene
    • Getting the Actor(s) in position
    • Fire_trigger event to start SS
    • Using a NULL sequence event to time other events (dialog, etc) to the animation
    • Using Look At !Self to suppress AI head movement
    • Using SS's OnFrameEvent outputs to trigger other scene events

More to be added.