nyuuzyou/wikis huggingface dataset:
SFM/Importing game animation

You can import animation clips from TF2 into animation sets. This means you can give your characters familiar animation movements from the game, and you can modify those movements.
To import game animation into a model's animation set:
# In the Animation Set Editor, right-click the model's animation set, click Import, and click Sequence.
# In the Select Sequence/Activity dialog box, choose a sequence from the top drop-down (where it currently says ref).
# For animations with sliders, adjust the various sliders the way you want them. For example, the move_x slider sets the speed in a running sequence.
# Click Open.
Now you can see the animation in the Motion Editor, and a line of green dots indicating the model's 3D motion path through your scene. You can translate and rotate the model to line up its movement the way you want.
== See also ==
* Working with objects
Category:Source Filmmaker
SFM/Introduction To HWM

If you've ever made a short in SFM or played around with the TF crew in Garry's Mod, chances are you've seen character models with the prefix HWM. HWM stands for Valve's Hardware Morph system. This is the main system used by Valve for the movies made in the Source Filmmaker, which give high-end controls to the animator for facial animation. These are meant to be used mostly for movies, as they are very costly and contain over 50 controllers on most faces, with a ton of underlying programming for the controls.
==The DMX Format==
DMX, built off of the SMD, is the current model format used to create models for the Source Engine. Currently, plugins are available for both Maya (supported officially) and Blender (third-party). DMX stores flex data, much like a .vta, however you can keep them all in the same file using the blendshape node. That's why it's used by Valve for character authoring now. HWM can only work using the DMX through DMXEdit. DMX supports 128 flex controllers and an unknown (but much higher) number of shapes. TF2's HWM ("hardware morph") models use a standard set of 50 shapes and 35 controllers and about 100 corrective shapes.
==Corrective Shapes==
==Further Reading==
*Wrinklemaps
*HWM Reference
*Authoring HWM
Category: Source Filmmaker
Category:Modeling
SFM/Lip-sync animation and Extract Phonemes

The SFM can extract phonemes from a dialog clip to create a preliminary lip-sync animation that you can then refine. You can create lip-sync animations for both existing dialog clips and new ones you record yourself.
To create lip-sync animation for a dialog clip:
# Right-click the dialog clip, and click Show Waveform. Note that only waveforms with Show Waveform selected will be used for automatic lip-sync.
# Hide the waveforms for other sound clips by right-clicking them and clicking Hide Waveform.
# In the Animation Set Editor, expand the character's animation set.
# Right-click any of the character's controls, and click Extract Phonemes. (You can take the defaults until you know how you want to modify them.)
# Click Extract.
You can now play back your movie to see your new lip-sync animation.
== Refining lip-sync animation ==
To refine lip-sync animation:
# In the Animation Set Editor, select the Lower Face and Tongue controls for your character. As you select the controls, you can see the mouth sliders appear on the Controls panel.
# Go into the Motion Editor. You can see the motion data for the character's mouth sliders.
# Right-click in the Motion Editor, and click Show Waveform. Now you can see the waveform of the dialog clip behind the facial animation curves.
# Play with the presets to adjust your lip-sync animation. For example, you can use Smooth to smooth out the movements.
# Next to the Procedural tab, click the Phoneme tab.
# Play with the phoneme presets to further refine your lip-sync animation.
== Automatic lip-sync animation for custom models ==
Phoneme extraction will only work on the HWM TF2 classes, and HL2 FACS-compliant models.
For other models, here is a YouTube tutorial that explains how to create your own phoneme table.
To enable HL2 models (that are FACS-compliant) to accept phoneme mapping:
#Right-click on the AnimationSet of the model you wish to enable phoneme mapping on
#Select "Show in Element Viewer > AnimationSet"
#Switch to the Element Viewer
#Right click on the root of the AnimationSet (ie: Alyx1) and select "Create Phoneme Presets based on HL2 FACS controls".
== See also ==
* Facial animation
Category:Source Filmmaker
SFM/List of useful SFM tutorials

== Element Viewer ==
 Element Viewer Quadrology by Red Mser (Basic | Advanced 1 | Advanced 2 | Advanced 3)
Tutorial explains basic concepts behind Element Viewer, goes into details about the differences between Animation Set, Channels Clip and Dag and how to apply all this information in your SFM projects. Tutorial also shows examples of properties that can be only modified through Element Viewer (f.e. material properties of the models) and shows the way you can animate them.
Category:Source Filmmaker
== Particle Editor ==
 SFM Particle Editor Tutorial by Red Mser (Youtube)
