View Full Version : cartoon texture switching
03-10-2006, 06:14 PM
I need to create a character where facial expressions are going to be switching textures. What I need to know is how I can set up a character so I can turn one texture off and replace it with another one.
So when the chacter is smiling I'll have a smile texture on it, and when the character is sad I'll have a simple frown texture on it.
I'm trying to use the condition node but so far I can only switch between 2 textures how could I increase this to incorporate a wider range of mouth expressions?
You can have a look at character on my blog
03-11-2006, 05:00 AM
i have attached the file, hav a luk at it ..its with a shader applied to the sphere and the control cirlce has attribute on it called EXP : smile, frown, angry, laugh
now i have a lambert shader whose color is fed with a ramp.. now i have four > 2d textures feeding into each of the color entries of the ramp ( the idea being that u can plug in as many as u want.. ) and now u keep driving the color entries of the ramp, based on the attribute u selected, through an expression..
you can view the expression and edit it, for each new entry u want.. just go through it, and i hope it is clear to get u an idea.. u can change it to make each of the 2d texture to show up .... now the order of my ramp is > checker (smile), fractal (frown), noise (angry) & grid (laugh).. so u can plugin ur own file textures of ur expressions ..into the ramp..
hope it helps.. n if u have any doubts, shoot, i'd be glad to help..
btw: this is just one way of doing, it. anybody,,.... if it can be done more simpler, i'd like to know..
edit: actually u can also have a single file texture node feeding into the color of the ur shader.....and setup the exp to just keep switching between ur texture node's input files..
using >> "AEassignTextureCB file1.fileTextureName "exp1.jpg" "image";" >> just keep changing the file name from exp1.jpg to exp2.jpg ... shud work also .....
03-11-2006, 05:21 AM
Or....you could use the tri switch node, which, I believe offers the same functionality....
On second thoughts, stick with the method Ashish told you. It's much more easier and straightforward.
03-17-2006, 12:47 PM
good one ashish,
i know two other methods that i used while working on a different project. I used layered texture and switched from one to another with expressions. this one worked for me
the other one i did is simply create 3 set or more of face for brows, eyes and mouth. now u can have ur texture files linked to each of them and use u and v translation to change the texture. now this one works good but makes the file quiet heavy. but it gives lotsa variations.
03-17-2006, 01:52 PM
I also have an approach to this: )
I created a series of mimic textures and numbered them like
and so on. Now you can use it as an image sequence on your file texture node
and animate the frameExtension attribute ( with stepepd interpolation ). I created a shelf with icons of my mouth shapes and commands to switch between them.
03-18-2006, 04:42 AM
hi sabusomu / Buexe,
gud to learn ur methods too.. lots of ideas !!
i agree.. that texture UV shift is a nice one !! and the image sequence thing is also gud.. but may be a bit heavy on the app... to load each image when ever change is fired ?
but may not be noticable.. and i've put up a page about that attribute and firing something based on its change.. etc......here > FmFA Method (dantuashish.tripod.com/Maya/FmFA.html) pls check and give me feedback..
03-18-2006, 04:42 AM
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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.