Arnold: Black Lightsource when using an high Exposure Value

While creating the lights for the generator room I ran into a very odd issue. The light source of my mesh Light suddenly started to render in black.

Apperantly this behavior happens when you use high Exposure values (20+) combined with a gigantic light source.

To avoid this issue you can disable “Normalize”. Normalize ensures that your light renders physically correct. When you disable it you will have to readjust your Exposure value.

Notes: Arvid Schneider – MtoA 111: Anisotropy – Cap’s Shield

Arvid Schneider is an awesome guy that creates extremely high quality tutorials. Check out his website and  Youtube Channel. He made a great tutorial on how to create Captain America’s shield, teaching a thing or two about anisotropy.

He covers a lot of topics in a very short time. I had some difficulties to follow a couple of his steps. So here is a rewrite of the tutorial with my personal preferred way of doing things. However definatly go check out the video, he describes the steps in much greater detail.

Part 1: Modeling the shield

I am going to be using a Poly Sphere to create the shield.

Step 1

Create a Poly Sphere. In faces mode select the lower part of the ball.

Step 2

(If you selected a little more than the half re-position the Pivot Point)

Scale the half-sphere down.

Step 3

RotateZ = 90

Step 4

Create a UV-Layout. The important thing is, since in the tutorial a lot of ramps with the circular attribute are going to be used that the center of the UVs are placed exactly in the middle.

The easiest way to get a perfect placement is to use “UV > Planar”, and Project from the X-Axis.

Part 2: Initial Render Setup

Step 1: Camera

  1. Create a Render_Cam (**Create > Camera > Camera**)
  2. **Panels > Look through Selected**
  3. **View > Camera Settings > Resolution Gate**
  4. Position the Camera

Initially I set up the camera just like in the tutorial with the shield slightly slanted. This setup has the benefit that you can clearly see the reflections.

For the final image I chose to re-position the camera for a more frontal view of the shield.

Step 2: Lighting

Arvid Schneider does not go into his lighting Setup, in essence he has a “Studio Lighting” and a “Outdoor Lighting” HDR setup.

I only used a basic Studio Lighting with the help of two Area Lights, (Exposure 12, and Exposure 17)

 

Part 3: The Shader

Arvid Schneider recommends to connect the newly created ramp into the diffuse color attribute, so you can immediately see the color output

 

Step 1: alShader

Create a new alShader “al_shield” and assign it to the shield.

Step 2: Base Colors + Star

In the Hypershade editor press Tab and create a new “ramp (texture)” (base_color), connect it directly to the diffuse color of the alShader.

Change the Type to “Circular Ramp” and the Interpolation to “None”

In the Attribute Editor adjust the colors of the gradient:

Use a reference image of the shield, and the Arnold Renderview to determine how wide the various segments of the gradient need to be.

To add the star, first google for a star image. (The star should be white, if not you should edit it in Photoshop)

In the Hypershade create a “aiCombineColor” Node, Change the Combine Op to add 1+2.

Connect the ramp “base_color” to input1 and “out color” to “al_shield” Diffuse Color. 
Create an aiImage Node, import the star and connect it to input 2.

Change Wrap U and Wrap V to file, to ensure that you only have a single star.

With Scale U and Scale V, you can make the star bigger or smaller (larger numbers make the star smaller, smaller numbers makes the star bigger)

Finally position the star using the Offset U and Offset V Attributes.

 

If everything is looking good, break the connection to the “diffuse color” and connect the aiCombineColor1 to the Specular 2 Edge Tint and to the Specular Color 2 Reflectivity.

Set the Strength of Reflectivity 2 to 1 and the Fresnel Mode to metallic.

Step 2 Complete

 

 

Step 3: Ansiotropic Map

The Ansiotropic Map is going to be used as a bumpmap, and should simulate the small ridges in the surface.

In the Hypershade create a “ramp (Texture)”, name it ramp1. (Make it Type Circular)

Open the Script Editor (python) and use following code to create a ramp with many many small ridges.

Additionally you could play around with the noise attributes of the ramp to create a more realistic look.

You can further enhance the difference between the different colors of the shield by combining this ramp with another ramp using an aiCombineColor Node.

