Maya Viewport 2.0 Setup

In this tutorial you can learn how to set up 3-point lighting, texturing basics, and how to tweak Viewport 2.0 – Maya’s built in realtime renderer. Along the way you will find some useful tips how to set up a project and organize objects in the Outliner.

2017_Viewport2Result

I used the free plant model “Dandelion” from xfrog.com, the HDR panorama “05-16_Day_C” from noemotionhdrs.net and a photo-scanned low-poly ground model which you can download here. Since the most important aspects are light and Viewport settings any other model and texture can be used to follow this tutorial.

Set up a new project with -> File -> Project Window. Click “New”, type in a name in “Current Project” and change the Location if appropriate. As soon as you hit “Accept” Maya automatically creates a set of folders on your drive.

2017_projectwindow

Copy the downloaded files to the sourceimages directory on your Windows desktop. Back in Maya go to -> File -> Save Scene As … type a name and save the file to the “scenes” directory. The idea behind the Project folder is, that every asset associated with the scene like texture maps, renderings, etc. are stored in one place. If you or someone else want to work with this project on another computer then you just copy the complete Project folder containing sourceimages, scenes, etc. to the new place. To switch the project in Maya choose -> File -> Set Project, navigate to the Project folder you want to work with and hit “Set”.

2017_SaveAs

Now -> File -> Import the Maya file “GC17_3.mb”. The plant should approximately cover the base grid. It consists of 24 lines in x and z direction with a distance of 1 cm (default units are centimeters). 24 x 24 cm is a good size for this plant. The scaling can be changed anytime, but for lighting, simulation or when you want to exchange models within a team it is recommended to work with the proper measures right from the start. If you prefer a clean workspace you can go to -> Display and uncheck -> Grid.

2017_ImportedDefault

The dandelion model already comes with textures and alpha masks. Let’s make them visible. In the Viewport select -> Shading -> Hardware Texturing or switch on the tiny checkerboard icon. You can also use the “6” and “5” key to switch texturing on and off.

2017_HardwareTexturing

When you zoom in to inspect the leaves you can seem that the texture is only visible on one side.

2017_HardwareTexturingBlackN

Open -> Windows -> Outliner and select the geometry, then -> Display -> Normals to make their direction visible. Without lights in the scene only outward facing Normals will be shaded (as long as the Ambient Color of the material is black).

2017_HardwareTexturingNormalsN

Select -> Display -> Normals again to hide them. Switch on the light bulb icon above the Viewport or select -> Lighting -> Use All Light. Since there are no lights in the scene, everything becomes black. You can also use the “7” and “6” key to switch the light on and off.

2017_LightsOnN

Let’s start with -> Create -> Lights -> Ambient Light. It evenly illuminates all surfaces without shadows. Not quite realistic but we will use it later to globally brighten the shadows. Changing it’s position has no influence, you can leave it as it is.

2017_AmbientLight

To bring in shadows we need a ground object first. Go to -> File -> Import … and select the downloaded “BeachRocks.obj” from the sourceimages folder. A Material with the scanned texture will be automatically created, just change the Ambient Color to black in the Attribute Editor. Move around the plant on the ground to find a nice spot. To center the view select the plant and hit the “F” key, then adjust your viewing angle. In the Viewport select -> View -> Create Camera from View.

2017_GroundImport

Let’s start the Three-Point Lighting with a black scene. Select the ambient light in the Outliner and hit the “H” key to hide it for now. We begin with the the Key Light, it represents the dominant light source, such as the sun, a window, or ceiling light. Select -> Create -> Lights -> Directional Light. The Key light should be rotated 15-45 degrees above (seen from side view) and 15-45 degrees beside (seen from top view) to the camera’s viewing axis (changing it’s position has no effect). Switch on the Shadows icon above the Viewport or make a tick at -> Lighting -> Shadows. The Key Light defines the most visible lighting and shadows in the scene. In the Attribute Editor increase the Intensity accordingly. Also switch on “Use Depth Map Shadows”, maximize the Resolution and change the Filter Size to 20 to improve the shadow quality. You will notice that the shadow does not match the blossom. By default Viewport 2.0 works with OpenGl which does not consider Alpha masks in materials. On Windows computers it is possible to switch to DirectX for even better shading effects. That requires different shader set up with the Hypershade editor, which will be covered in a different tutorial.

2017_directionallight

To soften and extend the illumination provided by the key light and to make more of the subject visible, we add a Fill Light. It can simulate light scattered from the sky (other than the sun), secondary light sources such as table lamps, or reflected and bounced light. If necessary, you may add several of them to a scene. Hide all lights in the Outliner with “H” and -> Create -> Lights -> Spot Light. Seen from the top view, the Fill Light should come from a generally opposite angle than the Key Light – to fill it’s shadows. It can be raised to the subject’s height, but should be lower than the Key Light. The intensity of the Fill Light should be less than 50% of the Key Light. Since the Intensity of the Key Light is already 2.5 we can leave it at 1. Tick here also “Use Depth Map Shadows”, maximize the Resolution and change the Filter Size to 20 to improve the shadow quality. Changing the color of the Fill Light makes the scene look a little bit more interesting.

2017_FillLight

To highlight the edge of the objects and to help visually separate them from the background let’s add the Rim Light or Back Light. Place a Spot Light behind your subject, opposite from the camera. Tick here also “Use Depth Map Shadows”, maximize the Resolution and change the Filter Size to 20 to improve the shadow quality. To add some variation I changed the color to a colder tone.

2017_BackLight

Now the Three-Point Lighting set is complete. Switch on Key, Fill and Back Light in the Outliner. Let’s clean up the Outliner a bit. Rename the lights according to their function and -> Create -> Empty Group. MMB drag the Lights into it, create another Null for the Cameras. To avoid endless lists in the Outliner you can now collapse the groups of scene elements which are not needed. To hide the Groups in the Outliner you can select -> Show -> Objects -> Sets and -> Invert Shown.

2017_outlinerhidesets    2017_outlinergroups

To make the material of the plant appear a little bit more lightweight, increase the Translucence value slightly.

2017_translucence

The shadows in some parts are quite dark unlike in reality where mostly diffuse light is around. By using the Ambient Light with a very low intensity we can fake that effect here.

2017_ambientadjust

The ground texture looks a bit overexposed compared to the plant, so let’s adjust that. Select the object and in the Attribute Editor klick on the Input icon next to the Color slider. You will be directed to the Texture attributes where you can change the Exposure.

2017_croundcolorlink   2017_groundexposure

For the sky background create a sphere with a radius of 250 cm to encloses the ground texture. It should be not bigger, otherwise the quality of the shadows might become too poor (the anti aliasing subdivision of the lights is calculated relative to the dimension of the whole scene). With the sphere selected RMB -> Assign New Material ->Maya -> Surface -> Lambert. Click on the checkerboard icon next to the Color slider.

2017_assignlambert   2017_assignbgtexture

The “Create Render Node” Windows pops up. Select -> 2D Textures -> File. In the Attribute Editor click on the little folder icon to link with the downloaded HDR image.

2017_assignbgtexturefile   2017_assignbgtexturesourceimage