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:
download Blender_autorefresh_win32-mingw.zip above and unzip.
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.
click the “auto refresh” button on the texture panel.
Enter GLSL texture mode (Game ->Blender GLSL Materials from the main menu)
Enter textured viewport shading (alt Z)
with the plane selected and texture panel visible, scrub through frames and you will see the texture updating.
unclick the “auto refresh” button if you don’t want a texture to auto refresh. The correct frame will still render though.
Notes:
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.
Texture scrubbing is a bit slow (about 5-10 fps on my machine) because the image buffer is freed each frame.
The plane has to be selected and the texture window visible (F6) for now.
Purpose:
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.
Once you have compiled in the patch this is how you get autorefreshed video texture:
create a plane and apply an image texture exept you you a video or sequence of images.
click the Auto Refresh button
get into GLSL render mode and enter texture draw type.
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.
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
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.
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.