I have some UI elements animated and exported into a sprite flipbook. Is there anyway I can use this in UMG? I’m currently just parenting it to the player camera’s blueprint, but this leads to some weird graphics effects when moving the camera around. Alternatively, is there a way I can simply add it to the viewport?
Probably not; it’s not a trivial change to make and there are too many other higher priority things. would probably need to do it, as it will I believe require moving some paper2d types into the core bits of the engine. To make them accessible to the slate rendering pipeline for UMG.
I’m confused because I’ve been able to add a simple flipbook to UMG and it worked (added to the viewport) then I’ve tried the next step (which is what I really need) assigning the UMG (with the flipbook) to a 3D widget but nothing shows up.
Nick: would it be possible to get an update on what is currently working and not working please ?
(I’m not sure if I’m doing something wrong or If there is no way it’s going to work)
Hey,
Did you use a material for the flipbook or literally the Paper Flipbook itself? Would love to know how you’ve set that up, as I’ve had to resort to just dropping the flipbook actor into the scene and parent to camera. Been able to get a flipbook material working as an image, though haven’t tested with 3D wigets themselves.
I’m working on a 3D project and used flipbook only once for this test so pardon me if my explanations are not very clear.
Disclaimer: I don’t know what is a paper flipbook, is it the same as just a flipbook texture ?
What I did is create a flipbook texture, made a material out of it, checked things like “used for UI” for example to prepare the material…then assign the material in UMG and it worked.
But it only works in viewport, I’ve been unabled to make it work as a 3D widget.
When I need looping animations in my widget I just create and image and a Macro in the graph that loops a set of textures in the brush properties of the image.
Wait, so there is a way? Sounds simple enough but a few things are unclear…which graph would you place said image and macro? Brush properties? Could you give an example please or point me to one please? That sounds like exactly what I’ve been looking for for the last few days and I’m stumped…
I don’t know if it’s the solution you are looking for, but I ended up using Materials that had the Flipbook material function in them instead. Very easy work-around to get image sequences working well in UMG!
Elegant Solution - C++ (Easily expandable to Blueprints)
1 - You can put in UPaperSprite objects directly into any UImage.So ultimately it is possible
2 - You just need to simulate the UPaperFlipbookComponent Tick(or use the Component itself and call TickActorComponent() wherever you want.Don’t have to attach it to an actor)
Very easy to accomplish.If you need more control over how to animate, you can check UPaperFlipbookComponent to see how they change the play rate.Or directly use the Component to tickand register the correct frame to put into the image
Great solution. I actually inherited from UImage to try this out and it works. Probably taking an emptier UWidget, but I’m already glad that this works! Thanks!
I wanted to try your solution as well, but I got a bunch of linker-compile errors (after fixing a smaller one that concerned an unsigned int). It’s getting late here, but maybe there’s something I am missing.