# UMG: Anyway to use a sprite flipbook?

**URL:** <https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962>\
**Category:** UI\
**Tags:** flipbook, hud, sprite, unreal-engine, question, UMG\
**Created:** [September 17, 2014, 8:12pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962 "2014-09-17T20:12:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ianoreo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ianoreo](https://forums.unrealengine.com/u/ianoreo)\
**Post date:** [September 17, 2014, 8:12pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/1 "2014-09-17T20:12:14Z")

</div>

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?

Many thanks!

---

<div class="post-metadata">

**Author:** ![NickDarnell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NickDarnell](https://forums.unrealengine.com/u/NickDarnell)\
**Post date:** [September 17, 2014, 8:46pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/2 "2014-09-17T20:46:38Z")

</div>

You would have to use a material to animate a texture with subuvs, UMG widgets don’t understand Paper2D’s flipbook asset.

Cheers,  
Nick

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_21a58d97](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_21a58d97](https://forums.unrealengine.com/u/anonymous_user_21a58d97)\
**Post date:** [November 29, 2014, 12:51pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/3 "2014-11-29T12:51:18Z")

</div>

Any chance to see this fixed in 4.7? Us paper2d guys need to feel that you love us as well Nick! 🙂

---

<div class="post-metadata">

**Author:** ![NickDarnell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NickDarnell](https://forums.unrealengine.com/u/NickDarnell)\
**Post date:** [November 29, 2014, 4:15pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/4 "2014-11-29T16:15:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Max4dmoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Max4dmoon](https://forums.unrealengine.com/u/Max4dmoon)\
**Post date:** [April 8, 2015, 2:52am UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/5 "2015-04-08T02:52:14Z")

</div>

Hello there,

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)

---

<div class="post-metadata">

**Author:** ![ianoreo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ianoreo](https://forums.unrealengine.com/u/ianoreo)\
**Post date:** [April 8, 2015, 8:35pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/6 "2015-04-08T20:35:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Max4dmoon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Max4dmoon](https://forums.unrealengine.com/u/Max4dmoon)\
**Post date:** [April 11, 2015, 2:17pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/7 "2015-04-11T14:17:21Z")

</div>

Hello,

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.

Hope it helps.

---

<div class="post-metadata">

**Author:** ![Mortusnyte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mortusnyte](https://forums.unrealengine.com/u/Mortusnyte)\
**Post date:** [July 27, 2015, 2:24pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/8 "2015-07-27T14:24:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dryfter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dryfter](https://forums.unrealengine.com/u/Dryfter)\
**Post date:** [November 3, 2015, 1:01pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/9 "2015-11-03T13:01:13Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![ianoreo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ianoreo](https://forums.unrealengine.com/u/ianoreo)\
**Post date:** [November 4, 2015, 3:04pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/10 "2015-11-04T15:04:53Z")

</div>

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!

Additional info: [Render a Flipbook Animation | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/Engine/Content/Tools/RenderToTextureTools/5/index.html)

---

<div class="post-metadata">

**Author:** ![grisevg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@grisevg](https://forums.unrealengine.com/u/grisevg)\
**Post date:** [February 8, 2016, 11:23am UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/11 "2016-02-08T11:23:28Z")

</div>

Hey guys, I’ve hacked together an `AnimatedImage` class for doing spritesheet animation in UMG: [UMG Animated Image. · GitHub](https://gist.github.com/grisevg/beaf25a85bb6ce005b17)

---

<div class="post-metadata">

**Author:** ![dorgon\_chang](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dorgon_chang/32/1124941_2.png) [@dorgon\_chang](https://forums.unrealengine.com/u/dorgon_chang)\
**Post date:** [July 13, 2016, 1:52am UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/12 "2016-07-13T01:52:11Z")

</div>

hi, I created a plugin that can support use flipbook directly in UMG.

You can find my plugin in marketplace:

> **[Horizon UI Plugin (DialogueMsgTextBlock and Flipbook) in Code Plugins - UE...](https://www.unrealengine.com/marketplace/en-US/product/horizon-ui-plugin)**
>
> This Plugin contains some extension for UMG Widget.

You can try HorizonFlipbookWidget in this plugin.

cheer 🙂

---

<div class="post-metadata">

**Author:** ![grisevg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@grisevg](https://forums.unrealengine.com/u/grisevg)\
**Post date:** [July 13, 2016, 2:07pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/13 "2016-07-13T14:07:56Z")

</div>

Nicely done! Does it include source? Is it ok to modify it?

---

<div class="post-metadata">

**Author:** ![dorgon\_chang](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dorgon_chang/32/1124941_2.png) [@dorgon\_chang](https://forums.unrealengine.com/u/dorgon_chang)\
**Post date:** [July 13, 2016, 2:53pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/14 "2016-07-13T14:53:50Z")

</div>

yes, if you buy the plugin you can get source code, and it is ok to modify source for your own project if you want.

---

<div class="post-metadata">

**Author:** ![Strider57](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Strider57](https://forums.unrealengine.com/u/Strider57)\
**Post date:** [April 28, 2018, 5:50am UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/15 "2018-04-28T05:50:46Z")

</div>

And it works beautifully. Highly recommended.  
Wanted to add jittery text label, seemed way to complicated until I tripped over this post.

[https://dl.dropboxusercontent.com/s/jsqvzf7pdgmms8k/HEAT%20v0.1.mp4?dl=0](https://dl.dropboxusercontent.com/s/jsqvzf7pdgmms8k/HEAT%20v0.1.mp4?dl=0)

---

<div class="post-metadata">

**Author:** ![daydreamjy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@daydreamjy](https://forums.unrealengine.com/u/daydreamjy)\
**Post date:** [April 22, 2019, 4:31pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/16 "2019-04-22T16:31:48Z")

</div>

I am also experiencing this problem now. After one year, I would like to ask if there is any good liberation method?

---

<div class="post-metadata">

**Author:** ![axelkomair01](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axelkomair01/32/88714_2.png) [@axelkomair01](https://forums.unrealengine.com/u/axelkomair01)\
**Post date:** [July 23, 2023, 11:50am UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/18 "2023-07-23T11:50:06Z")

</div>

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)

Here’s the c++ snippet I use

```auto
FDateTime AnimStartDate;
UPaperFlipbook* AnimFlipbook;
UImage* AnimImage;

void StartAnimation()
{
	AnimStartDate = FDateTime::Now();
}

void TickAnimation()
{
	FTimespan sTime = FDateTime::Now() - AnimStartDate;

	float sSeconds = sTime.GetTotalSeconds();
	//Animation is done
	if (sSeconds >= AnimFlipbook->GetTotalDuration())
	{
		//Loop
		{
			AnimStartDate = FDateTime::Now();
		}

		//Or End
		{
			//Do end logic
		}
	}
	else
	{
		AnimImage->SetBrushResourceObject(AnimFlipbook->GetSpriteAtTime(sSeconds));
	}
}

```

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

---

<div class="post-metadata">

**Author:** ![Arius](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arius/32/581497_2.png) [@Arius](https://forums.unrealengine.com/u/Arius)\
**Post date:** [October 25, 2023, 1:50pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/19 "2023-10-25T13:50:42Z")

</div>

Try this, not fully tested but anyway…

[FlipbookImageWidget.cpp](https://forums.unrealengine.com/uploads/short-url/69xgrw8vWXFP3PzrY9LqBSZEkYB.cpp) (6.3 KB)  
[FlipbookImageWidget.h](https://forums.unrealengine.com/uploads/short-url/1u8VWT8VMPkFttjMIdVOalw4V7X.h) (3.3 KB)

All data for animation is gathered directly from the flip book asset.

---

<div class="post-metadata">

**Author:** ![Caviarail](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Caviarail](https://forums.unrealengine.com/u/Caviarail)\
**Post date:** [November 1, 2023, 10:33pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/20 "2023-11-01T22:33:33Z")

</div>

> [@axelkomair01](#):
>
> `FDateTime AnimStartDate;`

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!

---

<div class="post-metadata">

**Author:** ![Caviarail](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Caviarail](https://forums.unrealengine.com/u/Caviarail)\
**Post date:** [November 1, 2023, 11:04pm UTC](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962/21 "2023-11-01T23:04:55Z")

</div>

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.

 ![compileerrors](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/e/30e5aefbb8b3bd362fe32f493c755bef083c2c75.jpeg)

[Next page](https://forums.unrealengine.com/t/umg-anyway-to-use-a-sprite-flipbook/293962.md?page=2)
