From BlenderWiki

Jump to: navigation, search

Video Textures

Mode: All Modes

Panel: Shading/Texture Context → Anim and Movie

Hotkey: F6

Description

As well as animating a texture's mapping with its associated Ipo curves (eg. the texture's offset - ofsX/Y/Z), you can also use animated image sources as textures. The simplest method to get an animated texture is to use a video file. The video needs the same - or an integral division - number of frames per second (FPS) as the animation, to run at the same speed.

Options

An AVI file as an Image Texture.
frs / <
The number frs in the Anim and Movie Panel shows how many frames were recognised. You can copy this number to the field Frames with the arrowbutton. The number cur shows, which frame is shown in the Preview Panel.
Frames
This activates the animation option; another image file (in the same Image block) will be read per rendered frame (see also Fie/Ima). The number in the field Frames is the number of frames that shall be used in the animation. The last frame will be used as static texture for the rest of the animation, if you don't turn on the option Cyclic.
Offset
The number of the first picture of the animation. The end frame is calculated as Frames + Offset.
Fie/Ima
"Fields per Image:" The number of fields per rendered frame. If no fields are rendered, even numbers must be entered here. (2 fields = 1 frame). This sets the speed of the animation. The correct settings depend on the framerate of the texturevideo, the framerate of the rendered animation, whether you render Fields (in the Render Panel of the Szene context) and whether the texturevideo uses "Fields" (Fields Button in the Image Panel of the Texture buttons). Some examples:
  • The video has 24 FpS, the animation shall have 24 FpS. You are rendering without Fields. Set Fie/Ima to 2.
  • The video has 12 FpS, the animation shall have 24 FpS. You are rendering without Fields. Set Fie/Ima to 4.
  • The video has 16 Frames, the animation shall have 96 Frames. You are rendering without Fields. Set Fie/Ima to 6.
  • The video has 24 FpS, the animation shall have 24 FpS. You are rendering with Fields and are using Fields in the Image Panel. Set Fie/Ima to 1.
Cyclic
The animation Image is repeated cyclically.
StartFr
The moment - in Blender frames - at which the animation Image must start. Until that moment the first Image of the video is used as texture.
Len
This button determines the length of the animation. A Len of 0 means, that the length is equal to Frames. By assigning Len a higher value than Frames, you can create a still at the end of the animation when you use cyclic.
Fra
The Fra buttons allow you to create a simple montage within an animation Image. The left button, Fra indicates the frame number, the right-hand button indicates how long the frame must be displayed (Stutter-Mode). An example follows. If you use Fra you have to set Frames and Len accordingly.
Brightness
To keep the original brightness of the video, use the option Shadeless for the material.


Numbered Image Sequences

Instead of a video file you can also use a numbered image sequence. The simplest procedure will be to save the images in a subdirectory to your blend file and to load one of the images from this directory.

Examples

This example uses an image sequence instead of a video - 12 Image files (01.jpg to 12.jpg). The entry in the field Frames activates the animation. Now Blender tries to find the next frames by changing a number in the filename. You may not use the option Movie also!

Abbildung 2: Nummerierte Bilddateien als Textur

Everything else works similarly to video textures. Here's an example of the Fra Option.
Lets assume, you would like to create an animated Traffic light. At first you create four different images: Red, Red/Yellow, Green, Yellow. These four images shall change continuously.

Settings for the animation of a Traffic light with four images. Idea by "tordat" [1]
The Traffic light with the settings from the picture Settings for the animation.

Please note that you need 100 Frames, though only four images are used. The result is not surprising (The Traffic light).

Limitations

When using image sequences, your image sequence must be named a certain way, to keep Blender counting:

  1. Blender tries to find the other files by changing a number in the file name. Only the rightmost digit is interpreted for this. For example: 01.ima.099.tga + 1 becomes 01.ima.100.tga.
  2. The numbers have to have the samge length. Amend leading zeros. Blender counts from 1 to 12, but not back to 1. Instead it begins at 10. So use 01, 02 ...