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.

 

 

Install Maya 2017 on Ubuntu 16.04

Autodesk officially only supports Fedora/RedHat. This is probably due to legacy reasons, since larger Corporations were using RedHat. There is an official documentation how to install Maya on Fedora link

However Ubuntu (based on Debian) has become very popular. (As Alternative you also could use Elementary, Mint etc.) We will take a look on how to install Maya 2017 (Student Version) on Ubuntu via the Command Line.

tl:dr: The final bash script can be found here

Quick Install Script:

You will manually have to remove the installation files.

Step 1: Download Maya

If you download a Studentversion of Maya it will provide you with a download link. You can change this to whatever Version of Maya you would like to install.
Autodesk Students

Step 2: Install Dependencies

The dependencies list is partly based on the Additional Installation Notes for Linux

And my previous Installation Script for Maya 2014

The package libxp6 was removed in Ubuntu 15. If you are running an older version of Ubuntu you could directly install it via apt.

Step 3: Convert .rpm files into .deb files

Step 4: Install Maya

The whole mucking about replacing the /usr/bin/rpm is that the fedora installer can finish installing without errors.

In the Fedora Installer you will need to enter your licence details.

Step 4: Fix Startup Problems

Initially Maya will not start because it cannot find various libraries. Depending on which version is installed on your system you need to adjust these lines to reflect your version.

Step 5: Fix Segmentation Error

You will run into following Error:

This can be fixed by Disabling the Customer Improvement Program.
To disable it add MAYA_DISABLE_CIP=1 line to your Maya.env file. Bash:

Step 6: Color Management Errors / Single Matrix no inverse exists

Maya will start, and may or may not show the render view. You will also run into 6-7 Errors “Single Matrix no inverse Exists”

Screenshot from 2016-09-05 12-50-02

To fix this, add “LC_ALL=C” to your Maya.env.
Bash:

Step 7: Alt Key for Camera Movement

Use this line to use the ALT-Key instead of the “Windows”-Key for modifying the Camera:

Final Script:

Create a Pile of Stuff

This technique is a very quick and dirty approach to creating a pile of stuff. The downside using this technique is due to the fact that particles are generally round and usually stuff is not round, causing segments of your geometry to intersect with other objects.

Step 1

Set up a nParticle emitter: In the FX Menu select nParticles >  Create Emitter

Step 2

Adjust the following Attributes of  the emitter1:

  • TranslateY = 9
  • Rate (Particles / Sec) = 20

2016-07-27 10_32_22-

Step 3

Configure the nParticle (“nParticleShape1”) Shape –

  • Self Collide = true
  • Stickiness = 1.02016-07-27 10_34_42-

Step 4

Aactivate the ground plane in “nucleus1”. This will create an invisible plane to collide with the particles.

  • UsePlane = true

2016-07-27 11_07_54-Autodesk Maya 2017_ untitled_   ---   emitter1

Alternatively you could create a poly plane as ground plane to be used as a particle collider.

Step 5

Set the Playback Range to 1-500 and view how the Particles are piling up.

You can switch the Particle Render Type to Spheres to get a better idea of how the Pile will look like.2016-07-27 11_11_30-Autodesk Maya 2017_ untitled_   ---   nParticle1

Adjust the particle & emitter settings to fit your needs.

Step 6

I created a couple of basic objects, that I will use instead of the Particles.

Select the particles and all the objects you want to use as geometry replacement. nParticles > Instancer 2016-07-27 18_49_34-Autodesk Maya 2017_ untitled_

Now all the Particles should look like the first object in you selected. (in my case cubes)

Step 7

Select the Particles again go to Add Dynamic Attributes and click the General Button.

In the Add Attribute dialog enter for the Long name = objIndex PP, enable Per particle(array) and click Ok2016-07-27 19_02_59-

Step 8

Back in the ParticlesShape Node open “Per Particle (Array) Attributes” RMB on “Obj Index PP” > Creation Expression

2016-07-27 19_08_01-

In the Dialog add following Expression:

In essence this means that for each particle a random number between 0 and 3 is going to be choosen.

Step 9

Back in the Attribute Editor go to Instancer(Geometry Replacement) > General Options > Object Index select ObjIndex PP2016-07-27 19_15_07-Autodesk Maya 2017_ untitled_   ---   nParticle1

Restart the playback to refresh all particles.

(optional) Step 10

Now all the objects are looking kind of stacked up and look identical. To make it visually more interesting you can activate “Rotation“.

2016-07-27 19_25_54-Autodesk Maya 2017_ untitled_   ---   nParticle1

Go to Instancer(Geometry Replacement) > Rotation Options > Rotation and select rotationPP

2016-07-27 19_27_06-Autodesk Maya 2017_ untitled_   ---   nParticle1

Step 11

You can modify and place your initial geometry on its own layer and hide that. (Especially if your objects appear to big, you could scale them down etc.)

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

Maya Render All Files In Autosave Folder

For an university assignment I had to “display” my modelling progress. My instructor wanted me to do a screenshot every 60 seconds. However he was not impressed by the result. He wanted to see real renders.

To avoid interrupting my work every 60 seconds I enabled the internal “autosave” feature. Then of course I ended up with a ton of files. But now I still needed to render out every single file, so I created a simple script to render all files in the folder.

This Python script will create a batchfile which when exectuted will render every single file.

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
Quick Tip: Polygon Display Face Centers

By default you select faces in Maya with the whole face. I recommend changing this setting to “Center”. It makes it easier to select faces  in the orthographic views and makes faces without area visible.

To change the setting go to  Window > Setting & Preferences > Preferences, on the left choose “Selection”  and choose “Select Faces with: Center“.

2016-06-10 22_13_02-Autodesk Maya 2016 Extension 2_ untitled

 

 

 

2016-06-10 22_14_39-Autodesk Maya 2016 Extension 2_ untitled_
Polycube with Zero Geometry Area Faces

 

2016-06-10 22_25_27-Autodesk Maya 2016 Extension 2_ untitled_
Select the Top Face of a Poly Cube in the side view