Source Filmmaker

Source Filmmaker

62 ratings
TF2 Accuracy Database
By Thespikedballofdoom
Random but hard to find information about things necessary to be accurate to TF2's gameplay visuals

I'll add to this guide over time. Since I found most of this myself feel free to spam me to figure anything else out and add it.
3
   
Award
Favorite
Favorited
Unfavorite
Can TF2 be 100% mimicked by SFM?
NO
Getting as close as you can get.
Various hard to find accurate info for replicating the real in-game visuals.

Mini sentry scale: 75 (0.075 in roottransform_scale)
Mini sentry particle: cart_flashinglight_(team) in flag_particles.pcf
The mini sentry look is just a skin of the real sentry model.

Crusader's crossbow projectile scale: 3 (0.3 in roottransform_scale)
The xmas and xmas projectile can be found easily with c_crusaders_crossbow_xmas in the model viewer search, but the normal one is the syringe model, called w_syringe_proj.mdl

Vaccinator bubble: resist_shield.mdl
Wrangler bubble: sentry_shield.mdl

also, champ stamp needs to //comment out $detailblendmode 6 in order to work in SFM.
Particle names
Wrangler bubble particle: item_fx.pcf, turret_shield_b, requires a complicated setup however:
[CONTROLPOINT1 IS RGB COLOR, CORRECT COLORS ARE 50 150 255 FOR BLUE AND 255 50 50 FOR RED. CORRECT CONTROLPOINT0 POS IS ROOT OF SENTRYGUN MODEL + 30 Z]
Rocket jumper particle: explosion.pcf, Explosion_Smoke_1 [is directional]
Jarate / Flying guillotine projectile particle: item_fx.pcf, peejar_trail_red_glow
Flare gun destroyed particle: flamethrower.pcf, flaregun_destroyed
Mark for death skull: mark_for_death, item_fx.pcf
Spy cig smoke particle: cig_smoke.pcf, cig_smoke
Almost every pipe/cigar/cigarrete cosmetic leaves this smoke particle: cig_smoke.pcf, drg_pipe
If it doesn't look right though see the items_game section of this guide.

Sourcemod Particles
Sourcemod addons sometimes place particles on things, this is a list of some I've had to go and find. Thankfully since sourcemod is inherently open source just look up your addon's code and try to find the particle name in it somewhere. If you don't know what the plugin is, try typing 'sm plugins list' (yep no underscores) on whatever server has the plugin and take a guess at which it is.

Try https://forums.alliedmods.net/showthread.php?t=127111 or if you're capable of searching the tf2 source code there is a leak on github that is very helpful to search through and will often lead you to the particle name but not the pcf. See items_game.txt for more details on game item particles

RTD Toxic: angry_aura01 > eyeboss.pcf
RTD Lucky Sandvich: MEDIC_MEGAHEAL_RED_SHOWER > CLASS_FX.PCF
RTD Build dispenser, sentry: PING_CIRCLE > CLASS_FX.PCF
Goomba stomp: mini_fireworks > crit.pcf

Finding particle names


via tf2_src/game/client/tf/c_tf_player.cpp, line 2281 and 2615
tf2_src/game/server/tf/tf_obj_sentrygun.cpp, line 67
tf2_src/game/shared/tf/entity_capture_flag.cpp, line 492
tf2_src/game/server/tf/tf_projectile_arrow.cpp. line 245-253
Fixing the uber flash and enabling fire overlay manipulation
You can download these files and slap them into your sourcefilmmaker files if you don't want to do this, it is rather tedious.
https://github.com/Thespikedballofdoom/sfm-uber-fixes/archive/refs/tags/1.zip

TO FIX UBERS ON MERCS FLASHING (DO NOT USE THE 'CUBEMAP FIXES' THEY ARE INACCURATE TO THE GAME)