Tutorial shows basic usage of Particle Editor.
SFM/Manipulating objects overview

You manipulate objects both to pose them and to create animations for them. When you manipulate objects, what you're really manipulating is their controls. Every place a control is represented in the UI—in the viewport, in the Animation Set Editor, in the Controls panel, in the Motion Editor or Graph Editor—updates automatically when you change that control in any other place.
You can rotate and translate controls by using the 3D manipulators: the rotation manipulator, the translation manipulator, and the screen manipulator (which can modify both rotation and translation). You can also manipulate controls by keyframing in the Graph Editor.
To animate zooming the camera:
# In the Animation Set Editor, select the scene camera's animation set.
# Expand the animation set, and expand the all subgroup underneath it.
# Select the fieldOfView control. Any modifications you make now will be applied only to this control.
# On the timeline, go into the Motion Editor. Press + to select all of time if it isn't already selected.
# Drag the fieldOfView slider to set the starting zoom. The time selection turns orange, indicating that there's a manipulation on the floating modification layer.
# Press to apply the floating modification layer. The time selection turns green again.
# Now that you have set the starting zoom, drag the fieldOfView slider to create the camera zoom animation you want.
# While the floating modification layer is active, trim the region of time you want to modify. You can do this by dragging the infinite time selection handles (the zig-zag lines on the far left and right of the Motion Editor window). Note that the starting zoom is still there underneath the floating modification layer. You can also drag out a falloff to create a smooth transition between the previous animation and the floating modification layer.
# To review, press + to play back your animation. Make further adjustments as necessary.
# When you are satisfied with the results, press to apply the floating modification layer.
== See also ==
* Puppeteering
* Facial animation
* The translation manipulator
* The rotation manipulator
* The screen manipulator
* The viewport as manipulator
* The Presets panel and the Controls panel
* The floating modification layer
Category:Source Filmmaker
SFM/Manipulating the timeline

You can use the buttons in the upper-right corner of the timeline to lock the playhead (so the playhead moves over the filmstrip, instead of the filmstrip moving under the playhead); enable or disable frame snapping and edge snapping; determine whether the playback plays once, loops, or bounces (plays backward and forward in a loop); mute playback; and set options.
Command 	Shortcut
Play or pause (toggle) 	Press , or click the play button in the viewport.
Play only the selected shot 	Press +
Scrub through time 	Drag the top of the playhead, or drag the filmstrip
Pan the filmstrip and playhead left or right 	Drag the bottom of the playhead
Zoom in and out (around the playhead) 	Rotate the mouse wheel
Go to previous shot 	Press
Go to next shot 	Press
Scrub left one frame 	Press
Scrub right one frame 	Press
Go to beginning of filmstrip 	Press
Go to end of filmstrip 	Press
Set filmstrip to the out point of the last shot 	Press +
Set filmstrip to the in point of the first shot 	Press +
Toggle between the Clip Editor and either the Motion Editor or the Graph Editor (whichever you were most recently in)	Press
== See also ==
* The timeline
Category:Source Filmmaker
SFM/Materials override

To add materials override you need to right click on animation set and select "Add override materials". This will allow you to see "materials" folder if you open this model in Element Viewer. There you will be able to open any material and add some custom attributes that will override corresponding parameter in this model VMT file.
Once your animation set has override materials enabled, you can right-click on any material in the Element Viewer under "gameModel > materials", highlighted in green, and choose "Add Attribute", then select the type of custom attribute you wish to add. A small window will show up, allowing you to define the name of the attribute, which must be the name of a material command (as you would see in a VMT material file). Then click "OK" to create the custom attribute. You can now set whatever value or string you want for the attribute, depending on the type of attribute you have chosen.
Types of attributes that can be overridden (or added) in SFM: 
List of attributes that can be overridden (or added) in SFM:
 VTF path for texture replacement
 brightness of phong effect
 changes color of the material.
 Controls the amount that the detail texture affects the base texture. A value of 0 usually makes the detail texture have no effect, whilst a value of 1 applies the full effect. 
List of attributes that cannot be overridden (or added) in SFM:
SFM/Maya DMX Export Manager

