Vertex shader animated polygon flip
I am trying to create a vertex shader-based animation that would flip each polygon of a (two sided) mesh. It should look similar to this, except with every polygon of the mesh, rather than just one plane:
In that example, I use the plane's pivot and the world X axis for the RotateAboutAxis node. But when it comes to a more complex mesh (a character, for instance), you need the center point of each polygon as the pivot, and a vector perpendicular to that polygon's normal direction as the rotation axis. I made several unsucessful attempts, and I am having trouble getting the rotation right.
Could you point me in the right direction? Or maybe you can think of a better approach to this effect?
You are on the right path, but you need something, to get pivot of the subject. As an example, you can encode that in your vertex colors or UVs.
answered Jun 23 '18 at 06:03 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here