Introduction


  • This lesson will take you through adjusting Anti-aliasing parameters using the V-Ray Quick Settings
  • The information centers around the Image Sampler render settings
  • This lesson topic is approximately 40 minutes in length with 2 separate demos and activities available
  • Lesson covers all 3 Learning Cycles for the Lesson Topic – Lecture, Demonstration (x2), and Activity (x2)

 

 

Contents


Overview
Available Materials
Lecture
Demonstration
Activity

Overview


Goal – By the end of this lesson you will know how to properly optimize the antialiasing of shading effects like soft shadows, blurry reflections and refractions, SSS etc.

Objective – We will learn how to adjust the Anti-Aliasing settings to our 3D scene to get better render results and render times                                         

Outcome – You will understand how image sampling works within V-Ray to reduce render noise in the shadows  and in reflections for your scene

 

 

 

Available materials


To set up the lesson follow the links below and download all available materials.

Lesson plan download
Presentation (Lecture) download
Demonstration tutorial 1 download
Demonstration tutorial 2 download                                      

Scenes & Assets download

Lecture



1. Terminology

Here’s some terms to be aware of when thinking about Image Sampling

  • Raytracing
    • Raytrace renders shoot out rays that collect data on what each pixel should look like for the final render
  • Primary Rays
    • The information probes projected out from the camera to determine where and what geometry is in the scene
  • Secondary Rays
    • Additional informational probes that are sent from the end point of primary rays, with a focus on shading, lighting, GI, glossy and/or blurred reflections, subsurface scattering, etc.
  • Sampling
    • Sampling gathers information from the rays to determine what each pixel will look like in the render
  • Anti-aliasing
    • Pixel information is blended/blurred based on sampling differences to produce a cleaner render, particularly on diagonal/curved areas of a rendered image, or where there is a difference in colors/values for adjacent pixels
  • Deterministic Monte Carlo (DMC) Sampling
    • Monte Carlo is a computational algorithm that randomly samples area of an image to obtain numerical results  to evaluate “blurry” values (anti-aliasing, DoF, GI, area lights, glossy reflections/refractions, etc.) to basically help determine the look of a pixel. Deterministic Monte Carlo uses a pre-defined set of samples (as opposed to random samples) so the render result is always the same when re-rendered with no changes made to the scene

 

 

2. Raytracing


To better understand Image Sampling, let’s make sure we have a solid understanding of Ray trace rendering

  • To create a render (made up of the pixel grid) the camera projects rays into the scene to sample information and determine where the geometry is located
  • The shadow rays (a type of secondary ray) then scan the scene looking for light sources
    • If the ray hits a light source, it traces that information back to the geometry letting it know that area is illuminated directly
    • If not (because something is obstructing it from light sources) the ray is traced back to the geometry letting it know that it is in shadow

 

  


After the Shadow Rays, other secondary rays get added to the rendering calculation to add more realism to the render for things like reflections and refractions (both clear and blurry)
  • These rays also include GI, translucency, and SSS rays
  • As opposed to primary rays, we can turn Off the calculation of secondary rays if our scene doesn’t need them, or for faster results at the cost of accuracy
    • Turning Off primary rays would not give us a render at all

 

  

  

  

  • The amount of calculations that happen to create a final render is pretty amazing, since millions of different rays are being cast and then traced back through the scene to the pixel grid
  • We can make adjustments to how many rays are projected around our scene
  • The number of samples taken for each pixel in our render can also be adjusted with some pretty advanced sampling engines

  

  

3. Image Sampling


 V-Ray Quick Settings

  • The V-Ray Quick Settings dialog is an easy way to control the most common aspects of the renderer and to quickly switch between different GI solutions and quality settings
  • It is also intended to give new V-Ray users the ability to set up scenes without worrying about all the different V-Ray options available in the Render Setup dialog
  • Presets help give a good starting point depending on the type of scene

 

  

  • The Studio Setup preset is useful for product design visualizations (like our scene with the toy truck)
    • The Manage Presets allows you to save the current settings into the V-Ray presets file or to load previously saved settings
    • The Settings buttons give you a quick way to jump to the render settings that apply to the area affected by the Quality sliders (GI, Shading, Anti-Aliasing)
  • To open Quick Settings, click its icon in the V-Ray shelf (shown below)
    • If you do not have the V-Ray shelf, enable it through the Render Settings window, Vray tab under the Vray UI heading by clicking Create/Replace V-Ray Shelf
 

  

 

 

V-Ray Quick Settings, Under the Hood

Quick Settings are a fast way to get results. Under the hood, they adjust other more detailed attributes for you. You still have access to these detailed attributes, so let’s see quickly what some of them are:

 

a) The Anti-Aliasing Quality slider adjusts the Image Sampler’s Min Subdivs, Max Subdivs, and Noise Threshold

  • Min Subdivs determines the initial (minimum) number of samples taken for each pixel
    • You will rarely need to set this to more than 1, except if you have very thin lines that are not captured correctly, or fast moving objects if you use motion blur
    • The actual number of samples is the square of this number (e.g. 4 subdivs produce 16 samples per pixel)
  • Max Subdivs determines the maximum number of samples for a pix
    • The actual maximum number of samples is the square of this number (e.g. 4 subdivs produces a maximum of 16 samples)
      • Note that V-Ray may take less than the maximum number of samples, if the difference in intensity of the neighboring pixels is small enough
      • The AA Slider Limit is set the top end (the far right) amount for the AA Quality slider (default of 25 is good)
      • The noise Threshold is the acceptable difference allowed before more samples are used to refine a pixel

 

  

