Scene Optimization

This tutorial will show you how to optimize your scenes with Shader Utilities.

1. Workflow

1.01 Number of Reflection/Refraction Samples
1.02 Set up Fast-Interpolation: Samples, Grid and Limit
1.03 Set Limit Values for Reflection/Refraction Depth
1.04 Set Roundcorner range and activate
1.05 Set up Ambient Occlusion Sample + Range
1.06 Use Exact AO and set Shadow Color
1.07 Finish… press the „Set“ Button to optimize the entire scene.
1.08 Rendertime „SU-Pro Sample Curve“ vs „3dsmax Global Tuning“
1.09 Manage Parameters: Scene Manager / Export / Import

2. Sample Types

3. Sample problems and how to fix them

 

1. Workflow

klick mouse to zoom 2560 Pixel Resolutionklick mouse to zoom 2560 Pixel Resolution

 

1.01 Number of Reflection/Refraction Samples

– Reflection Sample

In the right entry field, you can enter the maximum Scene sample rate. This will be used when so sample curve is activated. The Left entry field (Fast Interpolation Sample) is for the sample curve computation. This is where the maximum sample rate is set which a material can receive depending on its rawness. The smoother the object the fewer samples it needs. On the other hand, the rougher a material is, the more samples it needs. Using the sample cure, you can control the sample rate for all types of materials, smooth as well as raw. This makes sure that every material gets the optimal sample rate depending on is surface properties.

– Treshold No Sample

All materials that are smoother than the limit value receive 0 samples. With this value, one can shorten the rendering time. For maximum quality, we will leave the limit value at 1.

– Treshold no Reflection

All materials that are rougher than the limit value will have their reflection shut off. With this value, one can shorten the rendering time. For maximum quality, we will leave the limit value at 0.

Step 3.1

 

1.02 Set up Fast-Interpolation:

Samples, Grid, and Limit Values. Fast-Interpolation is a Post-Effect and has a couple of limitations because of this. It doesn’t work with „Secondary Ray“ for example.

– Fast-Interpolation Sample

decides the quality of the Interpolation. The samples are set by the sample curve.

– Fast-Interpolation Grid

decides the blurriness of the Interpolation. The Fast-Interpolation Grid uses the sample values of the material, because materials with a low amount of main samples are also smooth materials and need a smaller raster to avoid Sample-Splotches.

– Fast-Interpolation Density

is the limit value which decides at which sample rate Fast-Interpolation should be activated. A rule of thumb: activate Fast-Interpolation when the material’s sample rate is >= (max. Sample/Fast-Interpolation Density). In our example, that would be (32/2.5)=12.8. If a material has 13 samples or more, the Fast-Interpolation will be activated for this material.

Step 3.1

 

Faster-Interpolation Grid

creates a raster over the rendering. The higher the Interpolation raster value is, the less detailed the raster will be. The reflection will also be less sharp, and because there’s less to interpolate, the rendering time will also be shorter.

Step 3.2

 

1.03 Set Limit Value for Reflection/Refraction Depth.

Set this to optimize the render speed while getting a grainy-free final product. This is achieved by giving all the raw materials a ray depth of 1. This keeps raw reflecting materials from reflecting each other. This stops double or triple distributions of a reflection and gets rid of Sample-Staccato. In our case, all materials that are rougher than Glossiness Value 0.2 are set to reflections depth = 1. You can also set the same for transparencies.

Step 3.3
klick mouse to zoom 2560 Pixel Resolutionklick mouse to zoom 2560 Pixel Resolution

 

1.04 Set Roundcorner range and activate

With this option, you can give sharp edges a fake rounded edge. In order that all objects don’t have the same edges, you can use Shader Control’s explicit Shader to optimize, or use the function „selected objects.“ Please note that this function uses the material of an object. If this material is on other objects, those objects receive the same edges.

Step 3.1
Step 3.2

 

1.05 Set up Ambient Occlusion Sample + Reach

– Turn ON

activates the Ambient Occlusion Shader in the Material.

– Force Sample

every material has the same AO-Sample Rate when the AO-Sample Curve is deactivated. The higher the value, the better the quality and the longer the render time.

– Force Radius

sets the distance to the occluded object.

– Shadow Color

sets the shadow color in the ambient area. This function is deactivated when exact AO is activated.

– Ambient Color

With this, we can give the ambient area of a material a color, to brighten or darken for example.

Step 1.1
Step 1.2

 

1.06 Use Exact AO

Because normal AO looks dirty, we’ll use the function that calculates the AO-Shadow Color using the ambient area of the occluded object. This process works with transparent objects as well as self-illuminating objects. This makes the render time a little longer in comparison to normal AO.

Step 1.6

 

 

1.07 Optimize Scene

In order to optimize the scene, you have to transfer all parameters and colors. In addition, activate all the necessary buttons: „GI“, „Rc“, „CD“, „AO“ and click the „set“ button when everything is finished. You have to set all „on/off“ buttons manually. The set button only transfers colors and number values to the materials.

Last Step

1.08 Rendertime „SU-Pro Sample Cure“ vs. „3dsmax Global Tuning“

Both scenes are already optimized with AO, Roundcorner etc. The only thing being tested and not optimized is the Reflection-Sample. I’m comparing the „3dsmax Global Tuning“ Option with the „Sample Curve“ method in this study. This optimization alone shows quality and speed advantages.

Step 1.09
 

3dsmax Global Tuning:

Click on the picture for a larger version

klick mouse to zoom 800x593 Pixel Resolutionklick mouse to zoom 800x593 Pixel Resolutionklick mouse to zoom 800x593 Pixel Resolutionklick mouse to zoom 800x593 Pixel Resolution

 

SU-Pro Sample Curve:

Click on the picture for a larger version

klick mouse to zoom 800x593 Pixel Resolutionklick mouse to zoom 800x593 Pixel Resolutionklick mouse to zoom 800x593 Pixel Resolutionklick mouse to zoom 800x593 Pixel Resolution

 

1.09 Manage Parameters

Shader Utilities creates a dummy „defult_su“ in Layer_zz_Shader_Utilites automatically.

Import/Export Parameter Dummy

This dummy has all the parameter set-up and can be imported to every other scene. You can also save the dummy in an extra file through the „save selected object“ option so you can import this dummy into a different scene whenever you see fit.

 

Scene Manager

You can save different levels of quality within the scene though the Scene-Manager.


2. Sample Type

Shader Utilites can optimize the following Sample Types

– Reflection/Refraction Sample

– Fast-Interpolation Sample

– Ambient Occlusion Sample

– Sub Surface Scattering Sample

2.01 Other Sample Types

– Light-Sample / for High End Quality Minimum 32 Samples
Light Samples

– Camera DoF/MB -Sample / for High End Quality starting at 32 Samples, for Bokeh Effect 256 Samples

Dof & Motionblur Samples

– Anti -Aliasing-Sample / for High End Quality minimum (min 4 / max 16)

Anti Alaising Samples


3. Sample problems and how to fix them

Fix physical Sky Map:

For this, you have to look in the environment setup and copy the mr_phycial Sky Map in the Material Editor as an instance. After that, set Glow or Disc to 0.
Light Samples

Fix Bitmap Black:

When you use a Bitmap or procedural Map for the Glossiness Distribution, the darkest area should never be 100% black, because otherwise an infinite distribution will be computed. Go into Outlay and reset the RGB-Curve. Set the Glossiness value of the material to the same value as the left peak of the Bitmap’s Outlay Curve. This will allow the Sample Curve to compute the correct number of samples.
Light Samples