LuxCore icon indicating copy to clipboard operation
LuxCore copied to clipboard

Feature Request: Support for image sequences and video files as textures

Open qclem23 opened this issue 4 years ago • 4 comments

In Cycles I could drop an mpg file into the Image Texture node, without any problem, it was very useful. I miss this feature in LuxCore.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

qclem23 avatar Jun 29 '20 20:06 qclem23

How do I place a bounty on this?

qclem23 avatar Jun 29 '20 20:06 qclem23

Image Sequences

Image sequences are automatically supported by LuxCore due to it supporting single images. It is the responsibility of user-interfacing software (like our Blender addon) to manage the concept of "time" or multiple frames - LuxCore always only sees one frame at a time. As a side note, image sequences are supported in the Blender addon when using our own image node, but not yet when Cycles image nodes are used.

Video Files

About video files, I suspect that the situation is similar: it should be the responsibility of the client software to decode the video into individual frames, then send only one frame at a time to LuxCore. But I'm not totally sure about this. @Dade916?

So it might make sense to move this issue to the BlendLuxCore repository before creating a bounty for it.

We would then need to find some way to extract frames from a video in the Blender addon. Maybe this is possible with Blender doing some of the work - if not, we would need some kind of external library that supports a range of video formats. Since this can be a complicated topic, it might not make sense for us to support this - it might just take too much effort or introduce too many dependencies. So it would be best if Blender had some way to extract a frame from video which is available through the Python API.

edit: I searched around a bit, it seems like it's not possible to read the pixels of arbitrary video frames through the Python API:

  • https://developer.blender.org/T37216
  • https://blender.stackexchange.com/questions/3527/how-to-read-pixels-of-a-video-from-python-api (the "dirty workaround" described there can not be used in our Blender addon)

Adding video support requires to support a multitude of formats, codecs etc., it is a really complicated matter. Even if we used some existing video reader library, it would introduce a big dependency (that also needs to work on Linux, macOS and Windows). The only alternative I see is that users have to pre-process their video files into image sequences, with external software like Blender or ffmpeg.

Theverat avatar Jul 01 '20 23:07 Theverat

Video Files

About video files, I suspect that the situation is similar: it should be the responsibility of the client software to decode the video into individual frames, then send only one frame at a time to LuxCore. But I'm not totally sure about this. @Dade916?

It would be better otherwise we would have to introduce support for video formats in LuxCore and this would mean to add a lot of external library dependecies (ffmpeg, etc.) .

Dade916 avatar Jul 02 '20 09:07 Dade916

I have decided that the best I can do is to make a small donation each month in the hope that you guys will keep up the great work and with time I will find LuxCore for Blender easier to use and more powerful than ever.

On Thu, 2 Jul 2020, 01:49 Simon Wendsche, [email protected] wrote:

Image sequences are automatically supported by LuxCore due to it supporting single images. It is the responsibility of user-interfacing software (like our Blender addon) to manage the concept of "time" or multiple frames - LuxCore always only sees one frame at a time. As a side note, image sequences are supported in the Blender addon when using our own image node, but not yet when Cycles image nodes are used.

About video files, I suspect that the situation is similar: it should be the responsibility of the client software to decode the video into individual frames, then send only one frame at a time to LuxCore. But I'm not totally sure about this. @Dade916 https://github.com/Dade916?

So it might make sense to move this issue to the BlendLuxCore repository before creating a bounty for it.

How do I place a bounty on this?

Apparently the bountysource/github bot took a while to add the footer to the first post. You can now click the "Post a bounty on it!" link in the footer.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LuxCoreRender/LuxCore/issues/402#issuecomment-652699603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG2IB4ZDHYLOSQEVJFTQVF3RZPDPBANCNFSM4OLR7W6Q .

qclem23 avatar Jul 03 '20 14:07 qclem23