Page MenuHome

Video texture / Image Sequence not refreshing under eevee
Closed, ResolvedPublic

Tokens
"Love" token, awarded by evilvoland."Love" token, awarded by franalburquerque."Party Time" token, awarded by pistoltoto."Love" token, awarded by philm."Love" token, awarded by Yanis."Heartbreak" token, awarded by ogierm."Pterodactyl" token, awarded by vsautter."Love" token, awarded by riidom."Love" token, awarded by esdw22."Love" token, awarded by Nallic.
Authored By

Description

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)

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@Brecht Van Lommel (brecht), @Sergey Sharybin (sergey): not sure whom to assign this to? (I could spend more time investigating, but maybe it is obvious to one of you?)

btw. we have this working (refreshing sequences and movies) in camera background images, see view3d_draw_bgpic, but implementation is different/separate from GPU_texture_from_blender in that it does the whole drawing [not just the texture refresh...]

Brecht Van Lommel (brecht) raised the priority of this task from Confirmed, Medium to Confirmed, High.Jan 14 2019, 4:33 AM

Marking as high priority since this gets reported often.

This is a rather complicated issue caused mainly by copy-on-write changes. Previously on each frame change Blender would loop over (most) image users, recalculate the frame number and free the GPU texture if needed.

It did not do this for Cycles/Eevee image texture nodes in materials, only BI materials. That is easily solved, though for best playback performance it could be done in a smarter way than before.

The main issue however is copy-on-write. Both the original and COW datablocks need to be updated. This could be done as part of the depsgraph now for image users that are in the depsgraph, marking such materials or objects as depending on time.

Refreshing the GPU texture is problematic as well. Currently each image datablock stores and owns a single GPU texture at a single frame. However it is now possible to have multiple depsgraphs each at their own time. A proper solution to this likely means moving ownership of the GPU texture from the image to the image user or depsgraph, or having some kind of caching system.

Hey,

Some news about this?

And for some even more bazaar reason - it won't go past frame 97. I guess it's a memory problem? Tried the same scene with a few different videos in the same scene so far... but I might make this reporting bugs on a script rather than Blender if I'm not careful. I guess I'll be putting my greenscreen nodegroup for material nodes on hold.

I just discovered that if you toggle the sidebar (N) in the image editor, it gives you options to change the amount of frames to use in a movie/image sequence. This seems to be unaffected by the settings on the image texture node.

Still trying to figure out how to use more than one image sequence texture....any solutions?

@Daniel Craven (Craven) , Yep.
The working variant for several objects with video textures is to open several working windows with image editors and in each of them open different textures:

Daniel Craven (Craven) - thankyou! I will be putting a tutorial together on this in the next week.

Same problem here in two scenarios:

  • Image sequence textures under Eevee
  • Image Empties using a video with autorefresh (the usual way) in viewport, no matter which render engine is set

When will the bug get fixed?

@Philipp Oeser (lichtwerk) , i try to compile blender (da1da3053d75) with your solution, but your variant don't give needed result (black material with video texture and pink - with sequences).
Working variant with this code in node_shader_tex_image.c :

	Image *ima = (Image *)node->id;
	ImageUser *iuser = NULL;
	NodeTexImage *tex = node->storage;
	//ImageUser *iuser = &tex->iuser;

That give expected result (video and sequences update in viewport but render - sequences is flickering), but only when object is selected and active.

Someone can help with it? I don't understand some strings:
in all BKE_image update/check frame/etc uses cfra as integer.

But in GPU_texture_from_blender used time in double.

Ofcourse, in sequences/video textures logically to use integer (as frames). So, why using double?

This comment was removed by pistol ioan (pistoltoto).

I would like to send some resources for this problem particularly to speed the process, is it possible?

I would like to send some resources for this problem particularly to speed the process, is it possible?

I support. Ready to transfer money for a speedy solution to the problem. Where to transfer?

It's being worked on, just requires some deep changes to the dependency graph and GPU image loading code to work properly in 2.8.

It's being worked on, just requires some deep changes to the dependency graph and GPU image loading code to work properly in 2.8.

Thanks for the heads up @Brecht Van Lommel (brecht)

It's being worked on, just requires some deep changes to the dependency graph and GPU image loading code to work properly in 2.8.

Thank you @Brecht Van Lommel (brecht) I'm broadcast tv director. We are designing a tv show with a real time dynamic CGenerated scenography. Because of Eevee Blender can be ideal for that. But the real time movie clip elements insertion\playback is obviously crucial. We need a lot of video contribution in scenography. Have you an idea of how much time will take the fix? Thank you so much.

Also very interested in this!!

As another workaround:

import bpy

def my_handler(scene):
    print("Frame Change", scene.frame_current)
    bpy.data.images['YOUR_IMAGESEQENCE.0001.png'].reload()

bpy.app.handlers.frame_change_pre.append(my_handler)

Now you can scrub the timeline and see the changes.

ah, well...nevermind... workaround has been posted before

I would like to send some resources for this problem particularly to speed the process, is it possible?

I support. Ready to transfer money for a speedy solution to the problem. Where to transfer?

+1

