[vc_row bg_color=”#ffffff” text_color=”dark” ][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”2″][/vc_column][/vc_row][vc_row bg_color=”#c4c4c4″ top_padding=”5″ bottom_padding=”10″ text_color=”dark” bg_image=”3205″ bg_repeat=”stretch” ][vc_column width=”1/1″ text_align=”left” text_color=”dark”]
Sampling And Final Gather
Maya, Mental Ray: Lighting
[/vc_column][/vc_row][vc_row bg_color=”#” text_color=”dark” ][vc_column width=”1/1″ text_align=”left” text_color=”dark”]
[/vc_column][/vc_row][vc_row bg_color=”#ededed” top_padding=”30″ bottom_padding=”30″ text_color=”dark” ][vc_column width=”2/3″ text_align=”left” text_color=”dark”]
Sampling and Final Gather are the two elements we must learn when understanding how Mental Ray renders images for animation. These two quite different systems are at the core of the physically correct rendering system.
Sampling is the quality of the pixel information and is usually scene as grain. Sharp images are relatively easy to render in CG, but as soon as anything is blurred we need to up sampling levels for better image quality. Blurring of shadows, specular reflections, subsurface scatter and many other elements may introduce grain.
Final Gather is Mental Rays method for calculating bounce light. It must be thought of as a separate lighting system and comes under the category of Indirect Lighting. Mental Rays Global Illumination method can also be used but because of slower render times it’s usually not used in rendering for animation where we have multiple frames.
Think of Indirect Lighting as a seperate system to direct light which is the lights and shadows cast directly from the light source. indirect Lighting is the bounce lighting and is also cast from IBL’s or Image Based Lighting spheres with HDR Images.
We are using Linear lighting for these tutorials, so refer to linear lighting pages for more info there. Setup tutorial here is video 2 and I use scripts from the Fast Linear Workflow Setup page as well.
HDR images can be downloaded from HDRlabs.com[minti_spacer height=”13″][/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_iconbox icon=”fa-list-ul” style=”1″ iconcolor=”accent” title=”Contents (52 mins)”]
1.1 – Introduction
1.2 – Scene Setup
2.1 – Sampling Overview
2.2 – Shadow Reflect SSS Samples
3.1 – Indirect Lighting
3.2 – Real World Light
4.1 – Accuracy and Rays
4.2 – FG Density
4.3 – FG Blurring
4.4 – FG Three Values
5.1 – Blurring IBLs
[/minti_iconbox][minti_iconbox icon=”fa-pencil” style=”1″ iconcolor=”accent” title=”Instructor”]
Andrew Silke
[/minti_iconbox][minti_iconbox icon=”fa-calendar-o” style=”1″ iconcolor=”accent” title=”Last Updated”]
October 2015
[/minti_iconbox][/vc_column][/vc_row][vc_row bg_color=”#ffffff” text_color=”dark” ][vc_column width=”1/3″ text_align=”left” text_color=”dark”]
[minti_spacer height=”20″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”30″][minti_title align=”left”]1. Introduction and Setup (5:16 mins)[/minti_title][vc_column_text]Here we go over the basics of this tutorial and setup the scene ready with linear workflow.[/vc_column_text][minti_spacer height=”0″][/vc_column][/vc_row][wpanchor id=”1.1″][vc_row bg_color=”#ffffff” text_color=”dark” ][minti_toggle title=”VIDEO 1.1 : INTRODUCTION (1:16 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| The introduction for this tutorial. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][wpanchor id=”1.2″][vc_row bg_color=”#ffffff” text_color=”dark” ][minti_toggle title=”VIDEO 1.2 : SETTING UP THE SCENE (4:00 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| Setting Up the scene quickly |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][vc_row bg_color=”#ededed” text_color=”dark” ][vc_column width=”1/3″ text_align=”left” text_color=”dark”]
[minti_spacer height=”20″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”30″][minti_title align=”left”]2. Sampling (16 mins)[/minti_title][vc_column_text]Sampling is usually the cause of noise in our scenes. It happens on any pixels needing soft or blurred areas. Anti-aliasing, soft shadows, blurry specular reflections, subsurface scattering are all common offenders.
There’s a MR overall setting in the Render Settings > Quality > unified sampling slider. This is our overall sampling setting but we also must tweak other settings too for shadows and materials individually.[/vc_column_text][minti_spacer height=”0″][/vc_column][/vc_row][wpanchor id=”2.1″][vc_row bg_color=”#ededed” text_color=”dark” ][minti_toggle title=”VIDEO 2.1 : SAMPLING OVERVIEW (8:13 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| The Unified Sampling Slider is a Global sampling level in MR.
Render Settings > Quality > Unified Sampling Slider This is our overall image quality setting. It most obviously improves antialiasing but it also globally improves the sampling of all elements including textures, shadows, SSS and reflections. Defaults are .25 which is low. For final renders it’s recomended to set at .75 or 1. You can go higher but usually we’ll remove the grain in post since render times can get very heavy. Still images are commonly set high where you can leave renders over night to render for 12hrs plus. This is usually not recomended for animation where hundreds of frames need to be rendered. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][wpanchor id=”2.2″][vc_row bg_color=”#ededed” text_color=”dark” ][minti_toggle title=”VIDEO 2.2 : SAMPLING ON SHADOWS REFLECTIONS AND SSS (8:13 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| The Unified Sampling Slider is a Global sampling level in MR.
Render Settings > Quality > Unified Sampling Slider This is our overall image quality setting. It most obviously improves antialiasing but it also globally improves the sampling of all elements including textures, shadows, SSS and reflections. Defaults are .25 which is low. For final renders it’s recomended to set at .75 or 1. You can go higher but usually we’ll remove the grain in post since render times can get very heavy. Still images are commonly set high where you can leave renders over night to render for 12hrs plus. This is usually not recomended for animation where hundreds of frames need to be rendered. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][vc_row bg_color=”#ffffff” text_color=”dark” ][vc_column width=”1/3″ text_align=”left” text_color=”dark”]
[minti_spacer height=”20″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”30″][minti_title align=”left”]3. Indirect Lighting Overview (6:50 mins)[/minti_title][vc_column_text]Now we’ll explore Indirect Lighting, a new topic which isn’t related at all to sampling. Indirect Lighting is the bounce light in our scene and must be thought of a separate to direct lighting from the actual lights in our scene. This becomes more important later when we noticed “blotches” in our renders, “blotches” are usually cause by final gather and are not related to sampling. Sampling is usually diagnosed as grain.[/vc_column_text][minti_spacer height=”0″][/vc_column][/vc_row][wpanchor id=”3.1″][vc_row bg_color=”#ffffff” text_color=”dark” ][minti_toggle title=”VIDEO 3.1 : INDIRECT LIGHTING OVERVIEW (5:09 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| An Overview of Indirect Lighting and what bounce light systems are available to us in Maya’s Mental Ray. We’ll be focusing on the subsection “Final Gather” exclusively for render speed in animation with a minimal loss of quality. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][wpanchor id=”3.2″][vc_row bg_color=”#ffffff” text_color=”dark” ][minti_toggle title=”VIDEO 3.2 : A NOTE ABOUT REAL WORLD BOUNCE LIGHTING (1:41 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| Quick note about Final Gather compared to how light behaves in the real world. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][vc_row bg_color=”#ededed” text_color=”dark” ][vc_column width=”1/3″ text_align=”left” text_color=”dark”]
[minti_spacer height=”20″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”30″][minti_title align=”left”]4. Final Gather: Understanding the Common Settings (15 mins)[/minti_title][vc_column_text]Final Gather is composed mainly of three values, “accuracy” which is related to rays, “density” is the amount of points and “point interpolation” which can be thought of as blur. With a good understanding of how these values relate to each other we can start to optimise render times and remove Final Gather artefacts. This is crucial for good lighting in Mental Ray.[/vc_column_text][minti_spacer height=”0″][/vc_column][/vc_row][wpanchor id=”4.1″][vc_row bg_color=”#ededed” text_color=”dark” ][minti_toggle title=”VIDEO 4.1 : FINAL GATHER – ACCURACY AND RAYS (5:33 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| Accuracy is the foundational value that governs how Final Gather calculates bounce light. It’s important to really understand how the light rays randomly ping the scene to produce the bounce lighting effect. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][wpanchor id=”4.2″][vc_row bg_color=”#ededed” text_color=”dark” ][minti_toggle title=”VIDEO 4.2 : FINAL GATHER – POINT AMOUNT (DENSITY) (1:14 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| Point density is the value that adds more or less points. But it’s important to know that just adding more points doesn’t necessarily mean better looking renders. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][wpanchor id=”4.3″][vc_row bg_color=”#ededed” text_color=”dark” ][minti_toggle title=”VIDEO 4.3 : FINAL GATHER – BLURRING (POINT INTERPOLATION) (4:05 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| Blurring is the key to getting rid of the point blotches in our renders, but it comes at a cost, both in render times and in loosing crack shadow details. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][wpanchor id=”4.4″][vc_row bg_color=”#ededed” text_color=”dark” ][minti_toggle title=”VIDEO 4.4 : FINAL GATHER – COMBINE THE THREE VALUES FOR QUALITY (4:24 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| Now that we understand all the values here we explore how they can be used in conjunction, keeping in mind that the more we blur with “point interpolation” the more we’ll loose our lovely crack shadow detail. In the past we’d use ambient occlusion passes to add our detail back, ambient occlusion is a little bit like cavity maps where darkness is caught in the crack detail, but if we get out FG settings right we should minimise the need to add ambient occlusion later in post. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row][vc_row bg_color=”#ffffff” text_color=”dark” ][vc_column width=”1/3″ text_align=”left” text_color=”dark”]
[minti_spacer height=”20″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”30″][minti_title align=”left”]5. Blurring Image Based Lighting (IBL) Domes (8:15 mins)[/minti_title][vc_column_text]Interestingly blurring our IBL image domes will help our Final Gather in outdoor scenes. This is an interesting effect which is quite intuitive now we understand how the Final Gather is working.[/vc_column_text][minti_spacer height=”0″][/vc_column][/vc_row][wpanchor id=”5.1″][vc_row bg_color=”#ffffff” text_color=”dark” ][minti_toggle title=”VIDEO 5.1 : BLURRING IMAGE BASED LIGHT DOMES FOR BETTER AND FASTER RESULTS (8:15 mins)” open=”false” icon=”fa-film”][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”15″]
[/vc_column][vc_column width=”1/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][/vc_column][vc_column width=”2/3″ text_align=”left” text_color=”dark”][minti_spacer height=”25″][minti_table style=”2″]
| Information |
|---|
| Here we see how different images can be used to further optimise our lighting. A blurred lores version of the IBl can be used for the diffuse lighting and counter intuitively produces better lighting results. However we usually still use the hires .hdr image for reflections and the super hires jpg for our background clarity. HDR Labs have a free Maya plugin that automatically divides the rays correctly. It’s recommended for further study in this area. |
[/minti_table][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][/vc_column][vc_column width=”1/1″ text_align=”left” text_color=”dark”][minti_spacer height=”20″][/vc_column][/minti_toggle][/vc_row]
