Animate texture in Maya?

Hey guys, first time posting here.

So I’ve been tasked to rig a character with textured anime-ish eye and because the geometry is not exactly a sphere, we decided to tackle it by having controls connected to the texture.

So this is what I did:
I connected object translation to place2dtexture node’s translate U/V attribute with SDKs, and it works fine. But the challenge now is, client wants it to be scalable, and I can’t think of any ways to do it.

Now I have a solution in mind, which is utilizing polyPlanarProj’s attribute to re-rigged the texture. But that would mean rebuilding the eyes from scratch, since the current geometry I have got its history wiped clean.

Is there any other better way to tackle this challenge?

Depending what your final destination is this may or may not work. I had to do this for Spyro’s eyes on the Reignited trilogy. Along your current solutions track…

The repeat UV on the place2dTexture node can be used like scale. Just repeat less to scale up, and more to scale down. Disable wrapU and V on the texture also in the place2dTexture node, and you won’t get extra eyes. You’ll also require an offset to get the center correct. (probably a multiply to so the motions easy to control)

I used extra UV sets to align to “my pupil” textures, so they could be centered and the math be made easier.

You’ll have to solve the background color if you are going to stay in maya. Since I was outputting this behavior to unreal, I didn’t have to tackle that. I’d probably try some sort of layered texture to solve the bg grey if still in Maya.

I used this method because I needed to duplicate the same math in a material node in unreal, and I didn’t have access to other maya trickery.

If heading to a game engine, the center of your pupil texture/uv’s will matter for the offset math. Maya’s like 0-1? Direct X is .5 based. (if I remember, been a year)

Edit - Multiple old school solutions if this is for a 3d render, is to make a spherical eye, and use a lattice to get the non-spherical shape at the end of the deformation stack.

Or to make a projection style material, rig up the projections history to look back at your eyeballs.

1 Like

Thanks man, I ended up using repeatUV method but it was really hard to offset the texture.

hi, same predicament here, I need to translate and scale a pupil on a plane via the texture. I’ve managed to reverse engineer that (1-texture scale)*0.5 moves the scaling pivot to the center of the UV quadrant, but that does not help when I want to translate/ offset the texture, since the scaling pivot needs to move with the offset and I presume the scaling needs to be adjusted constantly based on the offset. However, I am not getting the math. How did you control the offset?

This has to go into Unity so I think I can only use either Maya coverage and translate frame from the 2Dplacement node or repeat UV and offset UV from the same node. If I could use the 4 channels I think I’d be able to pull it off, but I’ve noticed Unity only has offset and tiling and nothing else. Also, I know how to transfer the values to Unity (I think).

Any pointer is welcome, I banged my head against this for a few days now.