It's a Wrap!
------------

!!!WARNING!!!

Using this version of opengl32.dll on a PunkBuster enabled server *will* 
get you kicked and possibly get your CD Key banned! I strongly recommend 
that you use a separate installation of the game for movie making, and disable 
PunkBuster in this installation. The easiest way to do this is to copy your
regular ET installation folder and create a new shortcut.

!!!WARNING!!!


Features
--------
* Customizable background color for green screening.

* TGA hook for motion blur.

* Configurable output destination for captured images.

* Cropping (from top and/or bottom)

* Unlocking of screenshot limit (Enemy Territory only)


Installation
------------
1. Read the warning about PunkBuster above
2. Copy opengl32.dll and opengl32.cfg to the folder where the game 
executable is located (ET.exe for Wolf:ET).


Compatibility
-------------
Tested opearating systems:
Windows 2000
Windows XP

Tested games:
Wolfenstein: Enemy Territory (W:ET)
Return to Castle Wolfenstein (RtCW)

This tool *should* work in most OpenGL based games that writes TGA 
screenshots, though Quake 3 movie makers are beter off using q3mme.
Please report feedback (positive or negative) to spoof@bitmap.se.


Green screening
---------------
The background color can be changing the "bgcol=" parameter in opengl32.cfg.
The red, green and blue components are specified as decimal values between 0.0
and 1.0 and separated by commas.

Remove the line or add a ";" before it to disable green screening. 

Examples:

Green background:
bgcol=0,1.0,0

Blue background:
bgcol=0,0,1.0

r_drawworld 0
r_fastsky 1 (needed on some maps)

Note that some maps have "leaks" where the background color shows even if
r_fastsky is disabled, so keep it disabled unless you really want to use
green screening.


Motion blur
-----------
A configurable number of TGA images are used to calculate a motion blurred
image. W:ET and RtCW can capture up to 1000 images per second with the 
cl_avidemo command, and it is recommended to use the maximum value for 
optimal quality.

The number of images is configured in opengl32.cfg by changing the number 
after "merge=". The amount of blur can be reduced by not merging all the
frames. This is controlled by the parameter "skip=".
Note that both these number have to be integers.

To create a 25 FPS movie with maximum quality (cl_avidemo 1000):
Number of rentered frames per motion blurred image = 1000/25 = 40
This means that the sum of merge and skip must be be 40 unless you
want to speed up/down the clip.

Merge + skip = cl_avidemo / target FPS

For maximum blur:
merge=40
skip=0

For a more reasonable blur (shutter time = 1/50 s, which is similar to 
cinematic photography):
merge=20
skip=20

It's also possible (but not necessary) to specify the relative weight for all 
images that are merged.
weights=1,2,3,4,5,6,7,8,9,10,10,10,10,10,10,10,10,10,10,10
The number of weights should be equal to the merge parameter. If there are fewer
weights the last specified one will be used for the remainder of frames,
if there are too many the list will be truncated.

Note! The first weight is used for the first (i.e. oldest) frame, and the last
weight is used for the last (i.e. newest) frame that is merged.


File output
-----------
The finished image files are written to to 
<basepath>\<unique directory name>\...

The "basepath=" setting specifies the base folder for storing finished 
images. It can be a relative or absolute path.

The images are then stored in a sub directory named "YYYY-MM-DD-HHMMSS"
under <basepath>; this is created automatically for every session.

Note that the DLL can NOT tell the difference between single TGA screenshots
and cl_avidemo, and if multiple sequences are captured in the same session 
then the last image from one sequence may contain frames from the next 
sequence as well.


Cropping
--------
The cropping feature can be used if you capture in 4:3 format but want the
finished movie to have another aspect ratio. A 1280*720 (16:9) image takes 
about 30% less space than a 1280*1024 image.

Example, 1280*1024 cropped to 1280*720:
crop_top=154
crop_bottom=150

You may want to adjust how much you crop from the top/bottom depending on
the type of footage. The gun position can be adjusted with the cvars 
cg_gunX, cg_gunY and cg_gunZ.


Options
-------
basepath=<path>         Base path for screen shots. All screenshots are saved 
                        in a sub directory under <path> named YYYY-MM-DD-HHMMSS 
                        (this is created automatically).
                        
merge=<m>               Merge <m> frames.

weights=<W1>,...,<Wn>   Relative weights for frames that are merged.
                        W1 = oldest frame, Wn = newest frame

skip=<s>                Skip <s> frames after merging m frames.

bgcol=<r>,<g>,<b>       Change background color to Red=r, Green=g, Blue=b
                        Colors must be float values between 0.0 and 1.0,
                        separated by a single comma (no spaces).

crop_top=<l>            Crop <l> lines from the top

crop_bottom=<l>         Crop <l> lines from the bottom

patch_et=<b>            Set to 1 (default) to patch screenshot limit. This
                        only works with Enemy Territory v2.60b, so it is 
                        recommended to set this value to 0 if any other game
                        or other version of ET is used.


Disclaimer
----------
The software is used entirely at your own risk.
Do NOT use this tool when playing online.


Acknowledgements
----------------
This program uses code by the following individuals/organisations:

HookImportFunctionByName by P J Naughter:
http://www.codeproject.com/dll/hookimport.asp

Also a thank you to the beta testers (especially vib|ender).


Change log
----------
v0.70
+ Screenshot limit patched! It should now be possible to write 999,999 merged
  screenshots, which is more than 11 hours of 25 FPS footage.
  Note that this only works with Enemy Territory v2.60b.

v0.63
+ Experimental: Monochrome images with fgcol parameter (same usage as bgcol)

v0.62
+ I'm now blocking connection to servers to prevent illiterate users 
  from "accidentally" getting banned.
  

v0.61
+ Changed output file name to make it possible to capture longer sequences 
  (note though that the engine still limits the number of screenshots)
+ Bugfix: handle basepath with spaces correctly

v0.60
+ Cropping with crop_top=<l> and crop_bottom=<l> (l=number of lines)
+ Improved error logging

v0.50 - First public release!
