Introduction
Hereβs a small R&D project made in collaboration with Pascal Beeckmans. We wanted to find a way to have voxel animations in Unity with lightweight textures.
Voxel Animation Textures
The idea is to export a point cloud (.abc) from Houdini that contains all the points from the simulation (its bouding box, basically). Then a texture that contains the state of every cell of the simulation for each frame, and another one to store arbitrary data. In this case we used it to store the temperature of the simulation, so we can color the voxels in engine.
In Unity we used the Alembic package to import the point cloud. It already comes with a setup to draw any mesh instantiated on each point, using DrawMeshInstancedIndirect. Then in the shader we read the texture using the SV_InstanceID to isolate individual instances and collapse the vertices of the voxels according to their state at the specified frame.