Source Filmmaker Guide

How to Port Assets into Source 2 Filmmaker (Abandoned) for Source Filmmaker

How to Port Assets into Source 2 Filmmaker (Abandoned)

Overview

Since as of currently writing this, a guide for porting stuff over into Source 2 is nearly non-existent, until now! The goal of this guides existence is to explain how to get your assets from the first Source engine over into Source 2!Source 2 has been around since June 2015. When the Dota 2 Reborn Beta released, the whole game was ported over to the new engine, making it the first game ever to use it! It can also be found in SteamVR and more recently, in Half-Life: Alyx. All of which have their own Filmmaker using the Source 2 engine.This guide has now been abandoned due to lack of interest and motivation however, the contents within will remain unchanged. This guide does not cover the S2FM found in Half-Life: Alyx!

Author’s Note

Everything you see here was written, researched, revisioned multiple times and carefully pieced together by one person who made it their mission to make porting to S2FM a much easier journey for you, while having learned the in’s and outs of understanding how the new formats work with very little documentation written about it online. There were many problems with how the guide originally was published and I deemed it necessary to hold back on making this public until I figured out a much less embarrassing way of presenting my hard effort work to you guys.

S2FM is not going to be for everyone and that’s alright. I didn’t make it for the entirety of the SFM community to suddenly switch over because “hey, the porting process is not that bad” I wrote it for the few who would be curious enough to have a look and would like to play around with their own assets in the program. It’s definitely not a full replacement to the already existing standalone SFM release and I would rather wait for this program to be polished up a lot more before it receives an official release… If it ever gets one that is…

This S2FM is really limited and lacking quite a lot I found the more I worked with it (At least the Dota 2 one is, and SteamVR is even more offensive with broken map lighting). I strongly suggest you give the Q&A at the end of this guide a read before head diving into this so you know exactly what you’re getting yourself into! Things may go smoothly for you, or it may lead you down a rabbit hole that you’ll have to dig yourself out from until you figure out the problem. I tried to do my best to address most of the issues in detail throughout the guide. If everything is done as described, you’ll have a subpar TF2 Sniper in your scene with limited abilities. If you’re still ok with that, then may the Source 2 Spaghetti Monster have mercy on your soul!

Good luck.

Prerequisites

Here are the tools you’ll need to get yourself started!

Required regardless of which S2FM you choose!!

  • Crowbar
    For Decompiling .mdl files and unpacking .vpk files.
    Link to download: [link]

  • VTFedit
    For opening and exporting .vtf files.
    Link to download: [link]

  • Blender
    This guides 3D tool that is free, though any 3D program should do as long as it supports Source Tools!
    Get it from Steam: [link] or visit the website: [link]

  • Source Tools Add-on for Blender
    Get it here: [link]

Required For Dota 2 Reborn S2FM

  • Dota 2
    Download Dota 2 from Steam: [link]
  • Workshop Tools DLC

Required for SteamVR S2FM

  • SteamVR
    Download it here: [link]

  • Optional – A VR headset
    There is a way to bypass it if you don’t have one.

Required For Half-Life: Alyx S2FM

  • Your Wallet
    You saw it coming. You want this? You got to pony up for it. Considering I don’t have VR and the only incentive to buy this would be for the Filmmaker, that price tag is not exactly enticing.
    [link]

Note: Half Life: Alyx is not covered in this guide.

1. Preparing Models (with blender)

Since your model is currently in Source 1, we need a way of getting it out and into Blender! (Or really any other 3D software of your choosing that supports Source’s format).

Step 1: Importing to Blender

We need Crowbar for this. Go ahead and boot that up!

Go fetch your .mdl file of the model you’ll be using! If you’re not quite sure where that is, it’s usually under the search path:

SteamLibrary/Steamapps/common/Sourcefilmmaker/game/[Mod Folder]/models

For example, I’ll be using the Sniper model (you don’t have to pick hwm like I did). Set the output to Subfolder, make sure .QC File is ticked under Re-Create Files. When ready, hit Decompile!


After when that’s done, you should have a folder where your model has been freshly Decompiled into separate .SMD files along with a .QC file.

Next up, we’re going to launch Blender! Any version that works with Source Tools should be fine.

Under File, go to import your .QC where the program should load up the whole model along with it’s skeleton!

Friendly reminder, this option is not available if you haven’t already installed the Source Tools addon for Blender!! If it’s not there, you need to go back and set it up correctly before you can continue.

Step 2: Model Editing (Sniper)

This step will vary from model to model, but essentially what you’re doing here is modifying the model to eliminate any problems you might have with it later on in the porting process.

