Skip to main content

SFM to PFM Workflow

This workflow describes the general approach if you want to import a SFM project into Pragma and render it. There are a few things to take into consideration:

  • SFM and PFM are not entirely compatible, which means that importing a SFM project into Pragma will likely result in significant differences (e.g. in terms of lighting) and will require some manual adjustments.
  • Try to avoid large, complex projects and/or maps. Smaller projects on smaller maps (or scene builds) tend to work better.
  • The Meet-the-Team sessions that are shipped with SFM are not supported, as they are based on older versions of the SFM project file format. They may partially work, or not at all.
  • Fake PBR models are not compatible with PFM, because they abuse the specific rendering methods that SFM uses. If you don't know what fake PBR is, it will most likely not be a problem.

Now that that's out of the way, there are two things have to take care of before you can import your SFM session into PFM:

Geting your SFM Project ready

Detach IK Rigs

PFM does not support SFM IK rigs. If your animation uses any IK rigs, you have to follow these steps in SFM first:

1.) Make sure all transforms for all actors are unlocked:

unlock_transforms.png

2.) Detach all rigs from all actors that have one:

3.) Save the session.

Set up Mount location

Pragma can locate most Source Engine assets of your installed Source Games automatically, however if your SFM projects or assets are located in a custom directory under Steam/steamapps/common/SourceFilmmaker/game/customLocation, then you will have to do the following to allow Pragma/PFM to find them:

  1. Open Pragma/cfg/mounted_games.udm in a text editor
  2. Find the following entry:
"sfm"
{
	$bool enabled 1
	$string localization_name "mount_game_sfm"
	$int32 priority 950
	"steam"
	{
		$uint32 app_id 1840
		$array game_paths [string][
			"common/SourceFilmmaker/game/usermod/",
			"common/SourceFilmmaker/game/workshop/",
			"common/SourceFilmmaker/game/tf_movies/",
			"common/SourceFilmmaker/game/tf/",
			"common/SourceFilmmaker/game/hl2/",
			"common/SourceFilmmaker/game/left4dead2_movies/",
			"common/SourceFilmmaker/game/platform/",
			"common/SourceFilmmaker/game/portal2/"
		]
		$bool mount_workshop 1
	}
	"engine"
	{
		$string name "source_engine"
	}
}
  1. c

2.) Launch PFM and import the Project

You can launch PFM by launching Pragma, clicking "New Game" and changing the game mode to "Filmmaker".

PFM currently doesn't change the map when importing a SFM session, so you will have to select the map in the "New Game" menu before clicking "Start Game"! If you're loading a map for the first time, Pragma will have to convert the map and all of its assets first, which may take several minutes. This only has to be done once for every map/asset, so loading should be faster next time.

Once the Filmmaker has been loaded, select "File -> Import..." from the menu bar and select your SFM project, then press "Open". This will once again start a conversion process, which may take several minutes (Pragma may appear frozen during this time). After the project has been imported, you can save it in PFM's internal format (".pfm"), which can be loaded a lot faster.

If your SFM session file is located in one of the default sub-directories in "steam/steamapps/common/SourceFilmmaker/game/", your SFM session file should be listed in the import file explorer automatically.
If the file is located in a custom location (e.g. "SourceFilmmaker/game/custom/elements/"), you will have to open "Pragma/cfg/mounted_games.txt", locate the "sfm" entry and add your path to the "game_paths" list in the same format as the existing ones. If this doesn't work, you can just copy the session file to one of the default sub-directories (e.g. "SourceFilmmaker/game/usermod/elements/").

Here's an example video on how to load a map / a project:

(The video is from an older video of Pragma / PFM, but the basic approach is still the same.)

 

For information on how to render your animation with Pragma, check out this article.