60 likes | 271 Views
Motion Capturing in Quake III. What is Quake III?. A FPS (First Person Shooter) game from 1999 The source code was released in 2005 It is entirely written in C and ASM. Why Quake III?. It is a simple game It requires the user only to move and shoot
E N D
What is Quake III? • A FPS (First Person Shooter) game from 1999 • The source code was released in 2005 • It is entirely written in C and ASM
Why Quake III? • It is a simple game • It requires the user only to move and shoot • Ideal to demonstrate motion capturing that is applicable to military robot control
Where can we get it? • We have an SVN repository located at: http://www.assembla.com/spaces/ioquake3mocap/trac_subversion_tool • The timeline can be seen here: http://trac.assembla.com/ioquake3mocap/timeline?from=01/08/2011&daysback=200 • It is based on IOQuake3: http://ioquake3.org/
How did we do it? • Domi downloaded and compiled several versions and tempered with them until they worked, then added the threading and code stubs and made the code available to everyone else • The other teams then contributed the algorithms and the interface with OpenCV • The motion capturing code can be found here: http://trac.assembla.com/ioquake3mocap/browser/code/client/cl_mocap.c
Implementation • Once you join the game, you can toggle motion capturing on and off via key-press • A thread, parallel to the rendering thread, retrieves images from the cameras and scans them for the single-colored targets • Another algorithm converts the two-dimensional target information into two three-dimensional points and uses that to determine yaw and pitch angles • The rendering thread gives control to the motion-capturing code in every iteration • During rendering, the angles are copied into the client state, in a thread-safe manner