The Maya DMX Export Manager is a simple tool which can help with saving and configuring maya scenes for export and compilation into game models. It can be accessed from Valve menu, which is available if the sfmValveSetup.mel script has been sourced in Maya or if Maya was launched with runmaya.bat. If the Valve menu doesn’t show up, check the Maya script editor for possible error messages involving configuration issues.
Exporting Models
In a maya scene with meshes, select the meshes to turn into a game model and select Valve -> DMX Export Manager. If the maya scene isn’t saved in the VPROJECT content tree, the New Asset Directory Wizard will come up prompting for a model name. The Create Blank Material option will create a blank psd image file, which can then be compiled to a vmt (game material) and vtf (game texture). If you edit the psd file and compile the model, the material will also be compiled and your image edits will be available in Maya and on the game model.
Once the scene is saved under the VPROJECT content tree, the Maya Export Manager will show up with an export item for your selected meshes ready to be compiled into a game model. Press Export And Compile All Items to compile your model and any assigned game materials. If there are no errors in the command shell output window, then you can click on the view button in the export item to launch hlmv to view your compiled model. There are many helpful options on the export item that you can access by right clicking anywhere in the export item itself.
== Exporting Animation ==
To export an animation from maya to SFM, you'll need to select the bones of the model, for a Valve model; for example the TF2 scout, you would select scout_rig:Ref:bones then go 
 File > Export Selection ■
Clicking the square to open up the options to bring up this window
Valve DMX exporter
Then choosing appropriate settings and Exporting.
--Chopp 00:25, 14 November 2013 (PST)
Category:Source Filmmaker
SFM/Movie mode and game mode

In the SFM, you can be in one of two modes: movie mode or game mode. You record in game mode; you modify that recording in movie mode. (You will probably spend most of your time in movie mode.) You can toggle game mode on and off with .
In game mode, you can do anything you could normally do in that game: fire a weapon, switch weapons, take damage, kill an enemy, move around with WASD, interact with the environment and other players, and so on.
When you toggle game mode on, your player character will start out at a player spawn point. You can run through the map to the place where you want to record your gameplay, or, in movie mode, you can teleport the player to the viewport's camera by right-clicking in the viewport, clicking Game, and clicking Teleport Player to Camera.
 
When you have your player character in position, you're ready to record gameplay.
== See also ==
* Populating your scene overview
Category:Source Filmmaker
SFM/Navigating with the camera

You can navigate with the camera in one of two ways: with WASD controls, or with Alt controls.
== WASD controls ==
To navigate around your map, manipulate the camera by holding down the left mouse button and doing the following:
Command 	Shortcut
Rotate the camera	Drag
Forward 	Press
Back 	Press
Left 	Press
Right 	Press
Up 	Press
Down 	Press
Roll 	Hold down and drag
Zoom in and out 	Rotate the mouse wheel
Speed up 	Move and tap or hold
Slow down 	Move and hold
== Alt controls ==
Release the left mouse button to perform these actions:
Command 	Shortcut
Orbit 	Press and drag
Pan 	Press and drag with the middle mouse button
Dolly in and out	Press and drag with the right mouse button
Zoom in and out 	Rotate the mouse wheel
== See also ==
* Cameras overview
* Adding a scene camera
* The viewport as manipulator
Category:Source Filmmaker
SFM/Optimizing Render Time

== Reducing Render Time ==
Rendering in the SFM can take a while, especially with all the quality settings at maximum, but there are ways to reduce render time while keeping quality high.
=== Only Render Changed Shots ===
If you're rendering as image sequence instead of as a movie, then you can render just the shots that have changed since your last render. This can often be the greatest render speed increase you can attain, especially late in a project, when only a few shots are changing at a time. In the Export Movie dialog, change the Duration to Selected Shots to only render the shots you have selected in the timeline.
=== Tune Progressive Refinement Settings Per Shot ===
While it's often easiest to set a single set of override progressive refinement settings, you can find yourself rendering everything at a high quality when some shots don't need the extra render samples in motion blur or depth of field. Tuning the samples per shot can save a lot of time, but allow you to keep the high quality settings where needed. To edit those sample counts per shot, open the shot in the Element Viewer, and edit the motionBlurQuality and depthOfFieldQuality attributes on the shot's camera. For both of those attributes, 0 means 8 samples, and every increase by 1 doubles the number of samples. (So 1 means 16 samples, 2 -> 32, 3 -> 64, 4 -> 128, 5 -> 256, 6 -> 512, 7 -> 1024) Note that motionBlurQuality only goes up to 5 (256 samples) but depthOfFieldQuality goes up to 7. (1024 samples)
While a render is progressing, information is written about the render times and settings into a .txt file in the same directory as the output render. Looking at the Frame Time in this file can help you find where most of the time in your render is spent, so you can make choices about where to adjust quality settings. The current quality settings are in the DoF Count annd MBlur Count columns as sample counts.
=== Turn Off Shadows On Lights That Don't Need Them ===
Every light that has shadows requires the SFM to render the scene an extra time, so if you have lights that have shadows that aren't needed, you can reduce your render time a bit by disabling shadows on those lights.
=== Preview Renders ===
For renders that aren't final, you can significantly reduce render time by turning off progressive refinement and rendering at lower resolution. Note that if you're rendering at a lower resolution, you only get the speed benefit if your movie resolution is the same as the SFM's resolution. So if you render a movie at 720p, but you have -sfm_resolution 1080 on your commandline, your movie won't render as fast as if that commandline option was removed.
Category:Source Filmmaker
SFM/Populating your scene overview