Go to the “base_color” ramp, and save it as a preset, then create a new ramp with interpolation “Spike” and load the colors from the preset.

Then change all colors to black, and add white points left and right so you get a ramp looking like this:

Save your scene, while connecting the Map to the Bump Mapping Attribute, my system crashed a lot.

Finally create a “bump2D” Node, as Input use “Out Color R” and connect it to the “ai_shield” bump.

Step 3: Complete

 

Step 5: Specular 1 Ansiotropy Values

Create another ramp (texture) and create a gradient like this:

This texture drives the Specular 1 Ansiotropy Values. Simply connect it to the Attribute.

Step 6: Final Settings “ai_shield”

Base settings:

  • Diffuse Color Strength = 0
  • Specular 1 Strength = 0.25
  • Specular 2 Strength = 1

You should play around with the Roughness settings of Specular 1 and 2 to adjust the

Reducing Specular 2 Roughness, makes the shield shinier.

Playing around with Roughness values

Finally Arvid Schneider uses a noise map to drive the Specular 2 Strength setting, which would make the shield look dirty.

 

 

Maya 2016: Wireframe Rendering using Mental Ray

If you want to show off your awesome modelling skills, there is no better way then to show off the models wireframe. You could do a quick screenshot of your model in wireframe mode, but that looks cheap and not very impressive. It would be better to render the object using a render engine.

I will show you how you can make a clean, technical and awesome looking image using mental rays “contour” render option. To use this feature you have to activate it in the render settings and then apply a shader to the object. This way you can set up an environment that is rendered normally and your hero object is rendered as wireframe object.

You probably neither have seen or heard of this feature due to that this feature is only found in the “legacy mode” of Mental Ray and even then it is still hidden in the advanced settings.

Render Settings

  1. Set “Render Using” to “mental ray”
  2. Open the “Quality”-tab
  3. Enable “Show Advanced Settings
  4. Expand “Legacy Options“> Set Sampling Mode to “Legacy Sampling Mode”2015-06-15-20_09_42-Start
  5. Open the “Configuration”-tab
  6. Enable “Show Advanced Settings
  7. Expand “Contours” > Enable “Enable Contour Rendering”
  8. Expand the “Draw by Property Difference”-section > Enable “Around all Poly Faces”2015-06-15-19_59_19-Start

Material Settings

  1. First create a white Lambert material “mat_wireframe”
  2. Navigate to the Shading Group “lambert2SG”, and rename it to“mat_wireframeSG”
  3. Expand the mental ray section, and the subsection “Contours”
  4. Enable “Contour rendering”, and set the color to black.
  5. Apply the material to a test object (like a poly sphere) and do a render.
  6. If necessary adjust the value of the width (0.5 usually has nice results)MaterialSettings

Now apply the material to the objects that you would like to render as wireframe.

Note: if you render objects with “smooth mesh preview” enabled (By pressing the Key 3), mental ray renders a more complex wireframe. In such cases selecting the object and pressing the key 1 enables mental ray to render out the low poly version.

Lighting with IES Light Profiles

The IES (Illumination Engineering Society) standard format file stores information about the distribution of light from a real light source. Profiles are created by measuring light bulbs in the real world.

Now that sounds quite boring, wouldn’t the light profiles be exactly the same as a normal CG light? Well, it really depends on the physical attributes of the lightbulb. For example many halogen lightbulbs have small reflectors in them causing the light to have very characteristic hotsposts.

We are going to take a look at how to use these profiles with Mental Ray and Arnold.

Where to get IES Files?

Most of these profiles are available for free on the light manufacturers websites.

If you are not looking for a specific light you could also just use an IES files collection:

Alternative you could make your own (fake) profile using IES Creator.

Scene Setup

I will be using a simple scene with the trusted teapot and a simple floor and wall. The light needs to be positioned near the wall so we can see the hotspots.

Mental Ray

To utilize the IES Profile you need to use the “mia_photometric_light” node.

Maya Preparations

However by default the node ist very confusing and not intuitive. Thankfully you can download an optimized template: http://www.creativecrash.com/maya/downloads/scripts-plugins/interface-display/c/mia_photometric_light-ae-template

