Previous Post

Flag showcase - Developer Showcase

Next Post
Flag showcase - Developer Showcase
1 / 3
DESCRIPTION

A developer deep dive into the specifics of how the Flag for the surface zone works, by Mora!

The flag animation uses a technic called VAT (Vertex Animation Textures).

It allows you to bake animation as a set of textures containing position and rotation (one tex for each) Textures are simply RGB channels, containing red green and blue. The best part is we can store data in each pixel and each channel.

The VAT tech consists to write in a picture one row of pixels per frame from the mesh. (meaning if you have 100 frames of animation, your texture will have a height of 100 pixels. This flag has 551 points, so the width will contain 551 pixels.

100 x 551 is pretty cheap in terms of weight, and can contain the complete animation, and can be interpolated if we want to slow down or speed up its animation.

This gives the following texture, unreadable for us:

About the color, that's pretty simple : Red = X axis / Green = Y axis / Blue = Z axis.

That way, you can store the amount of translate for each point at each frame.

What if we have negative values? Good news, we use the EXR format, not jpg or png. EXR is able to store large ranges of values, negative ones included. This is a pretty common format for CGI.

Same process for rotation.

In Unity we just import it in a dedicated shader, then we apply basic shading and voilà. This process can be applied for destructions, soft bodies, many ways to experiment and have fun baking long and heavy simulations into a bunch of small textures, gameready.

HubertMoszka PATREON 7 favs
VIEWS1
FILES3 files
POSTEDFeb 5, 2026
ARCHIVEDFeb 5, 2026