VRay 3.30 sampling tutorial ?

Hi all,

I recently switched to last VRay 3.30.05 and I am looking for valuable tutorials to learn a good sampling method for this new version.

So far I used to render my scenes using John O’Connell and Akin Bikgic approaches as seen here: http://www.cggallery.com/tutorials/vray\_optimization/ and here: Sampling for Arch Vis renders in vray 2.4 but with this new build I am a bit confused about the fact that:

_ there is no VRayPhysicalCamera anymore
_ there is no need to manage subdivisions manually anymore

A big thanks to you in advance for your help,

Regards

So in short:

Use your min and max aa to control the quality of your geometry edges and texture quality - somewhere like 1 / 16 or 1 / 24 should cover everything. Use the minimum shading rate to control your light quality, gi quality (brute force only) and material quality. Rather than going into individual light or material subdiv settings, you just use the shade rate control which tells vray how many material light and gi rays you’d like to take for each aa ray you’re taking. It’s quite like akin’s calculator although rather than needing to use a combination of your max aa, adaptive amount and material / light subdivs per aa ray vray is going to take after all the division nonsene is finished, you just type in the specific amount you want in the shade rate and that’s your lot. Lastly use the colour threshold in the image sampler to control how fine a quality you want rendered. This number means something different from vray 3.2 so a render at 0.01 in 3.3 may look dirtier than before. 0.01 or 0.005 should be okay for final bits.

Do the usual render practise with your sample rate on. If you’re using motion blur or dof, turn them on early as you’ll be controlling their quality using the max aa control. Keep raising your max aa til you get the edges looking as nice as you need them to be. If your edges are too noisy and you keep raising the max aa but it’s having no effect, take a look in your sample rate to see if there’s any red at all. If there’s none, then your colour threshold in the image sampler isn’t low enough to make vray work to a finer level. If you’re at 0.01, try 0.008, then 0.006 - any change to this number works far more evenly than it used to in 3.2

Last thing is your shading - once your aa’s okay, take a look at your reflection, lighting and global illumination channel and if you see noise, gradually raise the shade rate which will get vray to take more shading samples for each aa sample and it’ll clean up these channels.

Should be a good start!

Thank you so much John: you pull me out of darkness ! I will try this approach on my next production project for sure.
Thank you again !

Vlado’s run through in video form - https://www.youtube.com/watch?v=tKaKvWqTFlw

book marked

in the youtube vid Vlado sets the Global Subdivs Multiplier to 0, however with ‘use local subdivs’ unchecked that option is set to 1 but greyed out?

how does vray treat this in this instance?

Use local subdivs unchecked pretty much sets all the individual subdiv levels to a tiny amount so you’ll end up only relying on the shade rate value. Global subdivs multiplier set to 0 does the same thing as any of your light / material / gi subdiv values multiplied by 0 brings them to 0 and again you’ll only be getting samples based on whatever number you’ve set in the shade rate.

In Vlado’s video, he uses the global subdiv thing just in case someone sends him a scene with one or two settings that have such huge numbers that they’re higher than what the shade rate will do - it’s kind of a way for him to wipe down someone’s scene really quickly!

Hi,

Finally I found some time to test this approach with VRay 3.30.05. And I am a bit disapointed because, although your explanations and Vlado’s video are quite straight forward, I ended up with a not that perfect render. Indeed, as soon as I use the resulting passes in a compositing software, it becomes quickly unsuable because of excessive noise, mostly on the reflection pass.

Here is what I did: I started to model a simple scene pretty much like John video’s one. That way I am sure I will have to deal with tiny geometry edges, glossy reflections and smooth shadows. Then I followed the method explained here. As I wanted the cleaner possible result, I ended up with these settings:

_ Adaptive image sampler, Min Shading Rate: 6
_ Min/Max AA subdivs: 1 / 24
_ Color threshold: 0.003
_ Global DMC untouched (Min samples 16, Adpative amount 0.85, noise threshold 0.005)

