View Full Version : Color a face depending on an expression.
Is it possible to color each face of a poly object depending on an expression that relates the the size of the face, all in 1 shader?
Also id need this to be updated realtime in the viewport as apposed to at rendertime.
Possible ?
|
|
Nicool
10-01-2003, 05:00 PM
Here are the main points of my solution in MEL :
1° Create #number of shaders (as a ramp)
_ A red one
_ A yellow second
_ ...
_ And the last one : blue
2° Create a loop : For each face of the mesh
_check the size of the face (the fucntion exists in the doc)
_attribute to this face the nearest shader (function to the size) a < x < b
End loop
Notes :
-For the task "all in 1shader" you can try to create a map applyed to the object...
-To create the # shaders at the beginning, you can create a loop too to have less work :)
Reply me thanks :beer:
Nicool
10-02-2003, 09:38 AM
Try to work with the flag -a of the polyEvaluate function. Did you try my method?
Hey Nicool, just saw your reply. Thanks for the suggestions ill look at them now.
CGTalk Moderation
01-14-2006, 03:00 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.