LuxCoreRender / LuxCore

LuxCore source repository
Apache License 2.0
1.15k stars 144 forks source link

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

Open qclem23 opened 4 years ago

qclem23 commented 4 years ago

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!](https://www.bountysource.com/issues/91897723-feature-request-support-for-image-sequences-and-video-files-as-textures?utm_campaign=plugin&utm_content=tracker%2F79505306&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F79505306&utm_medium=issues&utm_source=github).
qclem23 commented 4 years ago

How do I place a bounty on this?

Theverat commented 4 years ago

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:

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.

Dade916 commented 4 years ago

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.) .

qclem23 commented 4 years ago

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, notifications@github.com 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 .