Reading Time: 3 minutes

Useful Maya Expressions for Image Sequence Control

Expressions in Maya is extremely useful for a lot of things. Using an image sequence is definitely an aspect you want to use expressions in Maya for better control and flexibility.

In Maya, image sequences are typically loaded using a File texture node. After loading one image from the sequence, we enable Use Image Sequence in the file node’s attributes. Maya then reads the sequence based on the frameExtension attribute.

file node,  use Image Sequence checkbox

The thing is, image sequence inside Maya without expressions is extremely limited. We can’t do much with it. In order to get what we want from our image sequence in Maya, we have to do a lot of externally work (with video editing software).

For example, if we want our image sequence to start in a later frame, we can’t do that. If we want Maya to play our image sequnece in loop, we can’t do that either. Or if we want a ping-pong playback for our image sequence, we can’t do that as well. All those and many more restrictions in Maya can be eliminated if we use simple expressions.

Here are 9 simple expression for image sequence, you definetly need them in order to make image sequence behave like you want inside Maya.

Expressions is also used in other softwares as well, such as After Effects. You may be interested for topics using expressions like:

Maya Expressions for Image Sequence:

If you are not comftable with exression in general don’t be alarm, most of them are extremely easy. So let’s get started.

One way to create an expression for our image sequence is to open Attribute Editor, go to file node tab, and right-click and select Edit Expression. After that the Expression Editors windows appears.

Maya edit expressions for Image Sequence

Note: For all below expressions, replace “file1” with your fileName. So if you have changed the file node name from file1 to something like file56 or motoR6, you should use that instead of file1 in Expression Editor, to create your particular expression. Also, i use the number “100” on those expressions, which is my original image sequence frames. Replace that number to your particular original image sequnece frames.

Frames Offset:

This expression, offsets the whole image sequence (start, end) to a specific frame. In that particular case, it offset it by 100 frames. So it will start at frame 100 and not at frame 0, or 1, in your timeline in Maya.

Reverse Playback:

Plays the image sequence backwards.

Freeze Frame:

Locks the image sequence to a single frame. So there is no need to break image sequnece connection in Maya and then assign for example that specific file (frame 45) instead.

Playback Speed Control:

This one, slow down the speed of your image sequence by half (0.5 = half speed from original, 2 = double speed from original). Of course, you can multiply or divide, these numbers as many times as you need, in order to get the behavior you want, from you particular image sequence.

Looping an image sequence:

Looping expression. As the name suggest, when your image sequence run out, it will start from the start. The number “100” indicates your original frames of your particular image sequence. If you have more or less than 100, put than number instead of “100”.

Limit Playback Range:

Plays only a specific section of the sequence, in this particular case from frame 20 to frame 60.

Hold on Last Frame:

By defauld in Maya, when an image sequence run out of frames, that 3D surfaces that holds the file node, becomes gray. With the above expression, the last frame of your image sequence will never disappear. The number “100” is the original number of image sequence frames, replace it with your needs.

Random Frame Selection:

This one is quite interesting. Basically display random frames from the image sequence. Ideal for flickering and glitch effects. The numbers inside () are the frame range, which the rundom effect will take place.

Ping-Pong Playback:

This one is also interesting. It plays the sequence forward and backward infinity.

inspire others:

Picture of Vladi Dan

Vladi Dan

Hey there. I am an experienced 3D Artist - Graphic Designer for over 7 years. Of course, the learning process doesn't really end. I am more than happy to share my personal knowledge with you guys. Let's create and learn some cool stuff together. I hope you join me on this creative trip.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related posts