Video
By Alan Baylis 04/09/2002

Download the Demo with Source
The typical approach to adding in-game media such as movies and television has been to cycle through a series of textures. In order to play even a short show meant that a lot of texture swapping and memory had to be used, so the idea was to replace this method with a MPEG decoder and display each pixel as a polygon. I believe this is the first example of this method for two main reasons, firstly it takes a lot of processing to read the frames and display the large number of polygons but this is no longer a problem with the latest video cards, and secondly, it is no picnic writing a MPEG decoder. Fortunately I didn't have to write the MPEG decoder, I have used and modified the freely available source code ported to Win32 by
Thanassis Tsiodras which was originally released by the University of California in 1992, back when there was a greater open source ethic.
The demo could use a lot of optimization and could be improved by averaging the color of each vertex between adjacent polygons but does well enough for a first example. A height-mapped version will be good to see too.
To learn how to use the source code read my comments in main.cpp.
Copyright © 1998 - 2010 Alan Baylis, All Rights Reserved