First, go to the offending invun_ vmts in materials/models/player/class (CHECK BOTH TF_MOVIES AND TF) and change "$invulnlevel" to 1.
Next.
in
tf\materials\models\effects\invulnfx_red.vmt tf\materials\models\effects\invulnfx_blue.vmt
comment out the sines (//) and change "$invulnfmax" to 9.






No more flasher.

To enable fire manipulation, follow this guide, the files already have this all in them.
https://steamhost.cn/steamcommunity_com/app/1840/discussions/0/558747922502322472/#c558747922529812581
Working with corpses and gibs at a high level
If using the explode command to simulate gibs with game recording, know:
Gibs will only apply blood decals on cielings and sometimes walls
Pyro does not have gibs unless mp_usehwmmodels is -1

The physics on the hardware morph ragdolls that sfm uses by default are too feathery and do not work well for ragdoll simulation. Disable them and switch to TF2 models with
mp_usehwmmodels -1 and mp_usehwmvcds -1 if you care about their faces.

Killvector is a command that can help simulate ragdolls. Unfortunately it has a quite limited intensity even with our better physics.
usage: killvector <name> x y z
killvector 0 0 50000 will kill&shoot you about a heavy's height in the air.
if nothing provided for name it will kill you instead.
You may see 'explodevector' but it doesn't seem to do anything but explode normally.

Also let's say you just recorded yourself exploding for some scene.
Instead of changing all the gib timings manually to sync everything up, just copy paste the gibs and particles into a new clip in the clip editor and change all at once with offsets of time in the clip editor [shift drag] and baking [right click clip>bake time offset]. Then copy and paste that back into your original clip.
Game recording checkboxes: what's what
The one when you hit the record button on the viewport.


Combat 'Characters':
Grenades
Stickybombs
Rockets [rockets require Player, Misc ents, and Combat characters all enabled]

Player:
You
Your weapons

Misc Ents:
health/ammopacks
player corpses
dead players' weapons
syringes [syringes require player selected]

Props:
All dynamic props with .mdls
Player gibs [gibs will not record unless player is also selected]

Effects:
Game particles at seemingly random, will duplicate any game-recorded particles if they're also checked? I often leave this off, there are very few effects that aren't particles, the only one I know of is the sniper rifle shell ejection. Because changing clip speed doesn't change particle speed for 'effects', they should be deleted from the element viewer whenever you can.
DECALS
Decals = Blood, bullet holes, explosion scorch, player sprays

Decals are incredibly difficult in SFM and needlessly so. Either way this is the best method I know.
Also I'm aware there are tools on the workshop for them but they are extremely off-scale and placing these things manually is frankly slower than the nearly intangible method described here.

The map can be decaled with blood by teleporting and hitting bots with a melee weapon in the direction you want. there is no way to heal bots to the point of making this a simple process, nor any way to change their class from scout.
You use these commands to do it:
getpos
bot
bot_teleport bot01 x y z 0 0 0

Getpos gets your coordinates, paste them into x y z after spawning the bot with 'bot'.
You have to have the 0 0 0 or it won't work.

DECALS CANNOT BE APPLIED TO MODELS IN THE MOVIE WORLD EXCEPT FOR GAME-RECORDED BRUSH MODELS, AND YOU STILL HAVE TO APPLY THOSE FROM THE GAME WORLD. TO DO THAT JUST DECAL ON THE BRUSH MODEL.

Brush models are recorded elements from the game world that are created by the map maker using brushes. They show up as names like *91 when created in the animationset editor.
brush models can be decaled on in the movie world by decaling the game entity.
These decals will persist after deleting the original entity in game if you need to.

Because decals exist in the game world and not the movie world, the bullets and blood you put into the world like this will not save with your project file. The only way to save decals is by recording a game demo and playing it back. I strongly recommend you do this once your scene is ready for decaling, which must be the last step you do before you record every scene with decals.

Demos recorded in sfm save blood, bullet holes, explosion scorches even if they were created before the demo started recording, but will only save player sprays posted after the demo started recording.

To save a demo go into the game mode, go in the console and type "record blabla". Change blabla to whatever you want, you'll want to make it unique for each session name probably. I name my demos "projectfile_DECORATIONS".

Spray your spray if you're going to, then type "stop" after at least 5 or so seconds.

Next, when you want to render your project, load up the demo from the game mode. Type "playdemo blabla; demo_pause". Don't try it from the movie console, you'll crash instantly. Fragile ass SFM. Hit shift + F2 to bring up the demo ui if you need to go a little further along to get your spray sprayed for instance, hit the > key. >| will end the demo and probably crash you too.

Advanced decals
Here is a batch file to make teleporting bots just to get the blood decal constantly not make you want to kill yourself.

I know this looks like a lot of instructions but its this versus constantly typing in getpos and bot_teleport with the exact bot name. Plus this teleports multiple bots at a time, giving you the ability to spew more blood everywhere quickly.

https://github.com/thespikedballofdoom/sfm-decals/releases
to use, put tpscript.bat in usermod and thetrick.cfg in usermod/cfg.

I make a shortcut to it and put that shortcut somewhere easy to hit like the desktop.
If you put it in c:\programdata\microsoft\windows\start menu\programs you can search for it in windows search and pin it to start menu, which could make spamming the thing as easy as hitting the windows key and clicking.

Now type "exec thetrick" in console or alias/bind it to a key and hit it.

Now open the batch file, opening it runs the whole process, hit a key to close it quickly if you wish.

The .vbs file runs the batch script in an invisible window. the script closes itself in 5 seconds, so it isn't problematic to run this if you want a cleaner production process. Note it needs the batch file in the same folder to work.

Now type "exec trick" or bind/alias it, and the bot should be teleported to where you were standing when you typed exec thetrick.
SFM Camera FOV to real game FOV
This is the value you need to set the camera's FOV slider to to match the corresponding game FOV. The one that you set in advanced video settings. The relationship is not linear.

70 = 0.5454545617
75 = 0.5909091234
90 = 0.7272727489

Real game FOV is also exposed if you show camera in the element viewer.
Vector3 Colors
You can use these to color things that need to kind of glow to actually achieve their in game look.
This is the way it's actually done in TF2 as well, read how to do it here, this list is also duplicated in it.

RED JARATE: 6 9 2
BLU JARATE: 7 5 1
RED Crit: 80 8 5
BLU Crit: 5 20 80
RED Mini-Crit: 226 150 62
BLU Mini-Crit: 29 202 135
Hype Mode: 50 2 48
A little note about spotlights (not the ones you are casting, the maps' prop spotlight entities)
SFM makes them too bright because it sucks. You can see how ridiculous it looks here.

If you get the chance to recompile the map you're working in turn them down by a huge amount.
Here's how much I had to turn down lights on one map.
















You'll also need to change any accompanying env_sprites (the light bubble at the start point indicating the light source)[rdgb.net] accompanying them, in this case I changed their FX amount (renderamt) from 175 to 57.
Since most maps just do static white lights you could try avoiding recompiling the map by using commands ingame like:
ent_fire point_spotlight color "R G B"
ent_fire env_sprite color "R G B"
ent_fire env_sprite Alpha "100 to 0"
No you can't replace the shader file or texture.[rdgb.net]
Problems of white particles
Many particles appear white when they shouldn't. it's 'caused' by
the default color parameter thats in particle system properties for that part of the particle. You'll have to change it to something better with an instanced particle. I can't find anything that gives hard numbers for them, not even the minigun's ejectbrass.
items_game.txt
C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\scripts\items\ITEMS_GAME.TXT

This is the way, the best way, to find item and model names, as well as their particle attachments and some other attributes.
CTRL + F, then type your item name. It can be the model name or the in-game name. You'll find each name right next to each other about.
for particles, find 'attach particle effect' and note the number.
CTRL + F attribute_controlled_attached_particle now.




















Find your particle in this list. It won't give you the PCF but it's something.
Replicating game shadows instead of using movie lights
You're taught lighting is an important part of sfm, and the lack of shadows without them reinforces them if you try to dodge that. But we can get at least a little closer to the real look of TF2, with much higher rendering times, by never using sfm's lights and setting this command:
sfm_drawpuppetblobbyshadows 1

The hard silhouetting shadow is what we all would want but it's just not possible in SFM unless it's a real entity, which is pretty tough to render a scene with. So the blurry shadows you see in this picture are all you get to have. A soft-edged circle that will scale around the size of your model.
In order to get this to work you have to spawn a shadow_control in the game world and have the prior command set before you render your scene. Type ent_create shadow_control.

Note the blobby shadow won't render on the first frame. SFM sucks.
These shadows aren't what you likely are used to but they are a real option in TF2 so they're more genuine to the game than SFM shadows. Plus they render a billion times faster and cinema lighting isn't exactly the point of game accuracy. You can even make a giant model cast a ginormous shadow over the whole scene, there doesn't seem to be a size limit for this.
17 Comments
War_Tomato 8 Mar @ 9:22pm 
ABSOLUTE ACCURACY
Thespikedballofdoom  [author] 18 Nov, 2023 @ 11:30pm 
Fixed this mess to not be an eyesore
Wayback 2 Mar, 2023 @ 11:08pm 
YAAAAAAAAY!
Thespikedballofdoom  [author] 2 Mar, 2023 @ 8:20pm 
The easiest way to make teleporters spin customly is to copy and paste a recorded real teleporter spinning recorded in game mode. The easiest way to make the bread is probably to explode and replace the gibs with a bread. Or you can try to figure out what this means and do it exactly like tf2 does it: https://github.com/sr2echa/TF2-Source-Code/blob/c61d9750613a088617fa183a56708becfd38b81a/tf2_src/game/server/tf/tf_obj_teleporter.cpp#L1599-L1653
Wayback 2 Mar, 2023 @ 7:59pm 
CAN WE TELEPORT BREAD?
FreakinGroovy 24 Jan, 2023 @ 5:15am 
thanks 4 sharing cool info!
Thespikedballofdoom  [author] 27 Dec, 2022 @ 7:41pm 
so its probably impossible
Thespikedballofdoom  [author] 27 Dec, 2022 @ 7:41pm 
I believe the motion blur sfm has is fundamentally different than tf2, you can even see in the game mode for instance when you fall it looks different in sfm even with the same mat_motion_blur_strength and mat_motion_blur_falling_intensity
Thespikedballofdoom  [author] 27 Dec, 2022 @ 6:18pm 
Do you mean that as in the camera you are in first person as you play the game? Either way I actually dont even know what shutter speed is