We know mentalray comes with two samplers. The Unified Sampler and the (Unified) Progressive Sampler. Now mentalray for Maya plugin is setup so that it looks like Unified Sampler (US) is for final frame rendering while Progressive Sampler (PS) is for interactive rendering. Of course, it is not. The Progressive Sampler is not only able to deliver final frame quality but it is even faster than Unified Sampler doing that.
However, let’s start with mentalray Unified Sampler and see to what extent we can push it to render a fully glossy scene.
We start with some basic sampling settings. We simply put the Overall Quality parameter to 1 for the Unified Sampler and we use a fixed min:1 and max:1 for the Rombo.Metal shader (Sampling rollout).
Overall Quality 1, shading samples 1,1
This is the result. Beside the noisy output with just one ray shot per sampling call we don’t gather enough light so the metal actually looks very dark. So we gonna increase the metal sampling to a fixed min:2 and max:2. (When in rombo we keep both min and max at the same value, we switch to fixed importance-based sampling. When max value is bigger instead with go for adaptive importance-based sampling).
Overall Quality 1, shading samples 2,2
Now we see we gather much more light (reflections). Generally we should increase the shading samples until we don’t see any more light gathered. Here with 2 samples we end up having enough bright reflections. So now we have to simply smooth the result. To do that we have two ways. Increase the US Overall Quality or shot more samples from the metal shader. Let’s start with the former to see where we end up.
Overall Quality 2, shading samples 2,2
Overall Quality 4, shading samples 2,2
Overall Quality 8, shading samples 2,2
Overall Quality 12, shading samples 2,2
We see that with an Overall Quality of 12 we achive a smooth result. However our render time ends up being around 20 mins.
Now we start with the other strategy. We keep the Overall Quality fixed to 1 and we start increasing the local adaptive metal shading samples.
Overall Quality 1, shading samples 2,4
Overall Quality 1, shading samples 2,6
Overall Quality 1, shading samples 2,8
Almost there, however our render times are becoming too huge compared to the previous result. So we keep the previous 2-6 for the metal local shading samples and we start increasing the global overall sampling quality.
Recap. We saw how just increasing the mentalray global overall quality is not the best strategy because render times sky rockets at some point. The same as we increase only the shading quality. So we try to balance both of them for an overall faster and better result.
At this point, I generally put the Overall Quality back to 1 and go for manual adjustment of the Unified Sampler (de-check AutoSamples in the Quality render settings tab). Here for example I end up having a MinSamples:10 and MaxSamples:1500 for Unified Sampling. For the shading sampling I use the previous 2-6 (btw, that means we shot at least 2^2 samples and at max 2^6 samples).
OverallQuality 1, 10-1500; shading samples 2-6
And voilà. We’re almost 2x faster than with Unified Samping with fixed local sampling (ie. with MILA).
Now, let’s start with the last good settings we found for the Unified Sampler.
UnifiedSampling:: OverallQuality 1, 10-1500; shading samples 2-6
Then let’s see what we can do with the Progressive Sampler.
With PS the strategy is different. We cannot shot too many local samples because our progressive iterations need to be fast enough to keep up PS performances . Generally we need more and more iterations and faster and faster sub-frame renderings to unleash the PS power. Naively speaking, PS is based on the law of large numbers, we keep shooting a large number of rays to have more chances to converge adaptively our rendering.
So we start with an Overall Quality 1, 10-1500 and local shading samples to 2-4 (this is kinda the max shading samples we can set to work with Progressive.. anything bigger will just slow down the PS).
OverallQuality 1, 10-1500 and shading samples 2-4
Good, we’re almost 4x faster. However we still have a lot of noise. Now, we keep everything as before (Quality 1,10-1500, samples 2-4) but with start increasing the Overall Quality until noise disappears.
OverallQuality 4, 10-1500 and shading samples 2-4
Great, noise is gone but our render times are 4x, equalizing those with the Unified Sampler. So let’s see if for the same overall quality we can low down a bit the rombo adaptive local quality.
OverallQuality 4, 10-1500 and shading samples 2-3
Yakee, here we are, – faster render times for the same overall quality.
So as a final comparison we render with the above Overall Quality of 12 and Unified Sampler.
UnifiedSampling:: OverallQuality 12; shading samples 2-2
That puts Progressive Sampler with Rombo adaptive sampling almost 3x faster than the default sampling approach in mental ray. To say nothing that if we add motion blur and depth of field the gap will even increase.
As a recap. For Unfied Sampling.. setup Rombo adaptive sampler to render an overall good quality (generally 2-6 is already good enough) then simply start increasing the Overall Sampling to refine the final image quality (where generally a 10-1500 min-max samples are enough) keeping the Overall Quality at 1.
With Progressive Sampling is the same, only difference is that we use less shading samples to speed up iterations and then tweak Overall Sampling to have enough iterations to converge to a good quality result. Here we don’t need too much local adaptiveness so as above just a min/max of 2-3 is enough to provide good local samples but keep iterations fast. For distant from camera stuff generally a 2-2 is advisable.
Keep in mind that Rombo.Material (as opposed to metal and glass) being a shader for a more general usage when working with Progressive Sampling it will switch automatically to the best sampling strategy, what we setup under Material->Reflections->Sampling is engaged only for Unified Sampling while for Progressive it is automatically done (one can increase anyway the overall local material quality with the Progr.Quality param under the Advanced material rollout).
A final render with Progressive and Rombo adaptive sampler.