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.

2 Likes

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.

Hi, I just see a tutorial on how to do de place2dTexture, but my question is, if I do the animation in maya using the place2dTextures, they will automaticaly appear in unreal?, or do you did something special to make sure that unreal is offseting things correctly

To my knowledge as of ue4 4.27 unreal does not have an automated way to import this 1:1.

What is your goal for the placement animation in unreal?

If you want something to scroll at a given speed, a custom material with a panner node may get you what you need. Here’s the ue4 documentation on that process

If you are trying to use key driven data, for very specific animation timings. There’s a slightly more involved process to setting that up. I’m not finding a tutorial this morning well that covers those steps.

An overview of that process: You have to build a material that will behave like your maya material will in ue4 (similar as above, but likely different behavior, so different node setup). For instance: If you are animating translation, you can mimic that with adding a value to the U and V of the texture coordinate going into a material. Scale and rotation are trickier.

And then you have to add custom attribute tracks in maya to the root node of your skeleton that you also pump your keyframe curves into, and post importing in the animation settings there’s a switch to move those animation tracks from blendshapes to the material domain.

If you’ve got your custom parameters in your material named the same, and of the correct type, unreal will connect the animation clip data and broadcast those curves into your material for you.

-Feel free to ask more questions about the different parts of the process, my replies may be slow I’m not on a regular internet access schedule for a few weeks.

1 Like

Thank you so much! I would try everything on your post, thanks for answering!