Flipbook
Flipbook is a classic feature that allows images from a Texture Array to be played as an animation on the Material. This can be a way to play GIFs or a specific 2D animation that either animates in a loop or in a specified pattern.
Flipbooks use a Texture Array
, which is a special type of file that consists of a multiple set of images that are sorted in a specified sequence. They can be created in Unity using ThryEditor TextureArray Utility.
Texture Arrays can quickly add up to your VRAM consumption depending on the resolution and the amount of images used in your array! Please keep this in mind when creating your Texture Arrays.
Color & Alpha
Type
: Color
Defines the color tint and alpha value (transparency) of the flipbook. This allows the flipbook to be tinted, or to blend only partially. Can generally be left at the default values.
Texture Array
Type
: Texture Array (sRGB = On
)
Main Texture Slot to specify your Flipbook Texture Array. This uses a Texture2DArray texture to store multiple flipbook frames.
Texture Arrays can be created from GIF files imported to unity, or a series of single frames. By right clicking the file (or files) to be made into a texture array and selecting Thry -> Gif 2 Texture Array
or Thry -> Images 2 Texture Array
, the texture array will be created. Make sure to take note of the "Slices" value, which is the number of frames in the array.
Note that Texture2DArrays can get very big very quickly - make sure your source image files are low resolution, such as 512x512 or lower.
Attaching a GIF into the texture slot will automatically convert the file into a Texture Array. Please be aware that if your images are of large size (or have many frames), Unity will freeze for a few moments while it auto-converts the GIF.
Mask
Type
: Data Texture (sRGB = Off
)
Defines where on the UV the flipbook can be applied. Black indicates the flipbook can not be applied, while white indicates the flipbook can be applied. If this texture is not defined, the flipbook can apply everywhere.
Global Mask
Type
: Dropdown, Options:Off
/1R
/1G
/1B
/1A
/2R
/2G
/2B
/2A
/3R
/3G
/3B
/3A
/4R
/4G
/4B
/4A
Select which Global Mask to use for the Flipbook overall.
Expand the Mask slot to see this property.
Tiling
Type
: Dropdown, Options:Off
/Tiled (Seamless)
/Tiled (Sprite)
Sets the Tiling mode to use on the Flipbook.
Blending
Type
: Dropdown, Options:Replace
/Darken
/Multiply
/Lighten
/Screen
/Subtract
/Add
/Overlay
/Mixed
Controls how to blend the Flipbook with the Material.
Alpha/Color Override
Type
: Dropdown, Options:Off
/Replace Alpha
/Replace Alpha and Color
Optional setting to control if the Color and/or Alpha of the Flipbook should replace the final Color and/or Alpha. This allows the Flipbook to be rendered on top of the material, even if the material is transparent OR if the Flipbook should override the base color as well.
Replace
Type
: Float, Range:0.0 - 1.0
Replaces the base color with the Flipbook.
You may animate this slider to toggle the Flipbook on the Material. Animating the Section Header will not work!
Emission Strength
Type
: Float, Range:0.0 - 20.0
How much emission the flipbook should have. This stacks with whatever blending options are selected.
FPS
Type
: Float
How many frames per second the flipbook should play if "Manual Frame Control" is not enabled. This is used to determine how fast the flipbook should play. The default is 30 FPS.
Frame Offset
Type
: Float
Sets an offset for the frames.
Positioning
Pan UV
Type
: Vector2
Sets a panning speed on the Flipbook.
Scale / Offset
Type
: Vector4
Determines the Scale (size) and Offset (position) of the Flipbook. The first two values are the scale (in X/Y) and the second two are the position (in X/Y). This allows placing the Flipbook like a Decal.
Side Offset
Type
: Vector4
Side Offset allows stretching and squishing the Flipbook in the X and Y directions. Each value can be positive or negative values, with positive values stretching the Flipbook in that direction, and negative values squishing the Flipbook in that direction.
The first two values the left and right offsets, and the second two are the top and bottom offsets.
Rotation
Type
: Float, Range:0.0 - 360.0
How much to rotate the Flipbook by, in degrees.
Rotation Speed
Type
: Float
A constant rotation speed applied to the decal. A value of 180
will rotate the decal once per second, which is quite fast.
Manual Frame Control
Type
: Toggle
Determines whether the Flipbook should be manually controlled. If this is enabled, the Flipbook will not play automatically, and the frame must manually advance via animations. This is useful for dynamically controlling the speed of the Flipbook, or using the Flipbook to show specific frames.
Current Frame
Type
: Float
Determines which frame to show. Only works when the above toggle Manual Frame Control
is enabled.
Start/End Frame Loop
Type
: Toggle
When enabled, the settings in this area can be used to clamp which frame the Flipbook should start and end from.
Start Frame
Type
: Float
Sets the first frame in the Flipbook.
End Frame
Type
: Float
Sets the last frame in the Flipbook before it loops back to the beginning Start Frame.
Frame Crossfade
Type
: Toggle
Enables or disables crossfading. This is used to smoothly transition between frames, which can be useful for reducing the number of frames needed in the Flipbook.
Fade Range
Type
: Multislider, Range:0.0 - 1.0
Determines how much to crossfade the Flipbook between frames. Defined by a start and stop value.
Hue Shift
Type
: Toggle
Enable or Disable the Hue Shifting functionality.
Color Space
Type
: Dropdown, Options:OKLab
/HSV
Choice of Color Space to use for the Hue Shift. By default, it will be set to OKLab
.
Learn about the difference of Color Spaces as documented here in Color Adjust.
Select or Shift
Type
: Dropdown, Options:Hue Select
/Hue Shift
- Default:
Hue Shift
- Default:
This dropdown allows you to select how the Color Adjustment should behave when the Hue Shift is used. By default, this will be set to Hue Shift
.
Select or Shift Options
Hue Select
: Directly applies the selected Hue as an override to the entire Flipbook.Hue Shift
: Only tints the Flipbook based on the lerped value. This is the default behavior.
Shift Speed
Type
: Float
How much to constantly shift the hue with time. A value of 1 will result in a full hue shift cycle every 20 seconds.
Hue Shift
Type
: Float, Range:0.0 - 1.0
How much to shift the flipbook around the hue circle.
This value is circular, and will have the same result at 0 and 1.
Audio Link
The settings in this section will only be visible when AudioLink is activated on the Material.
Scale Band
Type
: Dropdown, Options:Bass
/Low Mid
/High Mid
/Treble
Which band of the audio to use for the Audio Link Scale Mod.
Scale Mod
How much to modify (mod) the scale of the flipbook. These values are added to the current scale, and can be positive or negative.
Type
: Vector4
Channel | Function |
---|---|
X | Amount Added to X Scale with no audio in Scale Band |
Y | Amount Added to Y Scale with no audio in Scale Band |
Z | Amount Added to X Scale with max audio in Scale Band |
W | Amount Added to Y Scale with max audio in Scale Band |
Alpha Band
Type
: Dropdown, Options:Bass
/Low Mid
/High Mid
/Treble
Which band to use for the Audio Link Alpha adjustment.
Alpha Mod
Type
: Vector2
How much to modify (mod) the alpha of the flipbook, in degrees.
Channel | Function |
---|---|
X | Amount Added to alpha with no audio in alpha Band |
Y | Amount Added to alpha with max audio in alpha Band |
Emission Band
Type
: Dropdown, Options:Bass
/Low Mid
/High Mid
/Treble
Which band to use for the Audio Link Emission adjustment.
Emission Mod
Type
: Vector2
How much to modify (mod) the alpha of the flipbook.
Channel | Function |
---|---|
X | Amount Added to Emission with no audio in Emission Band |
Y | Amount Added to Emission with max audio in Emission Band |
Frame Band
Type
: Dropdown, Options:Bass
/Low Mid
/High Mid
/Treble
Which band to use for the frame adjustment.
Frame Control
Type
: Vector2
How many frames to add. This is added to the current frame, and stacks with a constant FPS, or with Chronotensity frame control.
Chronotensity
Chrono Band
Type
: Dropdown, Options:Bass
/Low Mid
/High Mid
/Treble
Which band to use for the chronotensity frame adjustment.
Chrono Type
Type
: Dropdown
Chronotensity Options
- Motion Increases as intensity of the band increases
- Above but Smooth
- Motion moves back and forth as a function of intensity
- Above but Smoooth
- Fixed Speed Increase when the band is dark Stationary when light
- Above but Smooooth
- Fixed Speed Increase when the band is dark Fixed speed decrease when light
Chrono Speed
Type
: Float
How much chronotensity should affect the frame continuation of the decal. Good starting values are 5 - 30
. Combines well with FPS being set to 0
.