Autorefresh video textures

I made a very minor modification to Blender to enable texture autorefresh in GLSL mode. Currently, you have to hit the reload button on the texture panel to update the video frame. The autorefresh build above does this automatically.

Try it out. Notice that this my own very experimental copy and not in the SVN so only experiment with it and use at your own risk:

  1. download above and unzip.
  2. Run Blender and create a new plane with image texture and load image sequence

note: The build above has NO FFMPEG support so most movie files won’t work - only image sequences for now.

  1. click the “auto refresh” button on the texture panel.
  2. Enter GLSL texture mode (Game ->Blender GLSL Materials from the main menu)
  3. Enter textured viewport shading (alt Z)
  4. with the plane selected and texture panel visible, scrub through frames and you will see the texture updating.
  5. unclick the “auto refresh” button if you don’t want a texture to auto refresh. The correct frame will still render though.


  1. Scrubbing on the timeline panel doesn’t work - you have to use the action or NLA Editor windows or you can hit the right or left arrow on the keyboard.
  2. Texture scrubbing is a bit slow (about 5-10 fps on my machine) because the image buffer is freed each frame.
  3. The plane has to be selected and the texture window visible (F6) for now.

When mixing live video with CG, it is necessary to see the video frames update in order to interact the video properly with the CG props. So for example, an actor is filmed in front of a green screen and the green background is removed with a program like Cinegobs (free) or even Blender. Then the video is textured to a plane and dropped into the CG scene. During frame scrubbing, the live actor can be manipulted to interact properly with the CG props such as doorways, paths, chairs, etc.

Any chance you could submit a patch for this? sure would be nice to see textures changing in 3D view…

Yes a patch would be great!


I remember exchanging posts with your about this topic on this thread:

And now you’ve tracked down the error? Way to go!

You really need to make a patch for this…



I would urgently need this functionality. Is there a patch to download somewhere or a known workaround?

You definitely have to make a patch, as there are many of us who use Linux or Mac and may need to recompile Blender!!

Thanks in advaced!

I will make a patch. In the meantime here is some entertainment I created with my special build of Blender:

Here is the patch: it works in Blender 2.49.

Once you have compiled in the patch this is how you get autorefreshed video texture:

  1. create a plane and apply an image texture exept you you a video or sequence of images.
  2. click the Auto Refresh button
  3. get into GLSL render mode and enter texture draw type.
  4. with the image plane selected and the texture window visible (F6) you scrub back and forward and see your image panel updating.

Note: you have to use the NLA editor or action editr or left and right cursors to advance the frames. The timeline does not update the image.

Image refresh is slow. I didn’t have time to figure out how to buffer the image sequence or video from memory. I hope and wish and hope that this will be put into Blender 2.5. It would be amazing.

Thanks! Isn’t open source great?

ericsh6, thank you so much! I’ll be needing this.

Thanks Ericsh6! I´ll try this!!

Have you talked to any of the blender developers about this??

Why don´t you officially submit the patch to

You can find the developers at the IRC channel called blendercoders

I hesitate to submit it as a patch. I would much rather have the video or image sequence texture buffered from memory so that you can preview it in real time. My patch is just a temporary band-aid to see get a feel of how is the best way to bring live composited actors into a blender animation. But I can submit it as a patch if you all think it is still a good idea and would get us closer to the right solution. Maybe the developers would see the patch and laugh at it and then tell us the right way to do it.

I think that you could submit the patch and contact the developers at the IRC and ask them for help on the things you are missing! They are very friendly, you can even talk to Ton there, hehe

I think it needs to get integrated into 2.5, and the only way that will happen is if you submit it as jpbouza said.

he, I really really like that movie. The guy starring in it is so natural…

I am getting ready to submit the patch. Has anyone sucsessfully compiled and tested the patch I posted above?

sorry to slightly resurrect…
I haven’t tried the patch yet, as I try and stay away from the code and compiling, as I tend to break things as simple as hello world.
However, I agree that this functionality HAS to be in blender in order to compete (I know it’s not meant to compete, but it’s either blender or 3ds max for me… obviously my wallet has a lot to do with the decision). I use blender for engineering stuff, and using video textures is quite common in showing animated arrow flow, for instance, and other stuff. Seeing it in the viewport is huge in getting timing right.
currently I can’t even get a single frame of a UV mapped .avi to show in the viewport, using the proper technique.

Has anyone tried the patch already??

I used it on a project, worked just like eric described it.

Hoverkraft, that is great news. Now that I have confirmation that it works for others, I am going to venture into the land of the developers and see how to get this into 2.5. But I want it to be realtime though so I think it will involve buffering an image sequence or video from memory or disk. I haven’t updated to the latest SVN yet and haven’t seen any of the 2.5 source code yet.

dschnell28, if you use Blender on Windows then go to the top of this thread and you will find a link to a windows build that incorporates this patch.