Unreal Engine 4.18
A ‘Flip Book’ node in UE4 is the way to create an animated texture using a Sprite-Sheet.
Its very simple to use:
- Import a Sprite Sheet texture containing the animation frames.
- In the UE4 Material, Create a Texture Object node, and set it’s Texture property to be the Sprite Sheet texture you imported.
- Create a Flip Book node and connect the Texture Object Node to its Texture input.
- Connect numeric value constants to the Flip Book node’s Number of Rows and Number of Columns inputs to set the layout of the Sprite Sheet.
- Connect the outputs of the Flip Book node to the wanted material inputs.
The following example shows a way to create a custom Flip Book material to animate textures.
Q: Why would you do that???
A: Well the truth is I created it without knowing there is a built-in option, and found out about the Flip Book node right after I finished my own.. 😀
But it’s also a useful example of locating tile coordinates within a plane..
An efficient way to store 2D animation for games is to layout all the frames withing one texture called a ‘Sprite Sheet’ or ‘Texture Atlas’.
This saves resources by avoiding multiple texture loading operations and only animating the UVs of the shader to display the needed image at each frame.
Sprite Sheets are also used to pack various states of game graphics and textures for multiple objects in one file.
Sprite Sheets can be created manually using any image editing software,
For an automated process and more control, a specialized software like Texture Packer can be used.
And it can also be done automatically in Adobe Animate (Flash).
* There are many more solutions / scripts that will do that you can find on the web…
Animate CC 18
To generate a Sprite Sheet (Texture Atlas) in Animate:
- Create a new project.
* the type of the project doesn’t matter.
- Drag all your animation frames from into the Library window in Animate.
- Select all the frames in the Library window.
- RMB Click the selected frames and choose Generate Sprite Sheet.
- In the Generate Sprite Sheet window, set the Sprite Sheet settings, output path and press Export.