nyuuzyou/wikis huggingface dataset:
SFM/Copying shots from a different session

Each shot in a session must have a unique name. If you want to add a shot from session B to session A, make sure session A doesn't already contain a shot with that name. If session A already has a shot with that name, a dialog box will appear, asking you whether you want to replace the entire existing shot or replace specific elements of that shot. Click Cancel if you don't want to replace all or part of the existing shot.
For more information about replacing shots and animation sets, see Replacing shots and Replacing animation sets.
To add a shot from session B to session A:
# Follow the procedure in Importing a second session in the Element Viewer.
# Make sure the timeline is in Clip Editor mode.
# Find the shot you want to add by expanding the sequence in the miscBin, and then expanding subClipTrackGroup, tracks, Film, and children. Note that the name of the new shot must be different from the names of the shots in session A.
# Drag the new shot from the miscBin onto the filmstrip. You can drop it at the beginning of the filmstrip, between two shots, or at the end of the filmstrip. Drop it where you want it to be. Any shots downstream of the new shot will ripple down the timeline, and any sound or effects clips associated with them will also ripple to maintain their synchronization with their shots. (If those sound or effects clips were unlocked beforehand, they won't ripple. For more information, see Track groups.) 
# Because your sequence is now longer than it used to be, you must make the active playback range (the blue filmstrip) longer too. An easy way to do this is to drag the blue filmstrip to be a little longer than your shots, use to place the playhead at the end of the final shot, and then press + to set the end of the blue filmstrip exactly to the end of the final shot.
=== Render settings ===
You may find that the newly imported shot has different render settings than the shots in session A. For example, SFM_logo, the animated logo that ships with the SFM and can be found in game\tf_movies\elements\sessions\logo, has high-quality render settings that make it take a long time to render.
If you want the new shot to render more quickly, you can do any of the following:
* With the shot selected and the playhead inside the shot, right-click in the viewport, click Render Settings, and unselect Subpixel Jitter AA.
* With the shot selected and the playhead inside the shot, right-click in the viewport, click Render Settings, and change the number of samples for Depth of Field and/or Motion Blur to a lower number by using their drop-downs.
* Open the imported shot's scene camera in the Element Viewer, and change the values of depthOfFieldQuality and/or motionBlurQuality to 0. To open the imported shot's scene camera, in the miscBin, under activeClip, open subClipTrackGroup, tracks, Film, children, the name of the shot, and camera:
 
: 
== See also ==
* Conforming
* Importing a second session in the Element Viewer
* Replacing shots
* Replacing animation sets
* Copying visual effects clips and sound clips from a different session
* Working with the Element Viewer
Category:Source Filmmaker
SFM/Copying visual effects clips and sound clips from a different session

You can copy visual effects clips and sound clips between sessions in one of two ways. You can drag them directly from session B in the Element Viewer into session A in the Clip Editor. You can also drag session B's active clip into the viewport, find and copy the clip you want in the Clip Editor, drag session A's active clip back into the viewport, and paste the clip into session A's sequence in the Clip Editor. Either way, clips will be pasted at the playhead's current location.
To copy visual effects clips and sound clips from a second session in the Element Viewer:
# Follow the procedure in [SFM/Importing a second session in the Element Viewer|Importing a second session in the Element Viewer].
# Make sure the timeline is in Clip Editor mode.
# Find the clip you want to copy by expanding the sequence in the miscBin, and then expanding trackGroups, the track group, the track, and children. You can select multiple clips.
# Make sure the playhead is positioned where you want the clip to begin.
# Copy the clip(s) with Ctrl+C.
# In the Clip Editor, click the track into which you want to paste the clip, and press Ctrl+V to paste.
To copy visual effects clips and sound clips from inside the Clip Editor:
# Follow the procedure in [SFM/Importing a second session in the Element Viewer|Importing a second session in the Element Viewer].
# Make sure the timeline is in Clip Editor mode.
# Double-check to make sure that your session A's sequence is listed in the clipBin in the Element Viewer. If it isn't, and you continue following this procedure, you will lose the reference to your original sequence, which means that you will be unable to access any part of it. In effect, your original sequence will be gone.
# Drag the imported sequence from the miscBin into the viewport. This replaces the original sequence in both the viewport and on the timeline, in the Clip Editor.
# Find and select the clip(s) you want to copy in the track groups. Copy them with + or by right-clicking and clicking Copy.
# Drag the original sequence from the clipBin back into the viewport. This replaces the imported sequence in both the viewport and on the timeline, in the Clip Editor.
# Make sure the playhead is positioned where you want the clip to begin.
# Click the track you want to paste the clip(s) into.
# Press + to paste the clip(s).
== See also ==
* Conforming
* Importing a second session in the Element Viewer
* Copying shots from a different session
* Replacing shots
* Replacing animation sets
* Working with the Element Viewer
Category:Source Filmmaker
SFM/CreatingHolds

