CGTalk > Software Specific Forums > Autodesk Maya
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 11-15-2012, 06:18 PM   #1
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,820
Set different shading to the two sides of a mesh

Hi,

Is it possible to set different shading for each of the mesh sides? For example take a plane. Each face has two sides, and I want one color for the inside of the mesh and a different color for the outside of the mesh. The inside and outside are determined by the face normals.

Thanks
 
Old 11-15-2012, 06:33 PM   #2
animatedfox
what the ?!?!
 
animatedfox's Avatar
portfolio
Benjamin Fox
Seat 43
USA
 
Join Date: Feb 2010
Posts: 895
Boy, can't wait to see where this thread goes!
Here is the first of many places to check:
http://download.autodesk.com/global...mber=d30e541708

There are a few ways to do this as well...mental ray has a two sided surface node. Google "maya two sided shader" and you will get all the info you need.
Good luck!
 
Old 11-15-2012, 07:36 PM   #3
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,820
Ho, my search string was that lame...

A basic test with mib_twosided for mr worked, but the color looks different than assigning one of the side shaders directly. Also I wonder if the tricks to view the mr shader in the viewport would apply here.

I wasn't successful with the sw renderer method:

http://svn.code.sf.net/p/mymayaplug..._shader_test.ma
 
Old 11-15-2012, 08:47 PM   #4
royg
---
Roy
City, Afghanistan
 
Join Date: Nov 2007
Posts: 539
Additionally to the link Fox posted, you can plug the flippedNormal attr of a samplerInfo directly into the blender attr of a mixColors node if you're only interested in colour, i.e. not different shaders on each side.

Last edited by royg : 11-15-2012 at 09:49 PM.
 
Old 11-15-2012, 08:48 PM   #5
mlager8
Lord of the posts
 
mlager8's Avatar
portfolio
Matthew Lager
3D artist
Oceanside, USA
 
Join Date: Nov 2008
Posts: 875
__________________

 
Old 11-15-2012, 10:09 PM   #6
zaskar
Expert
portfolio
franky****inFourFingaz
-
Dresden, Germany
 
Join Date: Dec 2010
Posts: 321
If you use mr and a mia_material_x make sure that the option box hidden in "advanced reflection->Skip reflections on inside" is unchecked. Its per default NOT and makes certainly 99 percent of the mr people crazy one time.
 
Old 11-18-2012, 09:40 AM   #7
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,820
Thanks for the tips. Can someone please take a look at my example scene and see what I missed?
 
Old 11-18-2012, 04:48 PM   #8
zaskar
Expert
portfolio
franky****inFourFingaz
-
Dresden, Germany
 
Join Date: Dec 2010
Posts: 321
The way you connected the sampler info to the condition will always return "equal", regardless which side of the plane the camera sees.
 
Old 11-18-2012, 05:48 PM   #9
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,820
Ho, I connected to both terms instead on one.
Thanks
 
Old 11-18-2012, 05:48 PM   #10
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:09 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.