After you load your map, you can start populating your scene in two ways:
* Recording gameplay (and all its elements).
* Adding elements manually, and then adjusting their animations.
You manually add elements, including props, character models, lights, cameras, and particle systems, by creating an animation set for each. After you create an animation set, you can then manipulate it to create animation.
== See also ==
* Movie mode and game mode
* Recording gameplay
* Working with objects
Category:Source Filmmaker
SFM/Progressive refinement

== Overview ==
In SFM, a single frame is not a still image; it's 1 second divided by the number of frames per second your project is working in (the default being 24). This means that any object in motion in-between the frames is being interpolated, that motion data is stored in your session. When motion blur is enabled, each frame of the motion data is sampled by the number of samples specified in your project render settings, the same also applies for the cameras aperture and light radius attributes. Progressive refinement is a rendering technique that simulates motion blur, depth of field, soft lighting and shadows. It does this by slightly altering the location and rotation of cameras and lights within each frame, adding all the samples to a single frame and dividing by however many samples there are, to get a result that is the average of all the samples in the frame.
The more samples in each frame, the better the quality, as samples are less distinguishable from each other. The main benefit of doing this inside of SFM is it's ability to use the internal HDR format to render motion blur and bright volumetric lights in a more realistic fashion, with bright highlights staying bright. However this comes with the downside of massively increased render times.
For "Depth of field" progressive refinement, instead of sampling interpolated motion data, SFM instead Generates randomly positioned motion data to sample in between frames. For the camera's "out of focus" effect, it takes the position of the camera and shifts the location relative to the focal plane randomly for each sample. At the default 8 samples, this looks off-putting, so instead the samples are increased to 64 or above or the camera's "aperture" channel is set to 0 whilst the setting is still enabled. When the aperture is set to 0, Extra care will have to be taken to separate the subject from the background using lights and a lower tone-map scale on the camera.
Sampling is done in parallel up to 64 samples, each increment above that is calculated sequentially and takes twice as long. For this reason, 64 samples for progressive refinement is recommended as the best middle ground when rendering. while there is an upper limit of how much motion blur you can use, the same can't be said for depth of field blur or light radus, so caution must be used whe setting high values for them. If you are struggling to render, right click the viewpoint and under "render settings" disable motion blur, ambient occlusion and set the aperture attribute on your scene camera to 0.
== Sample Settings ==
These can be found by clicking the top entry in the list when right-clicking the viewpoint, also found in the render settings or element viewer. Currently, the number of samples you can utilize for progressive refinement is as follows:
Depth of Field: 8, 16, 32, 64, 128, 256, 512, 1024
Motion Blur: 8, 16, 32, 64, 128, 256
== See also ==
* Final Picture overview
* Exporting
Category:Source Filmmaker
SFM/Publishing Assets

Once you have a model or sound in the proper directory, publishing to the workshop is easy. Just click Sharing -> Workshop -> Publish Models To Steam (or Publish Sounds To Steam) in the File menu, and fill out the dialog that appears. It will ask you for the files you’d like to publish as part of your new workshop item, a preview image to show on the workshop page, as well as the title and description of the item and some categories that will set tags for users to search for your item. Note that multiple related models and sounds can (and often should) be part of a single item. For example, other SFM users would generally prefer to download a set of Scout lines, rather than downloading each line one at a time. Similarly for models, SFM users would be much happier downloading a set of woodworking tools than downloading a hammer, saw, screwdriver, etc separately. Any dependent files will automatically be uploaded as part of your submission. For models, this means vvd’s, vtx’s, materials, textures, and (optionally) any preset (.pre) files. The list of primary files (but not the dependent files) will be automatically added to the end of the description for this item.
Category:Source Filmmaker