Writing a procedural texture for Maya: some preliminary questions


Hi! I made another thread in the Maya Rendering board recently (and I’d like to delete it, but I don’t know how, so sorry for the clogging), but I’ve abandoned that one because I think I have a better idea for what might help me.

Some background as briefly as I can summarize: I like the way characters’ mouths are animated in VeggieTales. I want to figure out how to do something similar in Maya. There was another thread YEARS ago on this forum about the same thing, but it looks like the mystery was never fully solved before that thread was locked. But someone who apparently worked on VT left this clue:

Full disclosure: I don’t know anything about anything except the basics of character modeling and animation. I have the most entry-level intro-101 grasp on Python and C++. So I spent a lot of time puzzling over this and reading some scattered information about GLSL and geometric modelling principles (y’know, the math behind it), and I think maybe I have an idea.

My layman’s understanding is that maybe, a custom procedural texture plugged into a material’s transparency attribute would work as a way to control the shape of a VT-like mouth on a character.

The texture, I’m thinking, would consist of a filled-in, closed-path composite bezier curve/bezigon drawn in UV space, drawn between 6 vertices, let’s say 2 control points for each curve. (Mockups done in 2D image editing software.)
The UV coords of each vertex and each control point would be tweakable attributes in Maya, so that you can use those to control the shape in Maya. (Figuring out a nice way to control that in Maya besides just typing in numerical values isn’t something I’m worried about right now, though.)

I know Maya’s support for procedural textures besides the ones included on install is VERY limited. As far as I’m aware, the only ways to bring one in would be to either make it part of a GLSL shader, or maybe (?) figure out how to write one in Python or MEL…? If there’s even support for that…?

This is probably a lot and there are probably a lot of steps to this, so I don’t expect anyone to come and hold my hand through the whole thing.
I guess my question here is what would be the smarter option for how to do this: write it into a GLSL shader, or write the texture (without being part of a whole shader) in something else like Python or MEL (if that’s even doable)?

(Some resources for doing this kind of thing in whichever language would be best to use might also be helpful…)