Sniper has several problems and you’ll probably see it the moment he gets imported to Blender straight away: He’s facing down, while in edit mode, he’s standing up. The mesh is actually not properly aligned with the bones X rotation and is offset by 90 degrees. Importing to Source 2 now will result in some funky business happening where the skeleton will appear completely disjointed from the mesh! He also has a problem I found where certain bones appear completely absent when imported to Source 2 while the rest of him remains intact!

Deleting unnecessary components
Your model may have parts that Source 2 can not understand and won’t compile. Such as the VTA vertices. Won’t matter whether or not you delete it, it just simply won’t be included in the .DMX compiler.

(Optional)The teethhat_bodygroup can be safely deleted, although it is a slight downgrade. The material for this is no where to be found from where I’ve looked and even after a deep dive file explorer search, I was met with unsatisfactory results. If you can find it yourself, by all means, include it.

Last but not least, sniper_physics should probably also be deleted. This will compile, but the model editor in Source 2’s Workshop tools expects there to be a material for it, which clearly there is not and shows up as an ugly red wireframe hanging around Sniper. I do not know if there is a proper way to implement physics for characters in S2FM but for simplicities sake, let’s leave it out for now.

Fix for missing bones within Source 2
Our first major problem, Sniper has separate body mesh parts for his left arm (his left, not yours) which for some reason, will cause the bones to vanish in that region while the rest of him will remain intact in Source 2. Easy solution is to join it up with the main body itself as one whole mesh. While in Object mode, drag select his arm until highlighted in yellow, then hold shift + left click sniper’s body (the body should be highlighted yellow while the arm is highlighted in orange), right click somewhere on the Viewport and select Join.

Fix for disjointed Skeleton from Mesh
Go into side view. Select the armature in Edit mode (where the Sniper is standing up right) and rotate the skeleton 90 degrees behind him using the 3D cursor as the pivot point while holding down Ctrl so it snaps in increments. Refer to the picture on the right on how exactly the skeleton needs to be positioned!

The reason we do this last is because the mesh does this funky thing where the hand you joined up with the rest of the mesh has a seizure when you move the skeleton first.

And even after all that, he still won’t be quite perfect. The rest involved micro management tweaks that would make this guide go for too long if we went through them all. To keep it simple, we’re leaving it here for now. Hit save for now and we can move on…

Step 3: Using Resource Compiler

Like Source 1, Source 2 also has it’s own model compiler, called Resource Compiler. They can be found here and need to occupy the Engine Path box:

Dota 2

Steamsteamappscommondota 2 betagamebinwin64

SteamVR

SteamsteamappscommonSteamVRtoolssteamvr_environmentsgamebinwin64

Point to your Material Path, in my case it’s in my Source Filmmaker where Snipers textures are found, though I’m unsure if this really matters.

Export Path can be anywhere, such as in a folder on your desktop.

I usually do DMX. Leave the Target up Axis as it is.

Hit Export.

You might have noticed that we didn’t need to write a .QC file for this. That is because .QC files do not exist in Source 2, therefore are no longer a required thing to worry about.

You now need to find where you exported those files. Save your current session in blender, create a new session and import the newly exported .DMX files, including the .DMX found in the anims folder within, so the skeleton also shows up!

Step 4: Exporting

The final step is to export the model as an .fbx file! (It can also accept other formats but this is simply the easiest to work with).

Before hitting Export, go to the export settings window and change the scale factor from 1.00 to 0.01! This is because .fbx handles model scaling very weirdly! This is so your model won’t load up as a literal giant within S2FM.

Save it wherever for now, such as in a folder on your desktop.

That’s it, you’re done with Blender for now!

Important!

The workshop tools can not read files with upper cased letters, contains spaces or special characters in them. Stick to lowercase letters with underscores!

2. Preparing Materials

You got VTFedit handy on you? We’re gonna need it right about now!

Go find your .vtf files that were apart of the model you decompiled. They should be in the materials folder, then models:

steamappscommonSourceFilmmakergame[Mod Folder]materialsmodels

For Sniper, he’s materials are located here:

steamappscommonSourceFilmmakergametfmaterialsmodelsplayersniper

The arrows on his back are located here

steamappscommonSourceFilmmakergametfmaterialsmodelsweaponsc_itemsc_arrow.vtf

Some .vtf files may be shared across multiple models, in this case they will be found in a folder labelled “Share.” This is the same case with Sniper’s eyes. So they would be located here:

steamappscommonSourceFilmmakergametfmaterialsmodelsplayershared

After you’ve gathered all the applicable .vtf, you’re going to open each of them with VTFEdit and export as a .tga file! Do not worry about the .vmt files, they can be safely ignored.

