I have some meshes that I’d to add UV animations to. It would be really useful for doing things like animating flowing water or lights that flash in complex patterns (or even short frame based animations). Does glTF support this?
Not easily at the moment. The glTF format allows any vertex attribute (including UVs) to be manipulated by morph targets. But in practice most tools only support morph targets on positions, normals, and maybe vertex tangents or colors.
There is a proposal for more direct ways of animating properties including UV offsets —
- Specification PR: KhronosGroup/glTF#2147
- Sample Models PR: KhronosGroup/glTF-Sample-Models#353
A few tools (Babylon.js, Gestaltor, maybe others?) have started experimental implementations of that specification.
I would do this in your engine by adding an offset property in your materials that changes with time, and use a 3D texture for animation sequences. Moving the W axis will animate the texture. That’s going to be a lot lighter and simpler than constantly updating your texcoord array.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.