PDA

View Full Version : Mask one object w/another?


EightBit
05-07-2009, 04:22 AM
Is there a way to mask one object w/another?
I'm rendering some heart stents (like a cylinder made of chain-link fence).
Because of all the details, the images are hard to read, so I like to put a semi-transparent plane down the middle of the cylinder to darken the back side and give it some depth. But of course the plane darkens everything behind the stent as well. What would be great would be to limit the rendering of the plane by the alpha of the stent, but still have it only darken the inside.
Is there a way to setup a shading node to pull this off? Or another approach?
Thanks.

ytse77
05-07-2009, 04:40 AM
There's probably other ways to do this but you could use a double sided shader to shade the inside of the cylinder differently from the the outside. Like using a darker version of your texture for the inside. If I understood correctly this would give you the effect you are looking for. The maya help file has info on using the condition node and sampler info node to achieve this. Just search for "double-sided". Yeah typing "double sided" without the dash between the words wont give you the correct search results. :curious:

Good Luck!

CGTalk Moderation
05-07-2009, 04:40 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.