Also, regular diffuse color files should be called this: _color.tga
Normals should be _normal.tga and so on and so forth with any other types of files you might have.

Save them wherever for now, such as in a folder on your desktop.

Reminder:

Once again, save without capitals, spaces or special characters being present. Keep it all lowercase with underscores otherwise the material editor won’t pick them up!

3. Setting up the Workshop Tools

The next step is to setup and prepare using the workshop tools from the respective games. This is where the tools are housed to begin importing your models… So far only Dota 2 and SteamVR are covered here. Half-Life: Alyx will be covered at a later date.

Dota 2 Workshop Tools Setup

When you go to launch Dota 2 from Steam, if you have the Workshop Tools DLC installed, you’ll be greeted with the option to launch from it!

When you’re in, you’ll be greeted with this window. Ignore absolutely everything except for where the red box is!

You need to create a new addon for your S2FM to use custom ported models! Whatever you named your addon, that will be the name of the folder you’re going to want to store all your assets into! I named mine s2fm (Source 2 Filmmaker) but you can name it whatever you want, as long as it makes sense to you. Verify it showed up in the list, highlight it and hit “Launch Tools!”

SteamVR Workshop Tools Setup

This will be a little different depending whether or not you have a VR headset. If you do not, there is a guide already explaining the process behind getting access to it here: [link]
Whatever you named your addon, that will be the name of the folder you’re going to want to store all your assets into! I named mine s2vrfm (Source 2 VR Filmmaker) but you can name it whatever you want, as long as it makes sense to you. Verify it showed up in the list, highlight it and hit “Launch Tools!”

4. Using the Workshop Tools

At this stage, your model should now be ready for the next step. The process is largely the same between Dota 2 and SteamVR. Half Life: Alyx will be covered at a later date.

After you have launched the tools addon, you’ll be greeted with this menu! We’re going to focus our attention on the Model and Material Editors for now. Yes, I can tell you’re eyeing off that Source Filmmaker icon, but hold it in for just a little longer, we’re nearly there!!

Model Editor

First off, let’s visit the Model Editor! You’ll be greeted with a large empty window with 2 options down the bottom. The first option is if you already have models ready to be viewed, which we don’t currently. The second option lets you create a brand new .vmdl file from a mesh file, exactly what we want!

Now, the Model Editor is kinda picky with what’s put on it’s plate, it won’t touch or open anything unless the file(s) is placed within it’s correct directory here:

Dota 2

Steamsteamappscommondota 2 betacontentdota_addonss2fm

SteamVR

SteamsteamappscommonSteamVRtoolssteamvr_environmentscontentsteamtours_addonss2vrfm

Note it will still work if you place the .fbx file in folders above that, such as the models folder for example. You can create as many folders as you want above it, as long as it’s within the correct file path.

Now for the moment of truth. If everything is in order, you’ll get this pop up. Click “Ok”.

DON’T PANIC! You haven’t done anything wrong! In fact, this is exactly what is meant to happen! The main thing is, you managed to successfully create a .vmdl model without issues… Now let’s make it a little less creepy by fixing what is going on here.

Down the side of the Outliner, this tell us your model needs replacement materials. So let’s give the Material Editor a visit! You can access it via the Tools drop down menu in the top right hand corner!

Model Scaling Problem…

If the model is shown where the ground plane is tiny relative to the model, then you didn’t apply the correct scale value in blender when exporting as a .fbx file, in which case, go back and do so (with a value of 0.01) and then import as a fresh new .VMDL file! You may also want to delete the extra .VMDL_C and .VMESH_C that was generated by the Model Editor (which is what the game actually uses when you save changes to the model) found here: Dota 2 Steamsteamappscommondota 2 betagamedota_addonss2fmmodels SteamVR SteamsteamappscommonSteamVRtoolssteamvr_environmentsgamesteamtours_addonss2vrfmmodels

Material Editor

In this window, you’re going to create new .vmat files! Remember the _color.tga files we got earlier? Create as many new .vmat files as you have those, all saved under the same name and location!

Dota 2

Steamsteamappscommondota 2 betacontentdota_addonss2fmmaterials

SteamVR

SteamsteamappscommonSteamVRtoolssteamvr_environmentscontentsteamtours_addonss2vrfmmaterials

Note:
You can create custom file paths for easier sorting management after the materials folder (for example: materials/models/tf2/sniper). This will work, as long as it’s in the correct directory to begin with.