Simply download the files and copy them to ..\Documents\maya\scripts

Then restart Maya.

Mia_Photometric_light

  1. Create a spotlight and position it.
  2. Open the Attribute Editor and in the mental ray section create a new Light Shader > mia_photographic_light
  3. If you are using the template the process is quite straight forward.
    • Select Light Profile (Without Template: Distribution Mode = 2)
    • Select “Use Light Profile” (Without Template: Intensity Mode = 2)
    • Select your IES Profile (If no profile is defined the node acts like a pointlight)
    • (optional) Adjust Multiplier for correct Intensity2016-07-18 01_49_59-Edit Post ‹ Lost Triangle — WordPress.com.png

Note: Depending on the scale of your scene you have to  set “Maya Units to meter Scale” (when using cm as unit set it to 100)

Arnold

  1. Create a Arnold > Lights > Photometric Light
  2. Select your IES Profile
  3. (Increase Intensity, Samples)
Teapot for Shader Testing

The ultimate solution for testing shaders, it has hard edges, it has curvature, it is the one and only teapot you will need for all your shading purposes.

 

Download: teapot.zip

 

teapots

Mental Ray: Infinite White Background Lighting

We will be taking a look at how you can light your scene using the “infinite white background” look. This look is commonly used to present technical stuff or single objects.

In my example I am going to use a model of a dragon statue. First we will be taking a look at how to achieve the effect using only Final Gathering and after that we will take a look at using ambient occlusion as a light source.

Scene Setup

Step 1

Create a Poly Plane with a white lambert and import your object.

Step 2

Create a Camera. Set the Environment> Background Color to White

Camera Background Color Settings
Camera Background Color Settings

Step 2

For the Final Gather technique we will not use any lights. The default light would only cause unwanted side effects.

To disable the “default light”, open the Render Settings in the “Common” tab open the panel “Render Options” and remove the check at “Enable Default light”.

Disabled Default Light
Disabled Default Light

 

Final Gather

Setup

The Final Gather Effect will use the environment color of the camera to light the scene. You only need to activate Final Gather and you will see the result.

2016-06-14 02_09_03-Render View
Enabled Final Gather

Result

InfiniteWhiteBackgroundFG
Final Gather Render, Rendertime 2:34min

Ambient Occlusion Light Source

Step 1

Create an Area Light. In the Attribute Editor under mental ray > Area light, activate Use Light Shape.

2016-06-14 02_30_19-Autodesk Maya 2016 Extension 2_ C__Users_info_Desktop_InfiniteWhiteBackground.mb

Step 2

Connect to the Attribute “Custom Shaders > “Light Shader” a “mib_amb_occlusion” node.

2016-06-14 02_31_22-Maya_ Infinite white background lighting – Neal's Stuff

Step 3 (optional)

To increase the render quality you can adjust the attributes “Samples” and “Max Distance“.

Result

Ambient Occlusion Render, 4:35min
Ambient Occlusion Render, 4:35min
Arnold: Create a Retro Neon Sign

This time let’s render our awesome neon sign using SolidAngle: Arnold. For this we will reuse the model from my previous article Mental Ray: Create a Retro Neon Sign and just swap the shaders for Arnold shaders.

Shader

Glass-material

Create and assign a aiStandard material and set following Values

  • Diffuse
    • Color: White
    • Weight: 1
  • Emission
    • Color: White
    • Scale: 1

Gas-material

Create and assign a aiStandard material and set following Values

  • Diffuse
    • Weight: 0
  • Refraction
    • Weight: 1
  • Emission
    • Color: Blue
    • Scale: 0.2

Conclusion

The shader setup is simpler than in mental ray and the render speed is faster 7min mental ray vs arnold 3min.

Mental Ray: Create a Retro Neon Sign

Today we will be creating a cool looking neon sign. Neon signs were extremely popular in the US from 1920-1960. These days you will still find many stores use neon “open”- signs and especially a lot of “Las Vegas”-signs are neon lights.

The way a neon sign works is that a custom shaped glass tube is filled with gas. Then when the gas is electrified it starts to glow. To create different colors you simply have to tint the glass with the color you want.

