Maya 2012 Unified Sampling in mental ray

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Display Modes
  04 April 2011
Lightbulb Maya 2012 Unified Sampling in mental ray

Unified is QMC sampling across the image space. Unlike regular AA
where the pattern is somewhat like a grid, Unified is stratified based
on an optimal distance between samples that are moved based on QMC
patterns and an error estimation instead of just color contrast. This
means you can render small geometry like hair and fur using raytrace
instead of rasterizer with good results. The samples will catch
geometry smaller than a pixel generally with smaller sample
levels internally.

It also solves noise problems by generating its own adaptive grain. So
now depth of field and raytraced motion blur are faster to render and much
smoother.
(Sidenote: spinning chrome sphere's should no longer blur
reflections.) You can render raytraced motion blur. Motion blur is now
visually adaptive. You can ignore time samples under Unified. Areas of
low detail and flat color still receive minimum samples regardless of
blur amount. Memory usage for motion blur is now a fraction of the
original amount.

Three main controls:

samples min = the minimum samples used per pixel (values lower than 1.
will under sample) These are not a power function like regular AA. It's literal.
samples max = the maximum samples used per pixel
samples quality = the Unified control knob. More is better. Generally
1.0 is considered production quality. I occasionally have to go higher, 2 or 3
depending on noise/small details. 0.3ish is good for previews.

If you find motion blur or depth of field are grainy, increase max
samples. But for most things you can increase the quality knob and
leave your samples wide.

The Quality knob is now your control for rendering!

Basically: Set a set of sampling limits and then simply use Quality to make it look better.
You can use the diagnostics to see how/where your sampling is happening and make
decisions from there. Diagnostics are embedded into an EXR in different channels so
you still get your render unlike before.

Other controls:

sample error cutoff = when to stop sampling. Special cases where dark
areas can be ignored. This is a color threshold. Higher values begin
to tell the renderer to ignore lighter areas in the image as you
increase it. (Importance) It's very sensitive, rarely used.
samples per object = Object tags for sampling override. Same as
previous versions except the amount is literal. 1 3 means minimum 1
and maximum of 3 samples. It's not a power (4 min and 64 max at those
settings before).

Unified also controls the Rasterizer (Hence Unified's name).
samples max = visibility samples
and quality is shading rate.
You should find that you do not need the Rasterizer nearly as often or at all.

Also, turn off Scanline. This is a performance consideration. Scanline
On will slow you down and shouldn't be the default in Maya. There are
also three helpful new image diagnostics layered into the EXR when
rendering if you select "diagnose samples". These are: estimated color
error per channel, samples per pixel (literal number when you mouse
over it), and pixel time to render (also literal time in seconds) More on this
can be explained later.

Here is the mel to insert the string options:

select miDefaultOptions;
int $idx = `getAttr -size miDefaultOptions.stringOptions`;
setAttr -type "string" miDefaultOptions.stringOptions[$idx].name
"unified sampling";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].value "on";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].type "boolean";
$idx = `getAttr -size miDefaultOptions.stringOptions`;
setAttr -type "string" miDefaultOptions.stringOptions[$idx].name "samples min";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].value "1.";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].type "float";
$idx = `getAttr -size miDefaultOptions.stringOptions`;
setAttr -type "string" miDefaultOptions.stringOptions[$idx].name "samples max";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].value "100.";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].type "float";
$idx = `getAttr -size miDefaultOptions.stringOptions`;
setAttr -type "string" miDefaultOptions.stringOptions[$idx].name
"samples quality";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].value "0.3";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].type "scalar";
$idx = `getAttr -size miDefaultOptions.stringOptions`;
setAttr -type "string" miDefaultOptions.stringOptions[$idx].name
"sample error cutoff";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].value "0 0 0";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].type "color";
$idx = `getAttr -size miDefaultOptions.stringOptions`;
setAttr -type "string" miDefaultOptions.stringOptions[$idx].name
"samples per object";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].value "off";
setAttr -type "string" miDefaultOptions.stringOptions[$idx].type "boolean";

Technically "samples quality" is a color, but for most things making
it three values will be overkill.

Caveats: This is a first implementation and I find it is great for most things. You may
find that hard edges are not as defined as you'd like if you do Arch Viz. This is something
that has already been mentioned for improvement. Like anything else I expect continued refinement.
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.