to create a hold.
step 1: select the controls.
select the entire animation set for the controls you want to "hold" still.
step 2: select half of time.
hold down the shift key and wave the mouse to the right and left over the motion editor until you see the frame you like. with the shift key still held down, drag the mouse to the right until the mouse moves off the motion editor window. this will create a time selection, as the mouse moves off the window, this will anchor the infinite time selection and select all of time after the frame that you started draging from.
step 3: create the hold.
hold down the alt key and wave the mouse cursor over the edge of the time selection at the playhead. as you move the cursor to the left of the playhead you should see the cursor change into a flat line with two arrows on it. this is the handle to drag out the in-falloff for the time selection. since the aly key is held down, doing this will also effect the selected controls motion. click and drag to the left. your animation should be holding still inside the falloff.
step 4: smooth out the transitions in and out of the hold.
select the time region at the borders of the hold and use smooth, round etc to make the transition look more gracefull. don't forget you can select different controls and alt drag the time selection to stagger the motion making it so that everything doesn't move at the same time. (aka twinning)
Category: Source Filmmaker
SFM/Creating shots

__NOTOC__
You can create a new shot either by cutting an existing shot in two (blading), or from scratch.
When you create a new session, it will come pre-populated with a 60-second shot.
== Blading shots ==
When you blade a shot, you cut it in two at a specific point. What you're essentially doing, however, is creating two complete copies of the original shot. Although each bladed shot looks shorter than the original, each contains all the information of that original shot. This means that you can retime a bladed shot to display a different section of the original shot.
To blade a shot, move the playhead to where you want the cut, and press . Now, you have two shots, and you can modify either one without affecting the other. For example, if you change the scene camera in the second shot, when you scrub through the timeline, the camera view will change when the second shot begins.
Continue blading your shots until you have as many shots as you want in your sequence.
== Creating a shot from scratch ==
To create a shot from scratch:
# Create a space between two existing shots by holding down and dragging one shot to the side.
# Right-click in the black gap, and click Replace Gap with New Clip. This creates an empty shot and copies the camera into it.
== See also ==
* Manipulating shots
* Working with shots
Category:Source Filmmaker
SFM/Exporting

You can export an SFM session as either a two-dimensional movie (.mp4) or a still image (.tga) file. A rendered movie is called a layoff.
== Exporting a movie ==
# On the File menu, click Export, and click Movie.
# Set the options in the Export Movie dialog box, and then click Export Movie. You can take the defaults until you know the options you want to modify.
You can also export sound tracks, either as a group or individually.
To export sound tracks:
# Make sure the check boxes for all sound clips and tracks you want exported are selected.
# On the File menu, click Export.
# In the Export Movie dialog box, change the Export drop-down from Movie to Sound.
== Exporting a poster ==
You can export the current frame as an image at whatever resolution you desire by clicking File, Export, Export Poster. There are no advanced options in this dialog box, so if you want to disable ambient occlusion, antialiasing, or motion blur, you have to first right-click on the active camera viewport and click Render Settings.
== See also ==
* Final Picture overview
* Progressive refinement
Category:Source Filmmaker
SFM/Exporting Assets

