Creating good quality videos for the WDP

From Team Fortress Wiki
Jump to: navigation, search


If you're here, chances are you need some help in creating a video for the weapon demonstration project. I was once in your position, however I was not given the luxury of a specific tutorial as outlined below. This is the exact method I use. Read on, friend, read on.

You'll need loads of free hard disk space for this. You have been forewarned.

History

@ version 0.2

TODO:

  • Add images

Your toolset

History

Contrary to popular belief, FRAPS and other such tools are a total pile of crap when it comes to recording footage from the Source engine. VALVe, having realised this, implemented a raw TGA frame generator which far surpasses any other method of recording in terms of quality, reliability and most importantly, performance. You can run their TGA generator on low-end machines like mine, and still produce top quality videos.

Tools

  • A Source Engine game
    • In this case, Team Fortress 2
  • Your favourite video editor
    • Vegas sucks, use Premiere Pro
  • PLDX Recording Tools
    • This will simplify the recording process. Save to your desktop.
  • Virtual DUB
    • In order to make an AVI file we can work with, requires x264VFW (see below)
  • x264VFW
    • For the second encoding phase, plugs in to Virtual DUB
  • Easy H264
    • For the final encoding phase
  • FRAPS or equivalent
    • Because Source cannot take pictures of the loadout screen.

Scripts/In-game assets

  • weaponref.cfg
    • For the default layout of bots and to set up the map.
  • HudDamageAccount.res
    • We'll talk about this later. Just keep it saved to your desktop for now, and make sure a copy is in your tf\resource\ui folder.
  • ammo.cfg
    • For spawning healthkits/ammo boxes, should you need them]

I'll also assume you've read this page.

Step 1: Source demo footage

Once you're in the game, load up tr_target_weaponref and type exec weaponref into the console. Now in the console, type record mydemo and replace 'mydemo' with whatever name you can remember later on. Feel free to take multiple demo recordings if you need multiple streams of footage etc. This is actually the hardest part of the process, as you need to get your acting perfect. Notice something shonky later down the line? You'll have to start afresh.

TIP: After you've typed the record command, jump on the spot once, then wait five seconds. This will give the engine time to "smooth out", as you'll notice it might be jumpy if you try to move. Then wait another five seconds before you begin acting, so that you have plenty of footage to work with later on when you need to establish a starting point. The same applies when you're about to type the stop command; wait five seconds before you do so, you'll thank yourself later.

Step 2: Setting up PLDX recording tools

Preamble

Before you even open the application, you'll want to open the \moviefiles\cfg\pldx.cfg file for modification. Do a find (CTRL+F) for the string: hud_combattext. You'll find an alias called "alwaysexec". Change the value of hud_combattext from 0 to 1, then save/close the file.

Getting started

Open the application, then click "Add". Give it whatever name you like, but make sure your settings are exactly like mine.

Video:

  • Frame size: 720p (1280x720)
  • Frame rate: 30
  • Enable Full Graphics [✔]
  • HUD mode: Default HUD
  • Crosshair type: Default

Audio:

  • Disable in-game voice []
  • Disable Announcer and Domination sounds []
  • Volume - 90%

Particle Effects:

  • Press the box that says Select None

Skybox:

  • Default skybox

