PDA

View Full Version : Texture for a face


Mrguy
05-02-2009, 01:31 AM
So I'm working on a character and one of the things that I want to do is have his face (eyes and mouth) be a texture so all face expressions are represented with a designated texture.

I've been giving it some thought and I have no idea how to do this. lol

One thought might be a layered shader and when a numerical value is changed in the channel box, then the certain layer would change and turn on and off. Although this is just me thinking and I have yet to test it. I'm also going to be bringing this into a game engine.

If anyone can help or point me in the right direction on how to achieve this in maya, I would be extremely grateful!

Thanks in advance.

ytse77
05-02-2009, 05:32 PM
Hi there. You could do the following:

1. save your face expressions out as an image sequence. For example if there are 20 of them save them out as faceExpression.0001.iff - ... - faceExpression.0020.iff. The same way you would a regular image sequence that you would want to use inside of Maya.

2. Create a new material. Assign faceExpression.0001.iff to the color value. Check the "Use Image Sequence" under the file node atributes.

Maya automatically creates an expression which equals the frame extension of your texture to the actual frame number. So when you scrub the timeline you will see your texture change depending on what frame you are at. You wanna be able to control this yourself and be able to animate as needed by creating an attribute which will drive the frame extension of your file node.

3. Select your character and go to Modify -> add attribute... Under long name just type a name such as face (or what ever you prefer). Set data type to integer (since the image sequence has no decimal values). Set the minimum to 1 and the maximum to 20 (or which ever is the highest number on the file sequence). Set default to 1. Click add and close the window.

4. Open the expression editor. Look for an expression that says something like "file1.frameExtension=frame;" (without the quotes). Change this expression to: file1.frameExtension=character.face; (This is assuming that the object to which you added the new attribute is called "character" and that said attribute is called "face")

5. Select your character which should now have a new attribute in the channel box called face. Change the values on face and this should change the textures being displayed. To animate just keyframe as needed.


I'm sure there are other ways to do this. If you have lots of expressions you might want to print out a sort of face catalogue or something to make animating easier.

Hope this helps. Good luck!

Roberto

CGTalk Moderation
05-02-2009, 05:32 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.