The Unified Rasterizer

Skeletons from the TV series Merlin - rendered with the rasterizer

If you read my post on unified sampling you might have heard me talking about using the unified sampling settings to control the rasterizer.  While it is important to note that there is no difference between how the regular rasterizer and unified rasterizer work, it is convenient to be able to control all of mental ray’s primary rendering modes using the same set of controls.  Thus I will explore the rasterizer from a unified point of view.

Why Use the Rasterizer?

With unified sampling, it’s clever error estimation, and it’s fast ray traced motion blur, you may be wondering why care about the rasterizer?  You should care because ray traced motion blur will inherently have a certain about of grain and it will never be super-duper fast.  For those projects with heavy motion blur, render time limitations, and perfectly smooth expectations, I welcome you to the world of scanline-based rasterization.

Technically speaking, the rasterizer achieves motion blur performance improvements over adaptive ray tracing by separating the shading component of sampling from the antialiasing component of sampling.  So, within a given frame, tessellated objects can be shaded, sampled, moved, and sampled again without the need for additional shading.  This resulting faster render time is because of the decreased amount of shading calls.  The resulting smoother motion blur is because the tessellation was essentially slid across the pixel/tile.  Despite these advantages, the result is not as physically correct as ray tracing which shades at every sample point.

You can read more about this in the mental ray documentation that comes with Maya.

It is also important to note that the scanline-based rasterization approach to rendering is not as efficient at tracing rays as a ray traced approach is.  For this reason the rasterizer will suffer with reflections and refractions while unified sampling will shine.

How to Enable the Unified Rasterizer

To enable the unified rasterizer you need to turn on unified sampling (currently implemented with string options) and switch the Primary renderer to “Rasterizer” (Render Settings > Features > Primary Renderer).

Antialiasing Rasterizer Controls

When using the unified rasterizer, you only need to consider one setting to control antialiasing sample quality: “samples max”

“samples max”
  • “samples max” replaces “visibility samples” aka “samples collect”.
  • While “samples max” acts as a limit in regular unified, here it controls the absolute number of antialiasing samples taken per pixel.
  • The value is truncated to the nearest square number of lesser or equal value. i.e. 16.0 → 16, 32.5 → 25, 99.9  → 81, 100.0  → 100, etc…
  • “production quality” lies somewhere around 25.0 or 36.0.  Use lower values for faster previews or higher values for difficult renders.
  • scalar, defaults to 100.0

Shading Rasterizer Controls

The main setting that you need to consider for shading sample quality is “samples quality”.

“samples quality”
  • “samples quality” replaces “shading quality” aka “shading samples”.
  • While “samples quality” controls error allowance between samples and pixels in regular unified, here it approximates the number of shading triangles per pixel.
  • A value of 1.o corresponds to about 1 shader call per pixel per time sample.  2.0 corresponds to 2 shader calls per pixel per time sample. 0.5 corresponds to 1 shader call per 2 pixels per time sample. Etc.
  • scalar, default to 1.0

Additional Shading Optimization

“time samples”
  • “time samples”/”time contrast” is also known as “samples motion”.
  • While “time samples” is ignored in regular unified, here it controls the number of times the tessellated triangles will be shaded over the motion blur shutter interval.
  • While it is beneficial to leave this setting at 1.0, sometimes it is necessary to raise this setting to avoid animation artifacts cause by dragging the shaded tessellations to create blur.
  • This is integrated in the Maya UI under Render Settings > Quality > Motion Blur > Time Samples.  scalar, defaults to 1.0
  • Note: this setting has a different meaning with the rasterizer than it does with AA sampling.  Similar to unified, each sample is QMC jittered in time when using the rasterizer.

“rast motion factor”

  • When enabled, “rast motion factor” allows you to raise or lower the amount of shading samples performed for fast moving geometry.
  • This allows you to limit shading samples where the detail would otherwise be lost in the blur.
  • Shading samples performed scale linearly with “rast motion factor” and the speed of the moving geometry.
  • scalar, defaults to 1.0.  0.0 is disabled.
Note: “samples min” and “samples error cutoff” are ignored when using the unified rasterizer. Jitter, however, is no longer ignored and should be enabled for increased optimization.

About bnrayner

I am a VFX developer specializing in 3d rendering. With a background in Physics and Digital Art, I enjoying using math to explain how light interacts with materials and to creating pretty pictures along the way.

