There are a number of ways to create videos out of in game demo footage. Some people use Fraps to record it into a video file. I find that this is not the most effective way to do it. Fraps records and outputs a video file, like an AVI or
something... however the compression it uses makes things blurry, and
scrambled, espescially if you want to go in and edit down the footage, then try and re-compress it it will look like total crap.
Instead of using fraps to make the video, I prefer to export the footage directly through TF2, onto my hard drive using the console command startmovie. What startmovie does, is once you play a demo, or exit the console, it begins to create a series of tga (image) files and a wav (audio) file of your demo.
All this info is based on my experience, and these 2 sites:
http://developer.valvesoftware.com/wiki/Demo_Video_Creation
http://developer.valvesoftware.com/wiki/Demo_Recording_Tools#Demo_console_commandsI highly recommend you take a look at them, but for convenience, I have written down the essentials.
- Before you make the movie, though, be sure your resolution is set to
something at or below 800 x 600. Each 800x600 file you produce takes up 1 meg of hardrive space or more. So in the end, you'll have thousands of these image files which can add up to many gigabytes of data.
- The best way to play back and record demos is in windowed mode. To set up your game to play in windowed mode, and at the resolution of 720 hd standard resolution, type this into the Launch options of tf2.
- -novid -applaunch 440 -window -width 1280 -height 720
**You can choose any width and height you want, but this is just what I use (720 HD).
- ------^^--------
- Before you begin recording, you are going to want to find just the best parts of the demo to record. Otherwise, you will end up with gigs of useless footage of respawning etc. So I suggest going through the demo with a notepad out, and carefully watch the demo and write down the tick ranges you will want to record.
- Type demoui into console, which opens up controls for demo playback. Load the demo, and watch it carefully for those ticks where you want to start recording. I want to note that its best to give a little "lead" time before and after (but more importantly before) the actual shot that you want, so note 500-1000 ticks before where the shot begins.
- Once you have gone through your demo, found and written down all the tick #'s of the shots you want to keep, in demoui, open up the demo editor - click Edit...
- This will open up a new window in which you can create a list of commands to do various things within the demo playback.
In the editor create the following commands:
- New --> skipahead
- starttick: usetick - 0
- skipto: 15000 (or whatever tick you want it to start recording)
- New --> PlayCommands - snd_restart
- starttick: usetick 15001 (this command restarts your audio one tick after the demo starts playing *this part is important if you want your audio to record properly)
- New --> stop playback
- usetick = 16000 (or whatever tick you want the recording to end)
Then, when you use the console command startmovie and then play the demo, tf renders (creates) a sequence of numbered images...THOUSANDS of
them (depending on how long each clip is) into your tf folder. Each frame that you see in game, gets saved as a numbered image
file (.tga) - just like the ones you get by pressing your screen shot
key (F5 by default). Also, a .wav file will be created for your audio. You
take this image sequence (think of it like a digital flip book) - and
bring them into a video editing software like vegas, after effects, or premier along with your audio.
3.
startmovie Time! To create a targa sequence and .wav of your demo, go to console type the following commands:
- sv_cheats 1
- host_framerate 30 - sets the framerate, so you dont render everytick and get stuck with a full hard drive.
- startmovie moviename - starts a recording
- playdemo demoname - plays the demo
- endmovie
- ends movie *** -- ***make sure you do this before you
leave your computer for a long while, because you may just fill up your hard drive if you forget***--
This produces a targa
sequence at 30 fps which I then drop into a composition in Adobe After
Effects along with my audio. I sync the video and audio, then I go to render, choose compression settings - Quicktime
.mov @ animation compression for my pre-compositions, then delete the
targas. Once I have all of the .mov files ready, I make a new project
and drop all of those into their own compositions and combine it all for the final edit.
If you want slow motion you will need to record the shot at 60, 90, or 120 fps so just use :
host_framerate 60
(or whatever framerate you desire)
The following list gives an overview about the available demo commands:
| SkipAhead | Skips demo playback ahead to a specified tick and resumes playback.**
|
| StopPlayback | Stops demo playback immediately.** |
| PlayCommands | Executes a console command.
|
| ScreenFadeStart | Fade screen in/out.
|
| TextMessageStart | Shows a simple text message.
|
| PlayCDTrackStart | Starts playing a CD track.
|
| PlaySoundStart | Plays a .WAV or .MP3 sound file.
|
| Pause | Pauses playback for given seconds.
|
| ChangePlaybackRate | Changes the playback speed.
|
| ZoomFov | Adds a zoom in/out effect.
|
Other useful command variables
sv_cheats <0/1> Required for following commands.
r_drawviewmodel <0/1> Hides weapon model.
cl_drawhud <0/1> Hides entire hud. **
hud_saytext_time 0 Hides chat text, default = 12. **
hideradar Hides radar location text.
cl_radaralpha 0 Hides new radar overviews (def. = 200).
drawradar Enables radar.
thirdperson Enables third person view (firstperson to change back). **
cam_command <0/1> Enables camera mode. (*Use this instead of "thirdperson")
cam_idealyaw <value> Rotates the camera around model horizontally (0-360)
cam_idealpitch <value> Rotates camera around model vertically (0-360)
cam_idealdist <value> Sets the distance from player to camera (default = 64)
Use the "find" command to find other camera
options (+camyawleft, etc) Usage: find cam
Demo Console commands
| demo_debug <0/1> | Shows additional demo debug info
|
| demo_fastforwardstartspeed <factor> | Go this fast when starting to hold FF button.
|
| demo_fastforwardramptime <seconds> | How many seconds it takes to get to full FF speed.
|
| demo_fastforwardfinalspeed <factor> | Final playback speed when holding the FF button.
|
| demo_interpolateview <0/1> | Enables/disabled view interpolation between demo ticks
|
| demo_quitafterplayback <0/1> | Quits game after demo playback** |
| demo_recordcommands <0/1> | Record commands typed at console into .dem files
|
| demo_pause [seconds] | Pauses demo playback, seconds optional
|
| demo_resume | Resumes demo playback
|
| demo_togglepause | Toggles demo pause/playback
|
| demo_gototick <tick> [relative] [pause] | Skips to a
tick in demo. If the relative parameter is 1 the tick is an offset to
the current tick. If the pause parameter is 1, playback while be paused
when tick is reached
|
| demo_timescale <scale> | Set the demo playback speed as a factor, 1.0 is normal playback
|
snd_restart reloads audio**
**useful
Other useful sites:
http://www.halflife2.net/forums/showthread.php?t=87850http://developer.valvesoftware.com/wiki/Console_Command_List