Animators Guide to Scripted Sequences
From Valve Developer Community
This article is a stub. You can help by adding to it (http://developer.valvesoftware.com/w/index.php?title=Animators_Guide_to_Scripted_Sequences&action=edit).
This page is meant to cover the techniques involved in implementing scripted animations into Source by use of the Scripted_Sequence entity.
The focus is on how to maintain precise registration between the entity setup in Hammer and your scene setup in XSI (or any 3d package), so that what you author is exactly what you see in Source. This includes creating all manner of animated interactions: NPC/NPC, NPC/Animated Prop, NPC/World. Also, this page may touch upon the most common scripted_sequence parameters and how they behave under different settings, but it is meant to focus more on the 3d Software aspect of creating animations for use with the Scripted Sequence entity.
| Table of contents |
Introduction
Scripted Sequences are a very powerful tool. Much of the power is due to the precision they afford animators. They were designed as a way to have npc's play animations in which they interact with each other in perfect sync and in perfect registration, and they succeed at this task very well.
To take full advantage of Scripted Sequences, however, the Animator needs to appreciate some fundamental aspects of making Models for Source, and be aware of how animations play with respect to the Model's local space. Once these concepts are grasped, there's no limit to the cool animation tricks you can pull off in your map.
The goal, in a nutshell, is to re-create certain Hammer entity placements in XSI and then to create Animations based on those precise placements.
(rough outline off the top)
Fundamentals of Source Models: Pivot Points
This is a basic aspect of 3D graphics, but very important to the work outlined below. Specifically important is understanding how a Pivot Point is defined in a model so that we can accurately place models in XSI as they are in Hammer, and accurately animate interactions between them.
Let's take a quick look at the process of creating a model for Source, and see how the Pivot Point of the model is defined.
Create the model in XSI, note the World Origin
The first step in getting a model into Source is, obviously, to model the art in XSI. Once you’re happy with your model and are ready to export and compile it, you should take note of the following:
- The World Origin in your Reference scene defines the Pivot Point of your model in Source.
Is your model placed correctly in your XSI scene? Generally you want to place your model near the Origin, and resting on the ground plane. Esp for Character models, you want the World Origin to be centered on the ground between the character’s feet. (Fig. 2a)
Any time you export an .smd file from XSI, the World Origin in XSI represents the model's Pivot Point in Source. This is true for both Model and Skeletal Animation .smd's.
- In Source (hl2, hammer, hlmv)
- ent_pivot, pivot points
- ent_bbox, bounding box
- Illustrate correlation between world origin in XSI and Pivot Point in Source
- QC processing: is possible to alter this correlation in the QC
- Origin, Rotate commands
- Align, Alignto commands
- what we've learned: there is a precise correlation between your 3d package and Source. It is possible to create an XSI scene that has characters / props placed precisely as they are in Hammer. This is the basis for creating animations in which npc's interact with each other, props, and the world.
NPC / NPC Interaction: Handshake example
This illustrates setting up, animating, and testing a Scripted Sequence setup in which two npc's play an animation in which they interact. This was used all over the place in HL2.
Placing the Scripted Sequence entities in Hammer
- stuff goes here
Creating our Scene in XSI
- stuff goes here
Animating, Exporting and Compiling our Animations
- stuff goes here
Setting the Scripted Sequence parameters
- stuff goes here
Testing and Troubleshooting
- stuff goes here