(Short summary based on the Wikipedia article)

To create realistic neon light in Maya we are only allowed to model glass tubes and we need create two things, a representation of the gas and the glass tube.

First we will model the light using “Bezier-Curves” and “Poly-Extrude”. To render the light we will be taking a look at the mental ray “mia-light-surface” Texture and “object-light” Shader.

Modelling

Step 1

Create your sign using the “Bezier Curve Tool”.  For each letter create a new curve. Consider the limitations of glass tubes. Some letters, like “E”, cannot be completed in a single stroke, for these use multiple tubes / curves are required. Other letters like “O” cannot be perfectly round since the glass tube needs to go back to the electrodes. (Of course skip duplicate letters)

2016-06-08 21_44_27-Autodesk Maya 2016 Extension 2_ C__Users_info_Desktop_neon.mb_ --- bezier4..

Step 2

Create a Poly Cylinder (Subdivision Axis 8) and set the radius to whatever thickness you need your light to be. Duplicate it for each curve you have and position it at the beginning of the curves.

Step 3

Select the top faces and the curve and Extrude (Ctrl-E). In most cases you will need to add divisions so the geometry looks correct. (In some cases you will need to manual adjust the vertex points to get a good result)

2016-06-08 22_08_11-Autodesk Maya 2016 Extension 2_ C__Users_info_Desktop_neon.mb_ --- polyExtru
Divisions 1, to little to define the shape

 

2016-06-08 22_12_03-Autodesk Maya 2016 Extension 2_ C__Users_info_Desktop_neon.mb_ --- polyExtru
Divisions 20: Enough to define the shape, some manual adjustment needed to improve the geometry

Step 4

Select all geometry and select Mesh > Combine.

Step 5

Select all faces and Extrude (Ctrl-E) with a thickness of 0.2.

2016-06-08 22_34_25-Autodesk Maya 2016 Extension 2_ C__Users_info_Desktop_neon.mb_   ---   polyExtru

Step 6

Without deselecting the faces Edit Mesh > Duplicate Faces. This is our “gas”-geometry.

Shading

Glass-Material

Step 1

Create and assign a “mia_material_x” material. From the Presets select “Glass_Physical

Step 2

In the Attribute Editor go to “Advanced” and connect a “mia_light_surface“.

2016-06-08 23_13_39-Autodesk Maya 2016 Extension 2_ C__Users_info_Desktop_neon.mb_ --- glasstube

Step 3

Set the values to:

  • Color: Red (or whatever you need)
  • Fg Contrib: 1.0 (or higher Values like 5.0, increases the glow distance)
  • Refl Contrib: Same as Fg Contrib

2016-06-08 23_15_40-Autodesk Maya 2016 Extension 2_ C__Users_info_Desktop_neon.mb_ --- mia_light

Gas-Material

Create and assign to the “gas” component a mental ray “object_light” shader. Set the intensity to 1000.

2016-06-08 23_20_22-Autodesk Maya 2016 Extension 2_ C__Users_info_Desktop_neon.mb_ --- glasstube

Rendering

Step 1

If you do not have an environment you will not see the glow effect. For my simple render I just used a simple Poly Plane with a black lambert as the environment.

Step 2

Set up your Render_Cam.

Step 3

In the Render Settings, Quality-Tab enable Final Gather.

2016-06-08 23_22_53-Autodesk Maya 2016 Extension 2_ C__Users_info_Desktop_neon.mb_ --- glasstube

Last Step

Render your awesome neon lamp.

Quick Tip: Remove Specular Highlight from mia_material_x

The mia_material_x has an artificial specular highlight, seemingly reflecting the light source, even though no light source is “visible”.  This can cause unwanted effects especially when using multiple lights.

The specular highlight can be controlled in the shader attributes go to Advanced > Specular Balance. To disable it the value to 0.

2016-06-05 23_48_34-Autodesk Maya 2016 Extension 2_ untitled_ --- pSphere2

In the example image on the left you can clearly see a reflection of the key, fill and even rim light. On the right I set the “Specular Balance” to 0.

Using sIBL-sets for Maya

