Hi. I was reading the material expressions guide but I couldn’t find something that can help me on the following setup:
GENERAL IDEA: Rotate the head bone of a character and offset the UV map texture for the face.
CONDITION: Every 15° rotation the UV offset “SNAPS” to its following coordinate offset.
The UV map is a 2560 x 512 pixels wide picture (512x5 in X).
From 0 to 15° head bone rotation, the UV coordinate stays in its origin. If the bone goes beyond 15°, the uv coordinate will be offset in X by the 512 amount of the next position.
I did this quick screenshot so you can get the idea. Each “colored” region will be the offset to which the UV coordinate should be moved based on the angle of the head bone rotation of the character.
Is it possible to set an expression that reads the bone rotation in X, passes that value to the UV offset coordinate, conditions it to evaluate if it has passed a 15-degree rotation, and if it has, it will “snap” the UV coordinate immediately by (x-amount) offset value?
Yes, I looked at the flipbook and the panning node. But all I need to understand is how to pass the value from the bone Y (yaw) rotation to the shader UV coord to offset. I can use an “add” depending on the roll.
Also, if you read on my original post, the rotation angle is to be evaluated. Once it reaches an increase of 15º, it should “snap” the uv coord to a new value offset (generally 0.2 in a 4 UV image flipbook)
Now, how do I pass the value of the local Y rotation of the “head” bone from the 3rd person mannequin (Quinn) to a shader, so I can offset the UV coordinates by 0.5 every 15º head rotation?