Last edited by Bitter : 11 November 2011 at 06:29 PM. Reason: Formatting
 
  04 April 2011
This is good news for mentalray. Would you say this is similar to V-Ray's DMC sampler ? it sure sounds like it.
__________________
TUMBLR
BEHANCE
VIMEO



 
  04 April 2011
This previous post now has new results:

Why you should use Raytrace only

In mental ray 3.9 the results are:

Raytrace in 3.9:

RC 0.8 info : wallclock 0:13:16.14 for rendering
RC 0.8 info : allocated 642 MB, max resident 893 MB
GAPM 0.8 info : triangle count (including retessellation) : 16610880

Original Raytrace:

RC 0.10 info : wallclock 0:50:31.24 for rendering
RC 0.10 info : allocated 1092 MB, max resident 8963 MB
GAPM 0.10 info : triangle count (including retessellation) : 16610880
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
  04 April 2011
Quote: This is good news for mentalray. Would you say this is similar to V-Ray's DMC sampler ? it sure sounds like it.


It is and it isn't. The criteria and stratification are different than V-rays DMC.

For those of you that enjoyed Progressive's ability to resolve glossiness, etc, you will find Unified is similar if not better than that.

Unified is not exposed in Maya, hence the mel above. XSI already announced it will be exposed for its use in the Autodesk products.
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
  04 April 2011
Awesome!,
thanks for the heads up Bitter , this is exciting stuff for mentalray, can't wait.
__________________
TUMBLR
BEHANCE
VIMEO



 
  04 April 2011
That is a GIGANTIC difference !
Please excuse my ignorance but is there some more I can read about this, and this usable for animations ? (I haven't used MR for a while )
 
  04 April 2011
The technical side of the information exists in the documentation for mental ray 3.9. This is included with Maya.

Areas to look at: "What's New" and "Release Notes"

If you want more technical information on how Unified Raytracing operates then you can find a few things floating around from their Chief Scientist, Alexander Keller
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
  04 April 2011
This is great information. I look forward to trying out these new features once I can get a hold of 2012!
__________________
If animation is the illusion of life, then life is the illusion of reality.


"On ne sort pas DU REVE."

 
  04 April 2011
Additionally, thought I'd point out where the diagnostic.exr goes:

project/maya/renderData/mentalray/

Seems Maya doesn't know about it when it's created. Super. But I'm not on a final release yet.

*Edit: keep forgetting to mention, the images for samples and time use a literal value for 'S'. This means that samples min of 1 generates a white frame that hides the higher values, say samples max of 64, etc. You must lower your exposure to see the image represented. In imf_disp a good average value is -5.0 Then mouse over the image and the reading for S is the literal value for samples for that pixel. The same for the time buffer that reads in seconds per pixel. Now you have an idea of where the most time is being taken specifically.
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.

Last edited by Bitter : 04 April 2011 at 10:36 PM.
 
  04 April 2011
Sorry for the stupid question, everyone else seem to get it working fine.

I introduced the mel, but I can't find the unified controls anywhere!
Where are those supposed to be?
 
  04 April 2011
No problem.

It places the controls in miDefaultOptions under the String Options rollout. You can select the miDefaultOptions by going to the quick select box at the top menu bar, change it to select by name and type: miD* and hit enter.
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
  04 April 2011
Well thank you sir, though I just doubled my render times with this! lol
I'll have some good quality testing with the parameters and get back with results.
Thank you.
 
  04 April 2011
hey Bitter this works with OSX do you know? thx
__________________
LDEA Kon Kuatica
 
  04 April 2011
I notice a lot of people are increasing their minimum samples. Don't, keep them 1 or 2.

Max samples can probably be reduced from 64 in a lot of cases.

Also, for trivial scenes this may indeed increase render times because Unified is doing more work in the background resolving details. You will find the best performance is the more complex scenes. I can reduce render time and time spent tweaking much more as complexity increases.
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
  04 April 2011
Originally Posted by SePu: hey Bitter this works with OSX do you know? thx


This should work in any version of Maya 2012. It's a feature of mental ray 3.9 that's software related and not hardware (a la iRay)
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:39 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.