CREATING A TWO SIDED MATERIAL IN MAYA · Most other 3D applications offer a 2-sided material out of...

6
Copyright 2004 – Arno Kroner – All Rights Reserved 1 CREATING A TWO SIDED MATERIAL IN MAYA Auth: Arno Kroner - Date: 09/21/04 - Level: Beginner - Scene File: http://www.arnokroner.com/education/maya/foundation/two_sided Most other 3D applications offer a 2-sided material out of the box but Maya doesn’t. Here is how to build a shading network that will allow you to display a different material on each side of an object (NURBS or Polygon it doesn’t matter) 1. Create a NURBS sphere and reduce it’s sweep to 180 so you can see both sides of the surface. 2. Open the Hypershade (Window > Rendering > Hypershade) and create a new Blinn material as well as 2 textures (say, a checker texture and a grid texture with different colors). Arrange all those nodes in the work space of the Hypershade like below:

Transcript of CREATING A TWO SIDED MATERIAL IN MAYA · Most other 3D applications offer a 2-sided material out of...

Page 1: CREATING A TWO SIDED MATERIAL IN MAYA · Most other 3D applications offer a 2-sided material out of the box but Maya doesn’t. Here is how to build a shading network that will allow

Copyright 2004 – Arno Kroner – All Rights Reserved 1

CREATING A TWO SIDED MATERIAL IN MAYA

Auth: Arno Kroner - Date: 09/21/04 - Level: Beginner - Scene File: http://www.arnokroner.com/education/maya/foundation/two_sided Most other 3D applications offer a 2-sided material out of the box but Maya doesn’t. Here is how to build a shading network that will allow you to display a different material on each side of an object (NURBS or Polygon it doesn’t matter)

1. Create a NURBS sphere and reduce it’s sweep to 180 so you can see both sides of the surface.

2. Open the Hypershade (Window > Rendering > Hypershade) and create a new Blinn material as well as 2 textures (say, a checker texture and a grid texture with different colors). Arrange all those nodes in the work space of the Hypershade like below:

Page 2: CREATING A TWO SIDED MATERIAL IN MAYA · Most other 3D applications offer a 2-sided material out of the box but Maya doesn’t. Here is how to build a shading network that will allow

Copyright 2004 – Arno Kroner – All Rights Reserved 2

3. What is the difference between the inside of the object and the outside of the object? What does the software use an indicator of inside versus outside? Choose Display > NURBS Components > Normals (Shaded Mode). See how the sphere has segments that stick outward from the surface now. A normal is an imaginary line drawn from the center of a polygon (or other geometry object) at right angle to the surface.

Page 3: CREATING A TWO SIDED MATERIAL IN MAYA · Most other 3D applications offer a 2-sided material out of the box but Maya doesn’t. Here is how to build a shading network that will allow

Copyright 2004 – Arno Kroner – All Rights Reserved 3

4. Normals are the component we are going to test in our shading network to determine if it’s the inside surface or the outside surface we are dealing with and consequently which texture to apply. It would go something like this:

IF THE NORMAL POINTS AWAY FROM THE SURFACE APPLY TEXTURE #1 IF NOT APPLY TEXTURE #2

5. In the Hypershade window, open the list of Utilities on the left and choose

SamplerInfo. Next, click on Condition and your Hypershade work area should look like this:

Page 4: CREATING A TWO SIDED MATERIAL IN MAYA · Most other 3D applications offer a 2-sided material out of the box but Maya doesn’t. Here is how to build a shading network that will allow

Copyright 2004 – Arno Kroner – All Rights Reserved 4

6. Now, MMB drag the SamplerInfo node to the Condition node and when you see the drop-down menu as below choose Other

7. The Connection Editor will open and you should select Flipped Normals on the left column and First Term on the right. This tells Maya how to test the direction the normals are pointing to.

Page 5: CREATING A TWO SIDED MATERIAL IN MAYA · Most other 3D applications offer a 2-sided material out of the box but Maya doesn’t. Here is how to build a shading network that will allow

Copyright 2004 – Arno Kroner – All Rights Reserved 5

8. Next you should MMB drag one texture node on the Condition node and choose color_ifTrue and do the same with the other texture node choosing color_ifFalse

Page 6: CREATING A TWO SIDED MATERIAL IN MAYA · Most other 3D applications offer a 2-sided material out of the box but Maya doesn’t. Here is how to build a shading network that will allow

Copyright 2004 – Arno Kroner – All Rights Reserved 6

9. Last step is to MMB drag the Condition node on top of the Blinn material node you created and choose Color. Your shading network should look like this:

10. Apply the blinn material to the half sphere. In your view panel the same texture

seems to be on both sides of the object. Render the picture and you’ll see that a different material appears on each side.

11. Now what it the textures are inverted? Delete the connections between the Condition node and the textures and assign the textures to color_ifFalse or color_ifTrue (true if it was false before and vice-versa)

12. Et voila! You have learned how to apply a different texture to different sides of an

object and you have been introduced to the powerful Utility nodes in Maya.