In order to create models for the SFM Workshop, you will need to compile them from source assets. You can't simply copy them from other games, due to the format differences between games. If you have a copy of Maya, we’ve added the DMX Export Manager script under the Valve menu that will automatically put models, materials and textures into the proper directories for the SFM workshop. If you don’t have Maya, you can create your own .qc file, and compile your model manually. See Exporting a model and Compiling a model for more information. If you run the SFM from Steam, it will automatically create the appropriate model, material and sound directories within the default usermod mod, located here:
:STEAM_DIRECTORY\steamapps\common\SourceFilmmaker\game\usermod
Within that mod, your directory structure should look like this:
:models
:materials\models
:sound
You can put assets anywhere within those directories, but it's always a good idea to add a parent directory that's named specifically to you, so that your assets don't conflict with another creator's assets. For example, if you’ve recorded your best impression of Dr. Kleiner, (and your name is Jon Smith) you might put those sound files in:
:sound\JonSmith\half-life\kleiner
Note that now that assets can be in any directory, you'll want to be careful not to have their names conflict with any existing game assets that ship with the SFM, since the game assets will take precedence. There is a way for users to override player models however - see Overriding Game Models.
Category:Source Filmmaker
SFM/Expression Operator

DmeExpressionOperator is a DmeOperator that writes to its "value" float attribute the evaluated expression stored in its "expr" string attribute.
The expression can read other float attributes on the DmeExpressionOperator, and can nest arbitrarily deep.
For example, the expression "clamp(distance * cos(angle), 0, 10)" will cause the DmeExpressionOperator to write a value between 0 and 10 into its "value" attribute, depending upon the value of its "distance" and "angle" float attributes.
== Operator Precedence ==
* unary operators: + - ! func var
* * / %
* + -
* < > <= >=
* == !=
* &&
* ||
* ?:
== Functions ==
; dtor(d) : converts degrees to radians
; rtod(r) : converts radians to degrees
; abs(a) : absolute value
; floor(a) : rounds down to the nearest integer
; ceiling(a) : rounds up to the nearest integer
; round(a) : rounds to the nearest integer
; sgn(a) : if a < 0 returns -1 else 1
; sqr(a) : returns a * a
; sqrt(a) : returns sqrt(a)
; sin(a) : sin(a), a is in degrees
; asin(a) : asin(a) returns degrees
; cos(a) : cos(a), a is in degrees
; acos(a) : acos(a) returns degrees
; tan(a) : tan(a), a is in degrees
; exp(a) : returns the exponential function of a
; log(a) : returns the natural logarithm of a
; min(a,b) : if a < b returns a else b
; max(a,b) : if a > b returns a else b
; atan2(a,b) : atan(a/b) returns radians (it's Arg(b+ia) actually)
; pow(a,b) : function returns a raised to the power of b
; inrange(x,a,b) : if x is between a and b, returns 1 else returns 0
; clamp(x,a,b) : if x < a returns a else if x > b returns b else returns x
; ramp(value,a,b) : returns 0 -> 1 as value goes from a to b
; lerp(factor,a,b) : returns a -> b as factor goes from 0 to 1
; cramp(value,a,b) : clamp(ramp(value,a,b),0,1)
; clerp(factor,a,b) : clamp(lerp(factor,a,b),a,b)
; elerp(x,a,b) : ramp( 3*x*x - 2*x*x*x, a, b)
; noise(a,b,c) : { solid noise pattern (improved perlin noise) indexed with three numbers }
; rescale (X,Xa,Xb,Ya,Yb) : lerp(ramp(X,Xa,Xb),Ya,Yb)
; crescale(X,Xa,Xb,Ya,Yb) : clamp(rescale(X,Xa,Xb,Ya,Yb),Ya,Yb)
*Note : arithmetic priorites may not work as intended (for instance, 0-0+3 = -3), so adding brackets might be needed.
Category:Source Filmmaker
SFM/Facial Motion Capture Animation

== Note! This information is very hack-y, and quite possibly wrong ==
== Using Kinect to drive facial motion capture ==
Let me start out by saying this is A, experimental, and B, the quality sucks, so C, don't expect much. But, it's still kinda fun. None of the code is compiled, so you'll need the Kinect for Windows SDK, Visual Studio, and of course, Source Filmmaker. But, once you install everything, you should be able to just open up the .sln file and choose 'Start' or 'Debug->Start Debugging' or just hit F5 (after plugging in your Kinect). Once the window loads and starts tracking the face, you press 'Write' to start saving data to a file json.txt (which will show up in your My Documents folder), then press 'Write' again to stop recording. The Kinect takes a minute or two to learn your face, so let it run for a bit before trying to write data, but it sucks at facial gesture recognition anyhow, so even with the training, you data will probably suck anyhow.
Anyhow, once you have that data, in SFM, import an HWM model into your scene, then right click and select 'Rig->Load Rig Script', find the ImportAnimations.py file in the SFMFaceTracker directory you downloaded the code in, then use the window that pops up to load that json.txt file that the Kinect part of this captured.
You can find the code here: GitHub repository for Kinect facial motion capture project
== What's going on under the hood ==
What happens with this code is that it takes in a bunch of information from the Kinect as a set of action units and times for various facial motions. The ImportAnimations.py file then takes that input JSON object, and creates animation curves within SFM for the appropriate controls.
Category: Source Filmmaker
SFM/Facial animation

You can use preset sliders and control sliders to adjust the expression of a character. In the Animation Set Editor, select the controls for the various parts of the face. The Controls panel will update to list the controls you selected.
To adjust a character's expression:
# Move the work camera so you can see the character's face.
# In the Animation Set Editor, select a control for part of the face. The Controls panel will update to list the controls you selected.
# Drag one of the sliders on the Controls panel (for example, BrowInV). The character's expression changes as you move the slider.
# Go into the Motion Editor, and select the region of time you want affected (or select all of time with +).
You can also click the Emotion tab (on the Presets panel), which is visible because your shot contains a character model with facial controls, and play around with the presets. The presets on the Emotion tab control multiple sliders in the Controls panel, to adjust even more parts of an expression simultaneously.
== Working with eyes ==
You can work with eyes as you would any other part of a facial expression. Eyes do have one additional feature, though: the view target. Adjusting the location of the view target adjusts where the eyes look.
To move a character's view target:
# In the Animation Set Editor, expand the character's animation set, expand Eyes, and select viewTarget. This selects the eyes' view target in the viewport.
# Click in the work camera's viewport to give it focus, and then press to aim the work camera at the screen manipulator. This makes it easier to find a view target that may otherwise be off-screen.
# Go into the Motion Editor, and press + to select all of time.
# Reset the view target's recorded motion by dragging the Default procedural preset slider. This will move the view target to the root joint, probably at the character's feet.
# Click in the scene camera's viewport, and then press + to move the screen manipulator to the center of the viewport.
# Drag the screen manipulator's pivot handle. To drag along the world's surfaces, press and hold down . If you want to, you can place the pivot right between the character's eyes.
== See also ==
* Lip-sync animation and Extract Phonemes
Category:Source Filmmaker
SFM/Final Picture overview

The art of making a good movie includes learning how to guide the eye around the screen through the cuts between shots. Final Picture is about using techniques and tools to accomplish that.
You can adjust cinematography, the edit, the color grading, the performance, and the sound all at the same time, from the same desk. The SFM is the first tool ever to allow you to make these kinds of changes all at once, iteratively, as many times as you want.
You can emulate what happens when you view real film in a movie theater by using the tools in the SFM, including using vignetting to darken the edges of a scene, creating film-grain effects, and adjusting color correction, depth of field, lighting, and motion blur.
== See also ==
* Progressive refinement
* Working with lighting
* Working with effects and overlays
* Exporting
Category:Source Filmmaker
SFM/HWM Reference

;
This is a reference sheet for Valve's High-End SFM Facial Animation system, referred as Hardware Morph, or the DMX Format. Some advantages for this system include more power to the animator, corrective shapes, and wrinkle maps. These references are taken from the left4dead2_movies characters.
Due to a glitch on the VDC, I cannot currently upload the pictures to the wiki. You can view them here.
Gambler Base Blend Shapes 
Gambler Corrective Blend Shapes 
;
;
;
;
==Base Shapes==
These are the base blend shapes. These are generally what you control in SFM/Faceposer, however most are combined or renamed when run through DMXEdit. These are generally the most important because having bad base shapes will end up ruining your Corrective Shapes. (Not necessary, depending on the way they were created. You can have a bad OpenLowerLip, but if an 'absolute' corrector with OpenLowerLip is 'good' then you'll get a 'good' face every time this corrector pops in.)
Base shapes are combined into the sliders used for animation via DMXedit script commands. For example, LipsV is a slider that activates OpenLips or CompressLips base shape depending on where you move it.
==Corrective Shapes==
Corrective Shapes are used by Source when certain flexes are ticked. They will form into the shape you create in Maya/Blender after the dmx file runs through DMXEdit. These are used so that you don't have weird looking combinations with certain flexes.
Corrective shapes exist in two different 'flavors': the relative (or 'delta' shapes) and the absolute. Absolute shapes wholly define how the face looks like when sub-shapes are all active. Relative shapes are the difference from the base shape that needs to be added to the mix of sub-shapes to get the absoulte shape. SFM (and studiomdl) expects the corrective shapes to be 'relative', but it's highly impractical to sculpt them this way. The idea is that you sculpt the 'absoulte' shapes and DMXedit (among doing other things) converts them to 'relative'. 
This is a picture that explains the relationship between the 'relative' and 'abosolute' correctors.
==Tongue Shapes==
TODO: Nick's .ma doesn't have any working tongue shapes. Can someone else do them with say, the tf_movies scout?
==SELECT Shapes==
SELECT Shapes are used by DMXEdit to select certain vertices. They work off of the vertex data you feed to it (i.e. centerline divides the face in half based on the vertices, even if you use the edge tool to move it.) Anything that moves here will be selected, even if it moves slightly. 
TODO: These guys need special documentation. Take a look at gambler or the half-head Scout for a reference to these.
Category: Source Filmmaker
SFM/Importing a second session in the Element Viewer

If you open the Element Viewer by clicking Element Viewer on the Windows menu, you can see everything contained in session A (the current session). All you need for conforming, though, is in the active clip (activeClip in the element tree). That's why the reference in the clipBin is to session A's active clip, and not to everything in the session.
 
Whether you're importing a new shot or clip, replacing an existing shot, or replacing specific animation sets, the first thing you do when conforming is confirm that there's a reference to the active clip of session A in the Element Viewer's clipBin. The second thing you do is import session B in the Element Viewer's miscBin. Once you have both sessions represented in their respective Element Viewer bins, you can copy shots and clips from session B into session A, and you can easily preview and compare both active clips.
To import a second session in the Element Viewer:
# If the Element Viewer isn't already open, open it by clicking Element Viewer on the Windows menu, or by pressing . You may want to dock the Element Viewer next to the Animation Set Editor for convenience.
# Make sure the clipBin contains the name of the activeClip of the current session (session A). If it doesn't, drag the activeClip onto the clipBin. The name of the active clip will appear under clipBin.
# Right-click the miscBin, and click Import Element. In the dialog box that appears, browse to the session from which you want to copy the shot (session B), and click Open. A reference to session B now appears in the miscBin. 
# Expand session B in the miscBin. Drag its activeClip up one level, dropping it onto miscBin.. The name of the active clip will appear under miscBin, at the same level as the reference to session B itself. What you're doing is pulling session B's active clip out of session B so you can work with it directly, and so you can remove the rest of the reference to session B.
# In the miscBin, delete the reference to session B. You don't need it now that you have its active clip in the miscBin.
Now that you have the active clips of both sessions available in the Element Viewer, you can copy shots and clips from session B to session A, replace shots, or replace specific elements of a shot.
== Previewing the imported session ==
After you import session B in the miscBin, you can drag session B's active clip into the viewport to preview it there. After you do so, the timeline will also reflect session B's sequence. You can scrub through the sequence and otherwise manipulate it as you would session A's sequence.
You can then drag the active clip of session A back into the viewport, which will replace what you see in the viewport and the timeline with session A's sequence. This previewing feature allows you to easily compare the shots in sessions A and B.
== See also ==
* Conforming
* Copying shots from a different session
* Replacing shots
* Replacing animation sets
* Copying visual effects clips and sound clips from a different session
* Working with the Element Viewer
Category:Source Filmmaker