Set different shading to the two sides of a mesh

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 11 November 2012   #1
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 November 2012   #2
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 November 2012   #3
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 November 2012   #4
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 November 2012 at 09:49 PM.
 
Old 11 November 2012   #5
http://cs.uwindsor.ca/~imran/course...de_material.pdf
__________________

 
Old 11 November 2012   #6
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 November 2012   #7
Thanks for the tips. Can someone please take a look at my example scene and see what I missed?
 
Old 11 November 2012   #8
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 November 2012   #9
Ho, I connected to both terms instead on one.
Thanks
 
Old 11 November 2012   #10
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



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 06:52 PM.


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