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 some 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:
2.) Detach all rigs from all actors that have one:
3.) Save the session.
Set up Mount location
If your SFM projects are located in one of the default SFM locations (e.g. common/SourceFilmmaker/game/usermod/elements/sessions
), then PFM should be able to find them by default. However, if they are under a custom location (e.g. SourceFilmmaker/game/ninja12r
), you will have to do the following to allow Pragma/PFM to find them:
- Open
Pragma/cfg/mounted_games.udm
in a text editor - 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"
}
}
- Add the custom location to the
game_paths
list. For instance, if your project files are located incommon/SourceFilmmaker/game/ninja12r/elements/sessions/
, then the path you should add is "common/SourceFilmmaker/game/ninja12r/":
Make sure to add the ',' for the previous entry as well, as shown in the screenshot above.
- Save the file and close it.
Importing the SFM Session
Once you've completed the previous steps, you're ready to start Pragma. Double click pragma.exe
and click New Game
. Here you will have to select the map that was used for the SFM session, as well as Filmmaker
for the Game Mode
. Now click Start Game
. If this is your first time loading the map, the map and its assets will have to be converted to Pragma's formats first, which may take several minutes or more, depending on the map's size and complexity.
Once the map has been loaded, you should be greeted by the PFM interface. You can now import the SFM project from the menu bar via File > Import > SFM Project
. Once again, this may require a lot of asset conversions and may take a while. While it is loading PFM will appear frozen. Eventually you should be able to see your scene pop up in the viewport.
The next step depends on what you're trying to accomplish. If you want to get straight into rendering, you can check out some of the rendering workflow tutorials:
Regardless of your goal, it is also recommended that you familiarize yourself with the user interface, as well as read up on some of the rendering tutorials. Please don't hesitate to ask questions on the Discord server if you're having trouble!
You can find an overview of all available chapters about PFM here.
No Comments