UDN
Search public documentation:

MovieTexture
日本語訳
中国翻译
한국어

Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > Materials & Textures > Movie Texture

Movie Texture


Overview


Movie textures allow for decoding and playback of a movie file to a texture. This document describes the process for importing a movie file as a new movie texture resource and how to use it in a level.

Importing a new movie file


A movie texture is imported just like a regular 2d texture resource. Select the import option from the file menu of the Generic Browser. Currently, the only supported movie file format is Bink (*.bik). Once a file is selected an import dialog is displayed for specifying the name of the object to create as well as its package.

If the movie file was imported properly, you should see a new movie texture thumbnail icon with details about the movie playback duration and framerate. Note that the movie texture will be created at the same width and height of the decoded movie frames.

MovieTexture2.JPG

This movie texture can now be sampled just like a regular 2d texture resource for use in a material. The material can then be applied to a surface in the level.

MovieTexture1.JPG

Movie texture properties


There are two options available for how movies are streamed for playback:

MovieStream_Memory - this option loads the entire contents of the movie file into memory before playback begins. The decoder then decodes the movie stream directly from this memory.

MovieStream_File - (not implemented)

These are the options available for controlling the initial movie playback for the resource:

Looping - if enabled then the movie will loop back and restart playback from the beginning of the movie once the end of the movie is reached.

AutoPlay - if enabled then playback begins immediately after the movie has been imported. Otherwise, only a single frame of the movie is decoded and then playback is paused.

Script functionality


There are a few playback features that can be controlled by referencing the TextureMovie resource from script:

Play() - Begins the decoding and playback of a movie. Calling this function will also un-pause a previously paused movie or restart playback on a stopped movie.

Pause() - Pauses the decoding and playback of a movie. Calling Play() will resume playback.

Stop() - Same as Pause() except that the movie stream is also reset to the first frame. Calling Play() will resume playback.

Note that the decoding from the movie stream will use up some CPU time but the decoding occurs on the rendering thread.