Image Based Lighting (IBL) allows you to use High-Dynamic-Range (HDR) images as. To efficiently use sIBL images you would need to set up an entire Shading Network.

Smart IBL (sIBL) is a open system that allows a quick and easy IBL setup in 3D Applications. It especially takes care of the issue  Of color noise gets created in the rendered animation caused by Final Gather. sIBL uses blurred images in combination with the original Image use in the reflections.

To work with sIBL Images you need two Parts

  1. sIBL-GUI is a Gallery Viewer that can send Images
  2. A plugin that allows your 3D Application to receive the image from sIBL-GUI

The software can be downloaded for free at:

http://www.smartibl.com/sibl/software.html

There are two types of sIBL Sets:

  • Environments, usually spherical images of locations
  • Light sets, images of specific lights used in a studio environment for lighting

WHERE TO GET (FREE) SIBL SETS?

Either create your own using “sIBL-Edit”

REQUIRED SIBL SOFTWARE:

  • (optional) sIBL-Edit : Creates sIBL sets
  • sIBL-GUI: Is a Viewer and Library of sIBL sets
  • Loader Plugin: Connects sIBL-GUI to the 3D Program

INSTALLATION:

  1. Download and install sIBL-GUI http://www.hdrlabs.com/sibl/framework.html
  2. Download and unzip the Maya Loader http://www.smartibl.com/sibl/loader.html
  3. Copy the extracted files to:

Windows 10

Mac OS X

Linux (64-bit)

Step 1

Open sIBL-GUI. You are prompted with “Would you like to add some IBL sets” – answer No

A window “Remote Updater” opens – press “Get Latest Templates” (deactivate the ones you do not need) – Select save Location (easiest is simply factory)

After the update Close the Download Manager and Remote Updater

Step 2

In the Main Program select “Export” then “Open Output Directory”

Copy the Path of that Folder it should be something like:

Step 3

Open/Restart Maya. Open the Shelf “sIBL_GUI”

sIBLPart1-2

Step 4

Click on the first Icon “p”.

Insert the Path to “Loader Script Path” and select sIBL_Maya_Import.py

sIBLPart1-3

 

ADDING SIBL-SETS TO SIBL_GUI

Step 1

Extract the file into any folder you like on your Hard drive. I have my files organized In a folder called C:\Resources\HDR\sIBL.

Step 2

Open up sIBL_GUI.

In Library Mode right click in the middle panel and select “Add sIBL set …”

Screenshot-1_5_2012-9_09_06-AM-1024x719

Your First sIBL render

We will be using a sIBL of a tropical beach in Barbados to render a teapot.  However you can use whatever image and model you like.

REQUIRED STUFF:

IMPORT SIBL TO MAYA:

Step 1

Import the teapot to Maya (File > Import )

Step 2

Open sIBL, Add the “Tropical Beach” to the Libary (In Library Mode right click in the middle panel and select “Add sIBL set …” )

Step 3

Select the “Export” panel

Step 4

In the left panel select “Mental Ray Standard” (Creates an environment)

Step 5

In the middle panel select the Image, in the right panel click Output Loader script

Screenshot-1_5_2012-9_29_45-AM-1024x719

Step 6

Back in Maya go to the sIBL shelf and click on the E (execute)

sIBLPart1-2edit

Step 7

In the Outliner you see a group “sIBL” has been created. It includes a transparent floor to receive shadows.

Screenshot-1_5_2012-12_16_50-PM

Step 8

In the Hypershade you can Graph the persp-Camera here you see the entire IBL-network that has been created. If you create a new Camera you have to connect the sIBL_mip_rayswitch to the mental ray > Environment Shader Attribute

Screenshot-1_5_2012-12_25_42-PM-1024x581

RENDER

Step 1

In the Viewport activate Shaded and Textured mode (Press the key 6)

Step 2

Position your Render Camera

Step 3

Apply a “mia_material_x” shader to the teapot (A white tone)

Step 4

Test render (make sure Final Gather is activated)

If the image is too bright, check the Gamma Settings on the “sIBL_mia_exposure_simple” and set it to 1.0

Step 5

Adjust Final Gather settings and Anti-Alias Settings for Final Render (increase Accuracy, Point Density) and then do your final Render.