Animation Texture Channel Packer

by Christopher King

Table Of Contents

A tool to help create channel packed textures for use in shader animation

Building upon my last blog post , I want to take the textures that I generated previously and create an effect that would look like blood flowing out from the center. This scene from Hellboy is exactly what I'm going for: A simple solution to get the make the image appear radially would be to use the pixel's distance from the center of the image in the fragment shader. But by doing this, it would be impossible to gradually render an arc that is equidistant from the center like we see in the video above. So what I really want to do is precalculate a breadth first search on the image from an arbitrary starting position using a heuristic where the cost is the inverse of the image's alpha. Put more simply, I want to select a spot on the image from where the liquid will flow out from, and I want to prioritize flowing to opaque areas of the image before filling transparent areas.
1048576 total unique positions for a 1024px by 1024px image, and with 24 bits of precision we get a max value of 16,777,216. So that is plenty of space

Tool

Generation Settings
The height / width in pixels Maximum Frame: 0
The height / width in pixels Start Frame: 0
The value used in the noise functions to get deterministic numbers
The value used in the noise functions to get deterministic numbers
The value used in the noise functions to get deterministic numbers Transparency Penalty:
The value used in the noise functions to get deterministic numbers
Export Settings

Generated under CC-BY-NC 4.0
For commercial use: CLICK HERE

The height / width in pixels Rendered Color:
The value used in the noise functions to get deterministic numbers Frames Per Second:
The value used in the noise functions to get deterministic numbers Duration (seconds):

Explanation