Play video texture / image sequence in Editor?

Hey guys!

I come from a VFX background and using UE4 for cinematic creation purposes and NOT for making any games. Having seen Blender’s capability to play videos / image sequences on planes in the viewport made me wonder if UE4 has similar options available? Say for example I have a video file or image sequence of people looking out from windows that I want to stick on top of my building geometry on a simple plane. Or if I have a video / image sequence of twinkling lights or smoke or animating billboards that I want to add to my buildings to breathe life into them.

You understand the usage.

Here’s an example of something similar but in blender’s realtime viewport, something like this but tons of video planes spread across my level:blender 2.8 daily tip using video textures in blender - YouTube
I learned how to bring in videos in UE4 using Media Player but the issue with that is I can’t visually see the video playing in the Editor. First I have to hook it into the begin event play in the level blueprint and then when I hit play button is when the video shows up. This isn’t exactly useful as I need to see the video elements playing in the editor so I can set design.

Please tell me this is doable somehow! |

Thank you for your time!

Indy

You can use a flipbook texture, there’s a tutorial here: Flipbook Node: Creating an Animated Texture – Jess's UE4 Tutorials

Thanks for the quick response! Is this the only way though? Some of my videos have like hundreds of frames, they are like 20-30 seconds long, this method of turning them all into image sequences and then turning all those hundreds of frames to a spritesheet would be very tedious and not effective. Converting all my videos to image sequences is something I don’t mind doing but idk if turning them into sprite sheets is the best way because even if I turned the frames into spritesheet, it would be one really huge image.

The stuff you described wanting to do should be capable with flipbook textures, if you’re wanting to use 30 second clips for that kind of thing you’re going overboard. You also need to think of ways to do some of those things just with a material, like flashing lights can be animated in the material.

Yes but having to create sprite sheets for videos seems like a bit of a laborsome job when done manually. Is there a plugin or something that enables this? The closest I found was Animated GIF importer on the marketplace which works great because I might be able to turn my video into a gif and go through that route but that plugin currently is crashing UE4 because of DirectX12 reasons which I have about in a separate question here. Sometimes the realism (which I am big supporter of) is much higher in say a video of bellowing smoke than having a sprite simulation of smoke. That’s just one of the use case, using videos that can be keyed inside the engine realtime is game changer for cinematics, if not for realtime gaming due to their resource intensive nature…

I did a thorough search and found this thread here which was 6 years old with people requesting a feature like this back in to be intrinsic to UE4 and seems like there isn’t any still? Hopefully I am wrong and such a method already exists…
https://forums.unrealengine.com/development-discussion/content-creation/2471-flipbook-playing-an-animation-texture

You don’t need a UE4 specific tool to convert a video clip into a flipbook texture, there are tools out there to do that. You can also set an alpha channel in the texture so you don’t need to do anything to key out a background in UE4.
But again, the stuff you’ve described wanting to do should be possible with reasonably sized flipbook textures or using some animation functions in materials.

Thanks for the quick response! :slight_smile: I understand that third party tools could do the manual labor of turning say gifs into spritesheets for me but I just find the overall setup of doing this a bit clunky and opposite of being resourceful. Please allow me to show an example. Here’s a gif of an animated ad that I found online that I turned into a spitesheet using ezgif website.
ORIGINAL GIF: https://freeimage.host/i/nike1.216VJp
TURNED TO SPRITESHEET (idk why it was converted black and white but its the same gif without color): https://freeimage.host/i/ezgifcom-gif-maker.216I0x

Now couple things I would like to mention here. The original gif this was made from is 13 MB. Spritesheet is 44 MB. If I compress it to reduce size, it will actually degrade the image whereas I get the original image at 13 MB from the gif itself.
So firstly in this case, it is more resource intensive to use the spritesheet because the image size is 4000 x 25800 px in order to accommodate all frames without shrinking the resolution of a single frame. Secondly, I realized the spritesheet material creation process needs you to tell UE how many rows and columns there are in the image. Columns I knew during creation was set to 5 but rows are set to auto so that the image can get as big as it wants in order to fit all frames. This means I have no clue what the number of rows are. One could argue you could simply count it which might be easy to count if you have less rows and the animation is clear to see but here its a jumbled mess looking spritesheet due to the nature of the content and the sheer size of the spritesheet. Then once I do successfully count the rows and columns then probably write that in the name of the file itself or something so I don’t forget it next I want to use this spritesheet.

You can see how this would deter someone from going down this route if their end goals are not to make a game but a cinematic.

At this point, seeing the lack of options UE provides, I would happily go down the route of using media player source to load videos in directly but as I wrote above, I can only get UE to play them at runtime when you hit the Play button on the level. I simply want the video to keep playing in the editor itself so I can quickly set dress the scene while watching the content play inside the editor.
Is there no way to get the media player to play inside the editor? I watched a bunch of tutorials but they all have the video playing after the Play button is hit, not in editor.
Am I doing something wrong or missing out on something?

|Thankyou for you time!

Indy

You can play it in the media player and minimize it, and the plane will display the movie. If you have a ton of them in the world, then setting up in level BP for begin play would be a better option.

Dont forget that you can loop the movies as well.

Not sure why no one has said this yet (maybe I’m missing something obvious about your question?) but UE4 has a very straightforward way of rendering videos onto textures:

OMG YES THANK YOU! Jeez. I can’t believe this wasn’t mentioned in the official docs. In order to play it in the editor, you gotta keep it playing through the player and minimize it!
Thank you so much for such a simple solution.

I already mentioned in the original post that I tried the media player way that you linked to, I just couldn’t get the video to play in the editor but only could play it on runtime. Which is why I didn’t go down that route. But pickersZ response solved that issue, so I guess for now I will use that!

Thanks everyone!

My bad, I totally missed your last paragraph. I wonder if setting that up in the constructor would let it play in the viewport?

One last question for you wizards, now that I have the video texture playing on my plane, I duplicated the plane and want to use the same video texture on the second plane but just offset the start point so both planes are playing the same video at different time offsets, like a bunch of TVs playing different parts of the video so break the uniformity of them all playing the same thing.
How do I achieve that in the material editor? Is there a node to time offset video texture? I would rather not make a separate copy of the material, a copy of the media player and so on. That might get clunky if there a lot of instances. I hope there is a quicker easier way to do it!