Tutorial 7 - Movies



Tutorial 7 Patch

This tutorial expands on the previous one covering image loading and texturing. In this example, pix_image gets replaced with pix_film, and instead of a single static image, a movie plays over the surface of the Geo object.





The 'basic_film_player' shows how to implement the pix_film object. The only difference between this and the pix_image patch lies in the 'auto $1' message sent to pix_film. This starts and stops the film playback, and the 'frame $1' message for gemwin sets the frame rate of the playback. Each frame that pix_film loads gets passed down the render chain to pix_texture which replaces the previous texture on the video card. The rectangle object helps to display films at their proper aspect ratio (4:3 for most video). The [t f] object takes the bang sent out of pix_film's 3rd outlet and restarts the film at the beginning.





'more_pix_film' illustrates how to use other methods for controlling pix_film playback. The counter object accepts the number of frames from the second outlet of pix_film as its' maximum, and counts from 0 to that number. The metro controls the rate in milliseconds per frame (or 1000/fps) and the second inlet of counter sets the direction of counting (1-up, 2-down, 3-up+down). Notice the number box between counter and pix_film, which can be used for scrubbing through the film.





index