Live webcam in Quake3
From On-signal: Projects & Research
At the Kunstvlaai 2008 a work of Arjan Scherpenisse was exhibited in which live webcam footage was used as textures inside the virtual world of the Quake3 game.
The source code for that project is released under the Creative Commons share-alike license, and is downloadable from this page.
Download
- Media:Camproxy.tar.gz
- Source code to the camproxy program
- Media:livecamera.patch
- The patch to be applied to ioquake3
Details
The project consists of a proxy program which captures webcam frames and puts them in a shared memory buffer. Then in ioquake3, a hook in the mainloop looks at this shared memory and if the image's changed, it uploads it into the graphics card onto an openGL texture associated with the special '$livecameraimage' shader.
The program runs using the OpenCV library under Linux.
You should make a shader to apply the live camera to your map. The shader should at least contain a '$livecameraimage' stage in which the camera image is applied to the texture. A simple version looks like this:
textures/onsignal/onsignal_live
{
qer_editorimage textures/onsignal/livecameraimage.jpg
{
map $livecameraimage
}
}