b) The Adaptive (DMC) Sampler Engine is manipulated by the Quick Settings “under the hood.”

  • The Adaptive Sampling Engine uses a set of input parameters to help the engine choose where and how to use the most efficient amount of samples it has available within a range set by the user 
  • The Min and Max subdiv input values drive this process
  • Don’t set both to same value or it becomes a Fixed rate engine
  • Increasing the Max subdivs doesn’t always produce a cleaner image
  • The (noise/color) Threshold controls the amount of noise allowed in our renders
  • Increasing the Min Shading Rate will allow Secondary rays to work more to add more influence to the final render quality


 

  • Another “under the hood” set of values adjusted by the Quick Settings is the noise/color Threshold
    • Helps determine when more samples (up to the max subdivs) are actually used in areas of the render
    • Smaller Threshold values will increase render times but will also clean up noise in the image

 

 



 

 

 c) V-Ray Quick Settings AA Quality

  • The Anti-Aliasing Quality slider adjusts the Image Sampler’s Min Subdivs, Max Subdivs, and Noise Threshold “under the hood”
  • Min Subdivs determines the initial (minimum) number of samples taken for each pixel
  • Max Subdivs determines the maximum number of samples for a pixel
    • Remember the actual maximum number of samples is the square of this number (e.g. 4 subdivs produces a maximum of 16 samples)
    • Note that V-Ray may take less than the maximum number of samples, if the difference in intensity of the neighboring pixels is small enough.
  • Noise Threshold controls the noise amount
    • A value of 0.005 is normally good for final renders (leave at 0.01 default when creating test renders)

 

 

 

 

d) Anti-Aliasing for soft shadows
  • Shadows are calculated by secondary (shadow) rays in our scene
  • The best way to get V-Ray to shoot more shadow rays is to increase the Min Shading Rate

 

 

Shading Quality: 3%   Min Shading Rate: 2
AA Quality: 1-8   Threshold: 0.005

Shading Quality: 37%   Min Shading Rate: 24
AA Quality: 1-8   Threshold: 0.005

 

 

e) Anti-Aliasing for soft shadows

  • The AA Quality helps reduce the noise seen in the shadows
  • For each Primary Ray ( controlled by the AA Quality) V-Ray shoots additional secondary(shadow) rays that is why AA Quality also affects the quality of the shadows
  • The Threshold value is a big factor in how much noise we are okay with in our renders

 

 

Shading Quality: 25%
AA Quality: 1-1 Threshold: 0.05

Shading Quality: 25%
AA Quality: 1-8 Threshold: 0.005

 

 

f) Render Elements
  • The info that can be seen in different Render Elements can help us understand more about what’s calculated in that part of the render
  • Sample Rate – shows an image where the pixel’s color value is proportional to the number of samples taken at this pixel, where darker colors like blue mean less samples than brighter colors like red meaning the maximum samples
  • Lighting – the diffuse direct surface lighting

 

 

  • Seeing the Sample Rate and the Lighting render passes helps us see where samples are taken to determine image quality and where the lights are illuminating
    • Blue shows a lower sample rate; red shows higher sample rate
    • Notice how darker areas that are not seen receive lower samples

  

 

Sample Rate Render

Lighting Render

 


  • Blurry reflections/refractions are the same as soft shadows (use secondary rays)
  • To see how they are anti-aliased, we can use the Lighting Render Element to compare it’s result with Render Elements like Reflection

 

 

Reflection Render

Lighting Render

 


g) Anti-Aliasing for Reflections

  • A higher Min Shading Rate will allow more secondary ray calculations for glossy reflections
  • If a scene has little to no reflections, a lower Min Shading value will keep render times fast

 

 

Min Shading Rate: 2
AA Quality: 1-4 Threshold: 0.02

Min Shading Rate: 16
AA Quality: 1-4 Threshold: 0.02

 


  • Increasing the Shading Quality (Min Shading Rate) will increase the secondary effects (like blurry reflections)
  • Increasing the AA Quality will increase the Anti-Aliasing on the geometry in the scene

 

 

Shading Quality: 35%   Min Shading Rate: 23
AA Quality Min/Max: 1/2   Threshold: 0.05

Shading Quality: 35%   Min Shading Rate: 23
AA Quality Min/Max: 1/6   Threshold: 0.01

 


 Conclusion



a) Raytracing

  • The rendering technique used by V-Ray to shoot camera rays into the scene to gather info. and then trace their paths back to the pixel grid that makes up the final rendered image

b) Noise Threshold

  • Adjusts the amount of noise seen in shadows and reflections

c) Image Sample Engines

  • Different methods for shooting out rays for each pixel in the final render

d) Glossy Reflections

  • An area of the render that benefits from more secondary ray calculations in our render

e) Anti-aliasing

  • A blending/blurring of pixel information based on sampling differences to produce a cleaner render

f) Min Shading Rate                                                                                                                                                         

  • Controls the balance between primary (Anti-Aliasing) rays and secondary (glossy, blurry, GI, SSS) rays

 

Demonstration



Time to see it work!

Watch while I demonstrate how to adjust the Sampling settings of our render using the V-Ray Quick Settings

Demonstration tutorial 1
Demonstration tutorial 2

 

          


Activity



Time to do it yourself!

Use the provided scene file to get a better understanding of image sampling.
We have also provided a final scene for your reference.

 

 

Dialing in the right values

  • GI Preset to None
  • Shading Quality at 35%
    • Min Shading Rate: 23
  • AA Quality at 20%
    • Adaptive Min subdivs: 1
    • Max subdivs:6
    • (noise) Threshold: 0.01