Settings:

  • Disable crosshair switching in demos [] (not really needed, you shouldn't be switching crosshairs in the demo)
  • Disable drawviewmodel switching in demos [] (same as above)
  • Weapon FOV: 65
  • Interp: 0.1000
  • Interp ratio: 2.0

Profile Options

  • Open up killstreaks.txt when starting TF2 []
  • Copy back default game_sounds-Files when quitting TF2 []

Starting TF2

You're not quite ready to launch TF2 via PLDX just yet. Remember that huddamageaccount.res I told you to save to your desktop? Yeah, it's going to haunt you for a while longer. On your desktop, create a folder called "resource", with a subfolder called "ui", place the HudDamageAccount.res file into the subfolder. Now open your TF2 directory and get ready to copy that resource folder from your desktop into the TF2 folder. in the PLDX application, click the huge button saying "Start Team Fortress 2", then immediately copy the resource folder from your desktop over to your TF2 directory.

If all has gone well, you can play back your demo and see yellow text appear when you deal damage. The reason we did this is because PLDX does not have the capacity (yet?) to copy over custom files into the TF2 directory, you cannot add your own files to the \moviefiles\ directories, it will just ignore them.

You will need to repeat this step every time you use this tool.

If for some reason your computer crashes or your TF2 exits prematurely, do not worry. Just delete the resource, materials, particles, scripts, and cfg folder in your TF2 folder. PLDX should now launch properly again. All your stuff is safely backed up in the play directory in the directory above, don't worry.

Step 3: Recording the TGA data

At the main menu, you can press the arrow keys to see the full list of options. You won't need to fiddle with anything though, so try not to.If you want to tweak your video settings further, like enabling motion blur, go ahead and use the normal video options dialog. When you're ready, type playdemo mydemo and wait for the map to load. When it's loaded, just hit the F12 key. (Or you can press F12 first, then load the map). Your game will slow down to a crawl - this is good, it means that everything went according to plan. Now go read a book or something, this will take a while... Repeat this process for however many demo files you have created.

Once it's done, you'll be back at the main menu. Just press F12 again, and the console should refresh to say you've used a recording slot. Before you exit TF2, open up your TF2 directory again and delete the HudDamageAccount.res file you copied over (NOT the entire resource or resource\ui folder). Once that's done, proceed to use the big "Quit" button to close TF2.

Congratulations, you now have a high quality video stream. But you're not out of the woods yet.

Step 4: Using FRAPS to get the loadout screen

Make sure all the overlays/watermarks etc are turned off and the mouse cursor is set to be visible in FRAPS, then open the launch options dialog for TF2. Put these options in there: -h 720 -w 1280 -window -novid -noborder. Proceed to launch TF2 as normal. Once inside, type this into the console: sv_cheats 1; stopsound. This will stop the background music. Now open the loadout screen for the character you've used, make him/her/it pose with the weapon you've demonstrated according to the guidelines. Get a good 15 seconds of footage (you can cut this down later), make sure you record yourself clicking the "close" icon (you can trim this down later to just the moment you press the button, excluding the main menu). Stop recording and exit TF2.

Step 5: Putting the pieces together

Open up your favourite video editor. Make sure it's something that can import sequences of still images. I'll assume you're using Premiere Pro like I am.

Once loaded, click "Create new project", then give it a unique name. Ignore the other settings, hit OK. Once you get to the next dialog, give your sequence a name. Pay attention to these settings. Choose the "HDV\HDV 720p30" preset. Hit the OK button.

Once your workplace is visible, choose File --> Import, browse to your TF2 directory and you should see TGA files with names like a1_0000 etc. Select the first one in the sequence (which would be a1_0000.tga), then tick the box saying "numbered stills", then import. Open the import dialog box again, but this time choose a1_.wav. Repeat this process for however many TGA sequences you recorded.

Open the import dialog for the final time, but this time browse to where FRAPS recorded your loadout screen. Import that file.

Editing

Note: As a hard and fast rule, the most complex effect you should ever use is the vetical/horizontal split-screen effect in order to draw comparisons between two weapons/methods etc. Feel free to use dissolves/fades when switching angles/scenes, but keep it simple. This project aims to document the weapons, so you don't need fragvid quality editing.

Drag your TGA sequences and WAV files onto the track. Make sure they are lined up (use the zoom lider to zoom in). By default, they should snap to eachother when within vertical range, make sure then snap together perfectly, ok? (The wav file is usually a smidge longer than the TGA, don't worry about that too much) Once snapped together, select both of them and right click --> link. Now you can drag the edges of the linked clip in order to shorten it at either end. You can also split the clip using the razor tool, located to the bottom right of the timeline editor (or just press C).

You'll also need to add a training video music track. Here's the custom loop I created for my projects, it's well over the two minute mark, cut it down using Premiere to whatever length you need.

Exporting

Once you've done all your editing, make sure you've highlighted the sequence in your project browser (top-left) and do File --> Export --> Media. (CTRL + M). Here's the settings you should use:

If you want to save time, just import this preset file

You can import using the folder icon where it says "Preset:"

Export Settings

  • Video
    • Format: Microsoft AVI
    • Preset: Pal DV
    • Video Codec: Uncompressed UYVY 422 8bit
    • Quality: 100
    • Width: 1280
    • Height: 720
    • Frame rate: 29.97
    • Field type: Lower first
    • Aspect: square pixels (1.0)
  • Audio
    • Sample rate: 48000 Hz
    • Channels: Stereo
    • Sample type: 16 bit
    • Audio Interleave: 0

The preview in the output tab should now look like the preview in the input tab. Press OK, then "start queue" in Adobe Media Encoder.

Final encoding

Step 6: Virtual DUB

This part is fairly straghtforward. Open VirtualDub, then open the AVI file Premiere created. Select Video --> Compression, highlight x264VFW then select configure.

  • Settings:
    • Tuning: Animation
    • Rate control: Single pass - ratefactor-based (CRF)
    • Rate factor: 15
    • Output mode: VFW
    • VFW FourCC: H264
    • VirtualDUB Hack: [✔]

Press OK, then OK again. Now do File --> Save as AVI, save as a unique file name. Once the encoder dialog comes up, set the priority to "higher". Now just wait for it to encode.

Step 7: Easy H264

Set the input file as the one that VirtualDUB created, and the output file to something unique. Set the preset to Brassemense HD 720 (Big), and the framerate to 29.970, then press OK and OK to the new dialog that will pop up. If, like me, you don't have access to a dual or quad core machine, this may take some time.

Step 8: You're done

Upload to Youtube. Post the link in the talk page of the project, then wait for somebody to tell you what you did wrong content wise because as far as the technical aspects of the video is concerned, it's perfect.

Postscript

If you liked this guide, let me know in my talk page. If you didn't understand a step, or needed something clarifying, use my talk page. Maybe you want to suggest something, or maybe I missed something out? If so, use my talk page. If you want to strangle me because I insulted Vegas, use my talk page.