Thursday, May 19, 2011

"Splash Machine" (Part 4 of 4)

My internship is wrapping up so I decided to finish the most complicated scene while I still have the chance. Enjoy!



See Part 01 here

Friday, May 6, 2011

Optimizing your Shaders

Want to reduce the number of shop nodes you have in your Material Palette?

Let's say you're not really doing anything fancy with your material shaders.  All you want is a bunch of colors. However you need them to have the same properties (reflect, diffuse intensity, etc.)

Take a cornell box for instance: I just want a white box, with a red and blue wall on either side.

First add and assign a white Mantra Surface shader
Inside the Room node group the red and blue walls individually.
In the material node.  You can assign the material based on the group name, and have multiple materials on the one material node.

To use only one mantra surface for the Room, localize the parameter you need by using the overrides.  In the above case only the BaseColor parameter was altered.  So if you were to change specularity on the mantra surface node it will still affect the red and blue walls.

* Keep in mind if you use this method you will not see the local variables in the viewport (only when you render)

Working with the Viewport when lighting

There's a few viewport buttons that are very handy when trying to light your scene.

  • Let's say you have an area light like I have above, by default the viewport will show you what the lights are doing.  
  • If you don't want to see these lights in the viewport (b/c sometimes it could start getting really bright/dark depending on the number of lights you have) you can hit the Headlight button (top right img).
  • If you want to see in your viewport a closer image to what will be rendered hit the High Quality Light button (bottom left).
  • If you want shadows in your viewport hit the Shadow button (bottom right).  This can be used in conjunction with the High Quality Light or default light options.

Want to see what your render will look like?

There are two ways to do this in the viewport:

Render View
  • Render view is a great way to quickly see what you are doing.  It's a very similar interface to MPlay, only this is a live interactive photorealistic render (IPR). 


I've done a split pane so i can see both.
I've already laid down a mantra node in the above example.  If you do this without one you will see out/mantraipr and an mantraipr node will be placed in your out network.

Render Region

  • This can be done in both the scene view and render view.
Want to know why my wall colors are not showing in my scene view? click here

In Scene View (top img)
  • Click on the Render Region button to the left of the viewport and click and drag an area in the viewport you want to see rendered.  This marque follows the viewport and not the objects. 
  • To deselect click the camera button above it.
In Render View (bottom img)
  • Shift+Click&Drag or Shift+Click to select the region you want rendered.
  • To deselect Shift+Click outside the render (black region)
Want to move your camera and lights based on your viewport? Lock it! ....but how?

Lock Camera (top img)
  • Click the Lock Camera button to change the position of the camera based on the viewport movement.
Look Through Light (bottom img)
  • Click on the yellow camera name in the top right corner to open up drop down menu. Then you can choose other cameras to look through or look through a light.  This can also be locked so you can move your light around based on what you see in the viewport.

Wednesday, May 4, 2011