II. – Rendering / Capturing Screenshots

Modify Scriptfile

To render the camera path, you need to modify the avinetdemo.scriptcfg.

To do that, save your path (camSavePath <filename.dat>) and go back to the camera folder.

Open the script file:

Don’t get confused by all the code – its very basic and you only need to adjust some values.

(note: you can edit the bold values)

sys.setPersistantArg( “avinetdemo_fps”, 30 );

  • Captures the demo at 30 fps

sys.setPersistantArg( “avinetdemo_useJpeg”, 1 );

  • 0: Captures the demo with .tga images
  • 1: Caputeres the demo with .jpeg images (I prefer jpeg because it saves space)

sys.setPersistantArg( “avinetdemo_saveDir”, “SSDemo” );

Saves the screenshots in “SSDemo” (I recommend to set separate folders for every path otherwise screenshots from every path you render will be saved into this folder and the screenshots get overwritten)

sys.setPersistantArg( “avinetdemo_width”, 800 );

sys.setPersistantArg( “avinetdemo_height”, 600 );

  • Defines the resolution (width & height) of your screenshots.
  • Example:
    • 800*600 = 4:3 (Fullscreen)
    • 1280*720 = 16:9 (Widescreen)

sys.setcvar (“r_aspectRatio”, “1″);

  • 0: 4:3 (Fullscreen)
  • 1: 16:9 (Widescreen)
  • 2: 16:10 (Widescreen)

sys.Cam_RenderCamPath(“campath1.dat”);

  • the path campath1.dat gets rendered

The lines with // at the beginning of the lines are disabled. If you want to enable them, simple erase the //.

Example script (fps: 30; jpeg; folder: campath1; resolution: 1280*720; fov: 110; widescreen):

namespace aviNetDemo {
void Execute() {
// initialize
sys.setPersistantArg( “avinetdemo_fps”, 30 ); //max 62.5
sys.setPersistantArg( “avinetdemo_useJpeg”, 1 ); // jpeg does not work for firstperson
sys.setPersistantArg( “avinetdemo_saveDir”, “campath1″ );
// width and height of the video: does not work for firstperson
// change r_mode for firstperson.
sys.setPersistantArg( “avinetdemo_width”, 1280 );
sys.setPersistantArg( “avinetdemo_height”, 720 );
sys.setcvar (“g_fov”, “110″);
sys.setcvar (“r_aspectRatio”, “1″); // 16:9
sys.Cam_RenderCamPath(“campath1.dat”);
}
}

Avinetdemo

To start rendering, type avinetdemo <demoname>.netdemo . All Items, Models etc which are on the camera’s view will be shown on the final render.

  • Important note: only demos that were recorded in baseq4 work which means you cannot use the mod with q4max, ra4, gtr, xbm demos YET!

Another issue is that you can only render clientdemos. Which means, you have to join a server as a client and record a netdemo (recordnetdemo <filename>.netdemo). If you want to record a mapflythrough (no players) just record a demo as spectator (you don’t have to fly around or anything, just look at one point).

Recording demo on your own server:

Create a shortcut of the startmod.bat, rightclick and choose edit.

Type in the following:

  • cd ..
  • start Quake4 +set fs_game camera +set fs_savepath “J:\games\q4\q4 cam” +set win_allowMultipleInstances 1 +connect 127.0.0.1
  • change the “j:\games\q4\q4cam” into a folder you want to save your demo.

Start a dedicated server and the shortcut. You will auto-connect to your dedicated server. Now you can record a clientdemo.

(note: the recorded demo has to at least as long as you want to record your videomaterial)

Copy the demo into \quake 4\camera\demos, and record as explained above.

To convert the screenshots into avi, read converting screenshots to avi tutorial.

Additional tips:

  • To move the camera objects more precise, set a lower pm_spectatespeed value
  • If you too low fps after loading a path, set g_editwaypath 1
  • When you get dark areas in the final render (no light), the areas weren’t covered in the demo -> rerecord the demo and try to cover all the areas you want to have on your camera path

I hope this tutorial helped you to learn the basics of the current camera mod version. Have fun creating your own path and show us your results in

#q4movie @ quakenet !