I didn’t want to wait to long for the render to finish so I went for IM + LC but I activated the Detail enhancement. IM settings: subdivs 200, inter samples 60, Detail enhancement set to 10 cm for the radius (World scale) and Subdivs set to 1.0.

The scene is lit by a VRaySun + VraySky (Hosek et al.), one IES Target Light on the background and one VRay Plane Light on the foreground.

The render is quite pleasant with almost no noticeable noise, but when looking carefully we can see some noise in the GI pass (on the corners where the detail enhancement does the job), and also some noise on the reflection pass especially on the wall. The wall material is very straight forward: Blinn shader with Fresnel reflection set to 1.7 and Glossy Reflection to 0.55.
We can see some noise on the foreground shadows in the related VRayLightSelect pass.

My problem is that I can’t get rid of that noise even by raising the Min Shading rate or lowering the color threshold.
So I’m stuck with these noisy passes.

I attach the wire viewport screenshot, the RGB, Reflection SampleRate and GlobalIllumination passes so you can see what I’m talking about.

I would like to hear your advice guys,

Thank you in advance,





So your dirtiness in the GI is down to the shade rate not being high enough to clean out those corners or the subdivs in the detail enhancement. With 200 subdivs in the irmap does detail enhancement make a significant difference? Have you got “use local subdivs” turned off so you’re only relying on the shade rate? If not you could locally up just thhose gi subdivs. For the reflection pass, I presume that’s the raw reflection? I’m not sure what percentage reflectivity is being used in the final material - the reflection filter might be knocking it down to a very small amount of reflection which would put it below the colour threshold you’re asking vray to work to!

Same thing as a lot of these things, just force more shade rate rays in!

Thank you again John for you reply !

I investigated my scene again and it appears that, when I enable the Detail Enhancement, no matter how high I set its subdivs or how high I set the Min shading rate, it is just impossible to get rid of the noise in the GI where the DE is involved. I just don’t understand that point. And yes, I checked that “use local subdivs” is ticked off. Anyway, I had to find a solution to get a clean GI so I decided to disable the DE, I increased the IM subdivs to 300, and lowered the interp. samples down to 20 and the result is very satisfying: sharp GI without any splotchs. Of course I have to pay it with longer calculation times but I think I found a good trade-off between speed and quality, and it is still faster than BF calculations so I’m now happy with my GI :slight_smile:

About the reflections: I showed you the RawReflection pass and, indeed the noise was due to the ReflectionFilter telling VRay to early stop calculations because of weak involvement in the final image. Now, if I raise up both the material Reflection and the Reflection Glossiness, there is very less noise in the RawReflection pass (I don’t touch the Min shading rate here).
So you were right on that point, thank you again !
But I noticed something weird on my tests: when I increase the Min shading rate value, reflections become smoother for some materials (that’s logical), but surprisingly, they become worse for other materials … For instance: the reflections on the ceiling get regularly better and better as Min shading rate increase from 6 to 384 but the reflections on the floor only start to become better when Min shading rate reaches 192, and not before (please look at the screenshots attached). That does not seem logical to me.

Another question I have about sampling quality is why don’t you care about Adaptive amount and Noise threshold ?
In my tests, I found that lowering the Adaptive amount to something like 0.75 and Noise threshold to somlething like 0,003 gives less noise than the default values of 0.85 and 0.005 (obviously given a fixed Min shading rate value).

One last thing I don’t understand with VRay 3.30.05 is that I rendered images with various subdivs values for my VRaySun and Photometric Target light, but it does not have any effect. Only the min Shading rate affects shadows noise so why the subdivs are still accessible for these 2 particular lights ?

Thank you a lot for sharing your knowledge and experience with us, and for your patience to read me, it is very much appreciated :slight_smile:





I am limited to upload only 5 images per post. Here is the last one (MSR = 384)

