BLOG

articles

MY_SkinImage

EasyDNNNews

20 Jun 2017

Maya Tip: Check your Silhouette

Maya Tip: Check your Silhouette

Author:  Stephen   Categories:  Tutorials, Tools and Scripts  

Have you ever been told to "check your silhouette"? Here's a quick script you can setup in Maya to help you do just that!

 

Fun with Materials!

So this is kind of a weird little hack to give the illusion of a silhouette. Essentially, we are going to tell Maya to do 2 really simple things:

1) Check the "Use default material" option in the Viewport Shading menu
2) Change the default lambert material to black

When we assign a bit of code to a hotkey in Maya, we can turn this effect on and off, like this:

Maya silhouette hotkey

 

 

If you want, you can also scrub the timeline or playblast your animation in silhouette mode, which is kind of cool to see:

Maya silhouette animation

 

Get to the code already!

Okay, enough fancy gifs. The following is the MEL code you need to apply to your hotkey. Hope it helps!

 

string $panel = `getPanel -wf`;

string $checkLights = `modelEditor -q -dl $panel`;

if ($checkLights != "none"){

modelEditor -e -dl none $panel;

modelEditor -e -udm true $panel;

setAttr "lambert1.color" 0 0 0;}

else {

modelEditor -e -dl "default" $panel;

modelEditor -e -udm false $panel;

setAttr "lambert1.color" 0.5 0.5 0.5;}


---

Photo Credit: conskeptical Flickr via Compfight cc

Number of views (1609)  Comments (0)

Print

    Please login or register to post comments.