Having got into Shader Graph as part of a recent job role I had an idea to animate a static mesh of some playing cards with a shader using vertex colours as a method to mask out each element/card in the mesh and individually change their texture and movement as part of some elaborate shader.
In short vertex colours painted in the alpha channel are masked for each of the 5 cards, these are then used to mask Lerps for both the flipbook textures and the vertex offset animations, flipbook textures are added to with floats to change the suit on each card, if the float is above a certain number (representing the end of the red cards) then the back face is set to use a blue card back for black suits and a red card back for red suits.
There's also a part where the cards will change suit just as the cards flip around so the change should not be seen by the player.
Vertex animations are set so the vertical and Y axis rotation are done before the final Z axis rotation to "fan out" the cards, it's all mostly a sinewave being clamped at certain values and adding into position values for translation and rotation. I think there's better ways of controling sinewaves though for more flexible control.
It's not visually stunning at all but the idea was to learn more about using flipbooks, vertex colours and vertex animation inside of shaders to animate a static mesh with no need for skeletons and animations or multiple draw calls for meshes.
The final animation. There's a bit going on but each card is masked by it's 0>255 vertex alpha colour painted in 3Ds Max, flipbook texture assigned/offset by parameters, animated to move up, rotate and change suit and then reverse again.
Simple visual showing how the Vertex Colour Alpha is used to mask each card.
A fun part of the vertex animation was adding a world position Y value to the animation, this would add the stretch and twist to the cards, adding the vertex colours on top of this would offset the animations for each card also.
A short video showing the rotation offset parameters to fan out the cards.