I’ll do a better reply to this in the morning, could you pop up your raw lighting or lighting pass if you have it?

Sure, here they are: RawLighting passes with MSR set to 6, 96 and 384



wow I’ve never tried raising MSR that high ! worth trying I guess :slight_smile:

Cool to see you there Nicolas :sunglasses:
Like always, it’s very much depending on quality you want to achieve and time you can afford for that. These values are experimental, I guess I wouldn’t go that high for production renders.

Good that you found something - irmap is still very useful! I’ll be doing a canyon flythrough for some film shots so I’ll probably be using irmap for it! DE is something I’ve never used personally, it seems like a useful option for stills to get localised sharp details but it seems like something that’d be problematic for animation, which is my main area. As you said you’d tried to up DE quality with both shade rate and subdivs (I presume use local subdivs was on for that test, otherwise it’s ignored)

This could be kind of silly but the only thing I could think of on that (and why I wanted to see the raw light) is that the ceiling is getting to reflect the floor which is cleanly hit by direct light and the floor’s reflections are of the sky outside - it’s quite a direct path to a clean source. The Floor on the other hand has to reflect the ceiling and none of the rays hitting that, either light or reflection are from quite as direct a path. If a reflective surface reflects a cleanly sampled surface, it’ll more likely be clean - if it has to reflect a noisily sampled surface, it’ll probably be noisy. The other thing is what bounce of the reflection it’s calculating from also - again the ceiling might be getting it’s sampling from the first reflection bounce, the floor might be tying to sample reflections of reflections :smile:

The noise threshold is still very relevant with the shade rate workflow, I’ll have to do some tests with adaptive amount though. Adaptive 0.85 with the old dmc used to mean 15% of your rays were always taken and for the remaining 85%, keep testing after each ray to see if you’d met the quality asked for with your noise thresh. Lets do a quick example with wrong numbers but right ideas.

Lets say I do something stupid like use aa 1/4 and use light samples of 400 on something. We’ll pretend adaptive amount is 0.5 So we get our usual division thing happening where the 400 samples get divided by our max 4 aa so 100 samples per round of aa (again not accurate numbers, lets just go with the idea). Say for example our lighting takes a total of 301 samples to clean up perfectly. So we go through our render - aa 1 gets us 100 samples on our light which isn’t good enough, we go up to aa 2 which gets us another 100 samples but again 200 samples isn’t good enough, then up to aa 3 and 300 samples - again just short so up to aa 4. If we need to get to 301 samples and we’re getting another 100 when we hit our aa 4 cycle, here’s where the adaptive amount becomes relevant. For our example we’re at 0.5 adaptive for this. This means we’re going to always use 50% of our rays regardless if they’re needed or not and then 50% are going to be used adaptively. The problem with larger adaptive amounts (and I’d imagine this is where Vlado is hesitant to use big numbers for MSR) is that we only need 1 more sample to get our clean result but because of a high adaptive amount we’re taking another 49 samples we don’t need as well.

To me it’s probably a tough one to get right. Again if you’ve a scene that needs 200 shading rays to clean up, having an 0.85 adaptive amount means that for 85% of the rays, you’re taking a sample and then doing a test to see if the result has reached the noise threshold you want. This test has got to have some kind of overhead which will slow your render time so are you better off having less adaptivity so you can get up to your 200 samples quicker or are you better off having more adaptive testing and being able to stop sampling earlier? Similar to the example before, you using the minimum shading rate of 384 meant that for whatever your last aa ray was, you may have taken 384 rays when you only needed another 10 - that’s the trouble with optimizing :smile:

The guys might have forgotten to disable those when “use local subdivs” is turned off - it’s that way for me in vray 3.304 anyway.

Always glad to - any time I explain something I have to think about it myself and figure out clear ways to explain it, hopefully I get better at putting ideas across each time :slight_smile:

Thank you so much for the relevant explanations John: I can now go on a clear basis with last VRay :slight_smile: