Render Optimizer script for max 2012

I discussed progressive sampling in the previous post. Thorsten Hartmann and Artur Leão has collaborated on an "Über-script" for handling a ton of stuff. Torsten calls his variant "Render Optimizer" and can be found on this link:


The Render Optimizer does a lot more than just turn on unified sampling, and Thorsten has several tutorial on the various subcomponents.

If you are overwhelmed by the number of tabs on Thorstens version, Artur also independently has a slightly different version on his site, called "mr Options Manager", which you can find here:


I will be updating this post w. some tricks-and-tips myself shortly.
For now, Enjoy Thorsten and Arturs cool work!



2012 and Unified Sampling

Hello World!

The new 2012 versions of the Autodesk products Max/Maya/Softimage are upon us, and they are loaded up with mental ray 3.9.

One of the cool new features in 3.9, which doesn't seem to be exposed in some of the products, is "unified sampling".

The new "Unified Sampling" is a new way to choose which and how many samples (i.e. "rays") are shot into a given pixel, and what position in space AND TIME those rays have.

This becomes very significant as we discuss motion blur.

For anyone who have read the Samples Tips page over at lamrug.org knows that mental ray normally shoots rays roughly in a grid (but with jittering, so it is not exactly a grid) which it subdivides adaptively as needed, and for motion blur, mental ray actually (in the default raytracing case) shoots multiple rays into the same spatial position, but with different temporal positions (effectively rendering the subpixel sample at more than one position in time).

An image from LAmrUG.org

Now, Unified sampling unifies (hence the name) spatial and temporal sampling. Each ray has it's own space AND time sample. And not only that, the convergence of both is adaptive, so you simply set a lower limit on the amount of rays (say, 1) and an upper limit (say, 100) and simply turn a quality knob. This tries to adaptively resolve any noise from any source, be it soft shadows, glossy reflections, or motion blur with the SAME oversampling scheme.

Sounds nice, eh? So it's a pity it wasn't included in the 3ds Max UI, isn't it?

Luckily, the FEATURE is still there, and can be reached via Scripting.

In the Beta team, a set of people generated scripts to solve this issue (there are even several), and here are a few places you can download such scripts:

Arthur Leão and Duncan Howdin cowrote this script (pictured above) which you can download from Arthur's site
at http://dimensao3.com/al/ (file itself here)

It allows you to set the parameters and by doing this improve render times with motion blur and quality of quasi-random effects such as soft shadows and glossy reflecitons more easily than in the past.

These scripts utilize the MaxScript exposure of mental ray "string options". A problem with the string option MaxScript feature is that it the state of string options is NOT saved with the .max file. However, Arthur has solved this isse with a callback in the script ... or somesuch magic, I suck at MaxScript myself... ;)

Thorsten Hartmann (Infinity Vision) wrote another version which he has posted at http://www.infinity-vision.de/blog/unified_sampling which also contains some information and test renders.

Enjoy Unification day!