Posted on November 24, 2011, in maya, rasterizer, unified sampling and tagged , , , . Bookmark the permalink. 13 Comments.

  1. Thank you Sir 🙂

    For still images the unified sampling is “overkill” ?Or we can still take advantage of it? I see its more towards motion blur stuff and vfx..

  2. Obviously VFX can leverage the motion blur and performance improvements of unified sampling, but the improvements are not VFX exclusive. Unified’s adaptivity and enhanced ability to resolve fine details should be applicable to everyone, especially as new materials and shaders are released that can take better advantage of the quasi-Monte Carlo core.

    As mentioned in a previous comment, mental ray offers an array of rendering solutions to meet different needs. The rasterizer, for instance, can provide fast and smooth motion blur for projects that require a lot of rendering in a short amount of time (such as special effects for TV). You may find that another mental ray mode, such as unified sampling or iray, is the rendering solution that best meets your need.

    As a VFX developer, the majority of my posts and examples may be geared towards those specific needs. However, the information presented is general to mental ray and I am sure people will be able to find useful tidbits if they read between the lines.

    Happy Turkey Day 🙂

  3. Hi, solid informative posts…

    I understand the advantages of unified over adaptive sampling, but I seem to be running into the same problem when I render using unified:
    Image looks great EXCEPT for my alpha edges… even when cranking up the quality way above recommended production values.
    I realize that settings are scene dependent, but this happens with all my scenes.
    Why is this happening?

    • Edges have been improved for mental ray 3.9.2. Unfortunately, Maya 2012 is only running mental ray 3.9.1, where the edges are not getting enough sampling. If you wish to get more frequent and up-to-date releases of mental ray inside of Maya (released with hot fixes and SAPs) you will have to complain to Autodesk — they decide what version to ship.

  4. I’m havin issue with unified rasterizer,
    It’s not rendering render passes … Can you confirm this ?

    Also, youre saying “there is no difference between how the regular rasterizer and unified rasterizer work”. What does this mean ? It the same algorithm ?
    My unified settings were max 512 quality 4, so I tried with regular rasterizer with 512 visibility sample and 4 shading quality. But the result is far away from unified rasterizer, it render faster but is much more coarse.

    And the output windows give me strange things,

    with unified max 512 and quality 4, it says :
    RC 0.10 info : option: scanline rast
    RC 0.10 info : option: samples collect 22
    RC 0.10 info : option: shading samples 4.0

    and with standar rasterizer with 512 visibility sample and 4 shading quality it says :
    RC 0.10 info : option: scanline rast
    RC 0.10 info : option: samples collect 3
    RC 0.10 info : option: shading samples 4.0

    There is something that I don’t understand …

    • Hey MiniZun,

      There’s no difference in how the rasterizer works internally. Unified Controls simply provide a central place for setting image sampling quality regardless of algorithm, be it raytracing or rasterization.

      Samples Collect 22 for max 512 is correct. It should estimate the samples closest to 512 (without going over) that has an integer square root. So 22 * 22 = 484 While 23 * 23 = 529 which is higher than 512. I do not know why standard rasterizer controls say samples collect 3 when you input 512 unless the Maya UI has a hard limit for samples collect.

      The bugs you mention were reported and have been fixed but I don’t know when it might make it to a future software version. If the fix is risky then Autodesk can refuse that fix.

      I think it was reported recently so SP2 won’t have it.

      • I found why there is this difference between unified rasterizer and standard. The visibility samples is the square root of the unified max sample. Setting 22 gives
        RC 0.10 info : option: samples collect 22
        RC 0.10 info : option: shading samples 4.0

  5. I forgot to mention the version, I’m using maya 2012 with mental ray (no hot fix no service pack)
    I will try with maya sp2 when I have time

    • Hey Hans,

      Those are definite bugs! I reported them a couple weeks ago and they have been fixed ( I believe). In the meantime just use the regular old rasterizer.


  6. Matthias Richter

    Hi Brenton,

    do you have any info on how to use the Unified Rasterizer in Maya 2014? Since US is activated using the Sampling Mode drop-down your approach implicitly rules out the use of the Rasterizer.



  1. Pingback: Unified Sampling « elemental ray

  2. Pingback: How to? ( Unified Sampling ) | Sandeep Kittur

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: