Page MenuHome

Video texture not refreshing under eevee
Open, ConfirmedPublic


System Information
Mac OSX and gtx 980 ti

Blender Version
Broken: 2.80.0 3bc8bc0709a

When navigating in timeline, shader with video texture doesn't refresh with eevee , but it's working when I switch to cycles

EDIT: same result in viewport or render (ctrl F12)



Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Incomplete priority.Oct 29 2018, 10:51 AM

Please always provide a simple .blend file that demonstrates the issue.
(It takes time setting these up -- also it makes sure we are all on the same page then)

also: is this about viewport rendering (or F12?)?

Marking as incomplete until we have these...

Philipp Oeser (lichtwerk) raised the priority of this task from Incomplete to Confirmed.Nov 4 2018, 4:34 PM

Before digging deeper: @Clément Foucault (fclem): is this a known limitation atm.?

Nope. It's something that seems to have been remove when removing the BGE. I know nothing on how it was done before and what would be the best way to reimplement this.

Well I hoped something like that would work:

diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index e9d874bd1ee..2cf3494802d 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -40,6 +40,8 @@
 #include "BLI_link_utils.h"
 #include "BLI_mempool.h"
+#include "DEG_depsgraph_query.h"
 #include "intern/gpu_codegen.h"
 struct GPUVertFormat *g_pos_format = NULL;
@@ -802,7 +804,7 @@ static DRWShadingGroup *drw_shgroup_material_inputs(DRWShadingGroup *grp, struct
 			GPUTexture *tex = NULL;
 			if (input->ima) {
-				double time = 0.0; /* TODO make time variable */
+				double time = DEG_get_ctime(DST.draw_ctx.depsgraph);
 				tex = GPU_texture_from_blender(input->ima, input->iuser, GL_TEXTURE_2D, input->image_isdata, time);
 			else {

But GPU_texture_from_blender does not do anything with time...

Will also have a look tomorrow [cycles seems to be updating -- in rendered view...]

Hi Philipp,

I have added a testfile


The Clip I could not pack into blender, so I add the mp4 clip in addition (zip).
The Video texture is


No timeline reresh and no frame refresh with Ctrl+F12.

Hi, any update or workaround on this issue? We're being hit by it :)

Well in case anyone else needs it urgently, for now I've hacked it with a frame change handler. It works in viewport and render but only if the image editor is present :p

Hi Daniel,

Thank you very much for taking care!
The script runs well in the Image Editor, however I couldn't manage to run it in the render view, please see my test Image added here.
May be I made a mistake…?

Thanks, Daniel!
Repaired… nevertheless… no Ctrl+F12 result… stucks at one Frame.
Scrolling timeline, the Image Editor refreshes well, though.

and.. which built is in use at your site?

@Martin Harth (mhcall) It does work with rendering animation for me

@Martin Harth (mhcall) I see you have 2 copies of the movie, the one your referencing in the script is Kati.mp4, the one in the image editor is Kati.mp4.001

The image editor has to have the same movie displayed.

Yes, you're right. I reloaded the orgingal 'Kati.mp4'.. however, it won't seem to work in the render view.
This is my current blender Version

And this was - at least at my place here - the last 2.8x blender Version, which worked well with animated textrues:

Eventually this hint might help to locate the "bug" (?)....t.

arn drul (kdgf) added a comment.EditedSun, Dec 9, 4:25 PM

for easy copy paste:

import bpy

def clipReload(scene):['pasteclipnamere.mp4'].reload()
    print('Clip Reloaded')

I don't know what else to say :) The hack works for me. Did you actually execute the script? In my original screenshot I have the Register option enabled. This makes it so that the script is executed automatically on load. Also the Auto Run Python Scripts preference must be enabled..

This comment was removed by Daniel Salazar (zanqdo).

OK I found a hack for the hack :) When rendering doesn't work, you can render a "Playblast" with View/Viewport Render Animation.

The problem is the viewport render doesn't respect sample settings..