It's being worked on, just requires some deep changes to the dependency graph and GPU image loading code to work properly in 2.8.

... so, for this problem I think 1000$ is not enough.

Thank goodness!
Thank you Brecht Van Lommel 👍👍👍

You were always my hero, right after you created Cycles!
I knew you could do it!

@Brecht Van Lommel (brecht) , I do not refuse my words, please tell me where to transfer money?

Thank you so much!

@Vladimir (evilvoland): anyone is welcome to contribute to the development fund, this bugfix was funded by it.
https://fund.blender.org/

@Brecht Van Lommel (brecht) , I wanted to thank You personally, but the support of the whole team is also important. Thank you very much for the work!

If you're not already subscribed to https://fund.blender.org/ go do it now! You can start as low as $6 a month :)

Thanks @Brecht Van Lommel (brecht) !

Thanks so much Blender team - you are the most awesome people ! - I am so gratefull for the work you do! This fix was really important to me as well :)

Is it functional in 2.8 - 6bab905c9d40 ? If so, it is only working with open node editor and active texture node - with properties. Is that right?

@ML (spawn_x) Download latest build from https://builder.blender.org/download/ it should work out of trthe box. Remember to set the frame range correctly in the node

@Daniel Dietrich (daniel) Salazar (zanqdo) Downloaded last build as before, but now is the 893fa598319e. But not working - blend file inside. And technique what I using is there: https://blender.stackexchange.com/questions/124813/image-texture-node-image-sequence-control-by-slider

It is working only with open node editor and active texture node. Without it is not functional. I used this technique for automate rigging puppet phases - hands, eyes, mouth etc.

I also have some troubles when doing opengl previews. I have a batchscript that starts Blender, replaces the background sequence, renders a opengl preview (because 10x faster than regular evee rendering) from different cameras and quit.
The backgroundsequences can either be png-seqences or mp4 files and the script does the switching and setting offsets. But the rendering is very unreliable and often I end up with only 3 animated frames and then a freeze, or the background is not moving at all. When I open up the scene everything looks fine in the viewport and scrubbing the timeline works. I couldn't detect a pattern yet.

If there are further specific issues with image sequences, please create new bug reports.

But it is same problem as before ... If we created new report we will wait for enough people with same problem then it will be in progress, so it may be long time story.

Emil Karas (esdw22) added a comment.EditedFeb 25 2019, 1:44 PM

Same here, in my case it's not just freezing randomly and then play animation again but mp4 files get confused with each other on different planes meaning I've got 4 planes with 4 different mp4 files. One frame plane number 1 got texture number one but on the next frame the same plane has got texture number 2.

Edit: if anyone's having same troubles with mixing sequences/clips with themselves make all of them single user data. Solved the problem for me. Its not freezing anymore as well.

Please do create new bug report, this is working for many cases so if there is a bug it's related to some specific setup. And for that it is best to have an own report with .blend and clear steps to redo. It also means we don't send mails to 50+ people subscribed to this task for a bug that is not relevant to them.

@Daniel Dietrich (daniel) Salazar (zanqdo) Downloaded last build as before, but now is the 893fa598319e. But not working - blend file inside. And technique what I using is there: https://blender.stackexchange.com/questions/124813/image-texture-node-image-sequence-control-by-slider

It is working only with open node editor and active texture node. Without it is not functional. I used this technique for automate rigging puppet phases - hands, eyes, mouth etc.

You need to enable the Autorefresh option in the node

No no, it’s not working with enable autorefresh neither withou it.

Gigi Botta (gigi) added a comment.EditedFeb 26 2019, 11:41 AM

Its work but there is still a little bug on autorefresh command. (on my system) Just reassign material you are working on to object in the shader editor when you finish your node assigning video texture etc (remember to set total frame number, activate cyclic and auto refresh) hit play and movie or image sequence work perfectly. If not video remain stopped to first frame. I noted with pleasure same video shader/material is shareable over undefined object number.

No no, it’s not working with enable autorefresh neither withou it.

Your scene is set to cycles, this is supposed to be a feature for eevee :s

ML (spawn_x) added a comment.EditedFeb 26 2019, 6:59 PM

@Daniel Dietrich (daniel) Salazar (zanqdo) and did you try it in eevee ?

I am sorry guys, but this my example is not functional on win 7, win 10, cycles or eevee its some kind of system problem, I don't know where exactly it is. I was looking forward to working with puppets, you know ... I am only sad nothing else. From my perspective its one big problem, very difficult problem, but the solution is on half way and I don't know how can I help, because I would like to help of course.

@Daniel Dietrich (daniel) Salazar (zanqdo) and did you try it in eevee ?

I am sorry guys, but this my example is not functional on win 7, win 10, cycles or eevee its some kind of system problem, I don't know where exactly it is. I was looking forward to working with puppets, you know ... I am only sad nothing else. From my perspective its one big problem, very difficult problem, but the solution is on half way and I don't know how can I help, because I would like to help of course.

Why do you have that driver setup in the offset?

There's already a separate bug report for @ML (spawn_x)'s case: T61937: Image sequence offset driver has no effect without node editor

It's been confirmed and will be worked on, no need to discuss it here.