Let’s change our focus to the Properties menu! Each .vmat highlighted will have it’s own menu like this. This is where you would apply things like Normal maps, Specular, Translucent ect.. if your model has these, you can convert those over too! The only thing left to do is assign which .vmat talks to which .tga. Again, these HAVE to be in the same directory and must only contain small letters and underscores. If they don’t show up, change search options to the second option in the drop down menu while in file explorer. Once you’ve linked each .vmat to each of the same named .tga’s, we can move on.

Btw, if you want Sniper’s glasses to be translucent, like this for example:

In the Properties Menu for that material, tick the box for Translucent, go down to the new properties menu, Change to Slider and well, this bit falls down to personal preference on how translucent you want it, but a value of .700 is what is applied in the render above. Save your material and that should be applied the next time you go to launch S2FM. You might have to restart the Workshop Tools altogether however, due to the command mat_reloadmaterials being disabled. Please enable this, Alex. Don’t know who you are, but you must be pretty important to be mentioned in the Vconsole.

We’re now done with business in the Material Editor, close this window and return to the Model Editor (If it asks for you to save, just hit Yes to All).

Applying New Materials

Now we have the .vmat materials to link with the model, we need to attach them! In the Model Editor, the top ribbon menu under “Model” should have an option labelled “Add Material Remap”.

This will create a new element in the Outliner tree. If you highlight it from the left side of the window, new stuff should appear on the opposite end of the Model Editor window. Extending this tree should reveal it’s identity. You’re replacing the broken materials with the new .vmat files you’ve just created! You can select a material that was assigned to a specific part of the mesh under Search Material to use one of the .vmat materials that will replace it. The blue cross adds more to the list so you can assign more materials to the mesh.

What is this asterisks(*) thing for?

You’ll notice there is an * as well when selecting the bodygroups. This is normally reserved for applying a single material to the whole mesh where other materials aren’t already occupying. Unless you must use it, keep it as last on the list as this can create problems otherwise later down the track with materials showing up on wrong parts of the mesh.

Be Patient!

For some reason, the model editor can be a bit slow when it comes to this part of the process. Just take your time with it, let it load and then proceed.

TIP!
Type in the search bar of your Materials location and you can then save that path rather than having to manually dig through the folders again searching for each material! Though for some reason this option is not available in SteamVR…

Your model should be coming to life at the same time with the new materials assigned to it in the viewport! Continue to do this until all your materials are assigned to each bodygroup.

Hit save when you’re done!

5. Loading your model into S2FM!!

If everything went smoothly, you should now be able to load your model up into Source 2 Filmmaker. The time is upon us, go launch it!

When ready, right click animation set, select create new animation set for model and change search settings to your new add-on folder only and your model should be available right here.

Congratulations, you just learnt how to port to S2FM!!

Make a backup of your add-on folder!

Dota 2:

Steamsteamappscommondota 2 betagamedota_addonss2fm

SteamVR:

SteamsteamappscommonSteamVRtoolssteamvr_environmentsgamesteamtours_addonss2vrfm

If for whatever reason Dota 2 or SteamVR were to get uninstalled in the foreseeable future, these will also be deleted along with it and you’ll have to go through the whole process again!

6. Importing Workshop Maps

Just to be clear, this is not going to go through how to convert maps over from Source 1 to Source 2! The old map file format .vmf (or sometimes .map or .bsp) has been updated to .vmap (or .vmap_c) and so far there has been no reported way of being able to properly convert these over in one piece, if it’s even possible to begin with.

Instead, this section goes about telling how you can grab the maps from each games respective workshops for use in the Filmmaker as subscribing to the submission itself is not enough to have it show up. Also, maps only will work if it’s from that games respective workshop, so only Dota 2 maps will work with the Dota 2 filmmaker! Likewise for SteamVR maps will only be compatible with it’s filmmaker!

Step 1: Subscribe for the Map

First of all, go to one of the games workshops and subscribe to a map! Launch the game so the map content properly downloads.

Step 2: Locating the workshop map .vpk file!

In each of the respective file locations will be folders with the Workshops ID as it’s name. Clicking into these will reveal it’s .vpk file along with a .txt that can help verify it’s the correct workshop item you’re going to unpack!

For Dota 2:

Steamsteamappsworkshopcontent570

For SteamVR:

Steamsteamappsworkshopcontent250820

Step 3: Unpacking the .vpk files

Next step involves the use of Crowbar! Open that up and navigate to the “Unpack” Tab. Browse for the .vpk for Packages: File and set output to Subfolder, this means it will extract the contents within a new folder found in the same directory as that .vpk file. Hit unpack at the bottom and we can move on.

Step 4: Dumping contents into respective addon folders

Depending which .vpk file you extracted, it’s contents may only be compatible with one of the source 2 filmmakers. You may notice the files are also ending with _c, like vmat_c for example. This means they do not need to be placed in the content folder and can be dumped directly into the game folder instead!

before doing this, make a backup of your addon folder in case you goof up! You may get a prompt if you want to merge/replace files/folders together. Say Yes.

If it came from the Dota 2 Workshop, the folders & files within should be moved to:

Steamsteamappscommondota 2 betagamedota_addonss2fm

For SteamVR workshop Maps, they should go here (however only copy the folders over, do not copy the files!):

SteamsteamappscommonSteamVRtoolssteamvr_environmentsgamesteamtours_addonss2vrfm

About your addon folder

Your addon is named as the last folder in the filepath, that being said, your addon folder may be named differently if you gave it a different name. For me, I named mine simply s2fm (for Dota 2) and s2vrfm (for steamVR) respectively.

Step 5: Testing the Map

If everything was done correctly, you should be able to launch the workshop tools and it’ll say it’s updating it’s contents. In the source 2 filmmaker, right click the viewport and select “Set Session Map”. Have your addon folder as the search path, it should be there! Now for the moment of truth to open it up and hopefully nothing chokes!

Q&A

Why is Dota 2 running in the background with this? – Only applicable to Dota 2

The whole game literally runs off Source 2 and acts as a replacement to TF2 from the first Source Engine. Why it needs to be running in the background constantly rather than only be called up when needed with recording is a little beyond me, but if the background musics gets too bothersome, just mute the Source 2 filmmaker in volume mixer or adjust Dota 2’s volume settings in-game.

Is it just me or do Lights no longer work? – Only applicable to SteamVR

The lighting in the Source 2 Filmmaker found in SteamVR is broken for some reason. You need to disable lighting by right clicking the viewport and untick “Enable Lightning” and this will make things full bright again. No clue on how to fix and is only an issue with the SteamVR filmmaker.

Why do we use the “Content” instead of the “Game” folder?

.VMDL, .VMAT and .VMAP files are all stored in the “content” folder when it’s a NEW asset being added to the program! A counterpart of that file is then generated within the “Game” folder as .VMDL_C, .VMAT_C and .VMAP_C which is what the program then uses! If the file you have has already been converted to this format, then it’s ok to dump them directly into the “Game” folder!

My model is HUGE when I load him into the scene, why is that?

The .fbx file format handles scaling very weirdly and needs to be told what scale to be exported at… If you didn’t do this, your character/model will load up 10 times the scale it should be. You need to go back and re-export with a value of something like 0.01 within the .fbx export settings.

My model is disconnected with it’s Skeleton! Did I do something wrong?

You need to rotate the bones in blender while in edit mode to the correct orientation to properly align it with the mesh, then export as a FBX. Do not worry if the mesh looks a little deformed, it’ll be fine when it loads into Source 2.

Why is certain bones of the model missing?

Probably because certain bodygroup meshes were not joined together properly in blender! Go back and join the mesh pieces where the bones don’t show up!

None of the Face slider flex controls are working?

I’m pretty sure it’s more or less a naming issue with the keyshapes as a bunch of error codes do show up when you go to export the .DMX files in Blender.. Try turning these into Corrected Keyshapes and see if that does anything.

No toggleable BodyGroups?

I believe this a limitation of the software itself, unless I’m actually missing something. In Source 1, normally the information to enable bodygroups is written inside a .QC file then it’s compiled however, in Source 2 there is no .QC file compatibility anywhere so it’s anyone’s best guess for how these get imported…

What the flip, no Eye Controls either?!?

As mentioned in the previous question, this is yet another limitation where lack of .QC file support gives a disadvantage as this information is stored within that file before it’s compiled! I currently do not know if there is a known workaround to implementing eye posing support!

How about porting Maps?

You literally can not port maps from Source 1 to Source 2 due to the updated hammer editor. Files are now in .vmap format instead of the old .vmf format and they simply will not talk to each other. You HAVE to rebuild the map within the new hammer editor found in Source 2! Another thing to note, Dota 2’s Vmap files are not compatible with SteamVR’s filmmaker and vice versa!

Can this work on the Half Life Alyx S2FM?

Not sure. Currently, this guide only covers the S2FM found in Dota 2 Reborn and SteamVR. Half Life: Alyx will eventually be covered at a later date. In the meantime, I suspect it’s largely the same process, but I hear there are some key differences to watch out for.

Surely there must be an easier way of doing all this?!

Why sure, there actually is! You just need to kindly ask Valve for the tools that better facilitate this task, yet have not actually been released to the public as of writing this! So instead, I created this guide to hopefully remedy that!

Credits

Author: Prof. Purble

Source 2 Filmmaker is developed and owned by Valve.

SteamSolo.com