Announcement

Collapse
No announcement yet.

V-Ray Render Optimization - an in-depth Guide (call for Before/Afters)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • The DMC Calculator is just a tool to help show how many samples are actually being taken of your scene depending on your settings, and since all scenes are different and can have different needs, you cant judge if you'll get a good render based solely on the numbers alone.

    However, you can make some general assumptions based on the numbers it gives you, like:
    • If your DMC Samples Per Image Sample are both slammed down (ie - 1max / 1min), then you know that the Image Sampler is doing all the work resolving noise, and there may be room for optimization by balancing the workload between the Image Sampler and DMC Sampler.
    • If your DMC Samples Per Image Sample are both the same value (ie - 4max / 4min), then you know that there is no adaptiveness happening in your DMC Sampler, and it's behaving as if it were a fixed rate sampler... which you may or may not want happening.
    • The lower you set your color/noise threshold, the more you can assume that V-Ray will be reaching the max value of both the Image Sampler and DMC sampler for each pixel.


    Should we keep an eye on the min/max image samples or can we just look at the min/max of the DMC Per Pixel?
    The most important are the first two columns of values, the Image Sampler min and max (per pixel), and the DMC Sampler min and max (per image sample).
    Last edited by RockinAkin; 27-08-2014, 10:09 AM.
    Akin Bilgic | CGGallery.com
    Modeler & Generalist TD

    V-Ray Render Optimization
    V-Ray DMC Calculator

    Comment


    • I've been reading through all the posts/explanations of v-ray inner workings, and I'm just getting more and more confused. Can anyone explain how to effectively determine the initial DMC min/max subdivision on which all the later materials/lights/GI subdivisions will be based on. In the past week I was trying to optimize some heavy interior scenes which are solely lit by a HDR mapped dome light. It is the worse case scenario regarding noise levels/render times. If I dumb the render to a pure diffuse pass and start with the antialiasing settings optimization I can have 2 scenarios with the same quality outcome:

      1. Low DMC settings like 1/6 and high clr. treshold
      2. High DMC settings like 1/50+ and low clr. treshold

      The image quality/sample rate pass can be more or less identical.
      If I understood right, the first one will later on tend to a less adaptive render? So, why don't use a DMC setting of 1/50 or 1/100 from the beginning and then control the image quality by AA clr threshold?

      Using the optimization procedure suggested by Akin and Joconnell I still can't get a clean/acceptable render time result in the projects I mentioned earlier. Although my sample pass looks perfect, the image is still noisy and the only way to correct this is by lowering the AA clr. threshold to something like 0.003 or lower which then negates the whole procedure of controlling the AA and shading separately.

      No one explained how the "Min shading rate" affects this procedure? I can see no visual difference if left to 1 or put to 100.

      Perhaps I'm doing something wrong from the start. Should I untick "Divide shading subdivs"?

      Comment


      • Hi king max.

        One thing I would try in your case is to get rid of the hdri to light your scene but use the render you did with it to try to fake that lighting with standard directional lights and some vray area light. I think when optimizing render we must try to optimize everything, not just vray setting. Get rid of unnecessary polys or lights, and avoid time consuming lights like dome light and vray sun. also try reducing the size of your hdr map if you really want to use it. Or Maybe us it only for reflection and fake the lighting.

        Lowering render time is not just about changing vray settings.

        But about settings, I use a method that I can describe in a few lines: I always start from the same settings and I really rarely have to change any material, GI or light sampling to anything else than default 8 subdivs. I always leave the adaptative image sampler to 2 and 16. Then I tweak everything in the global DMC starting from those values:
        aa: .8
        noise t: 0.02
        global subdiv mult: 16
        min samples I always leave it to 8

        I start from there and I lower the noise threshold down toward 0.005 and rarely down to 0.001 and increase the global subdiv up to 24 or rarely 32. to remove noise. If it doesn't work, then I will try to increase maybe a problematic light or a single material reflection or refraction subdiv. targeting the culprit to increase only that one. this method is very fast to setup and had give me very good result for animation. also I always use image filter on with mitchell-Netravali.

        Try this and tell me how it goes please.

        That said I was really happy to discover Akin tutroial as well as Grant Warwick first lesson about the inner working of vray. I learned several things that I will surely use once I encounter a really problematic scene. My simple way of doing thing was just developped by trial and error but now I really know how vray works thanks to them.

        __________________________________________
        www.strob.net

        Explosion & smoke I did with PhoenixFD
        Little Antman
        See Iron Baby and other of my models on Turbosquid!
        Some RnD involving PhoenixFD

        Comment


        • If I were doing an animation, I'd certainly go with a sun/sky/portal lights combination. Here we're speaking of static renders for catalogue print which have to be flawless in terms of noise. I don't mind of high render times. I just wanted to better understand the philosophy behind the AA and DMC sampler.
          The method you described is the same that SolidRocks uses which relies on AA to clean up the image, ad in almost all the cases of dark complex interiors renders leads to a quick, but noisy render even if used on ultra settings.
          I wanted to get a straightforward approach to these kind of renders and simplify the lighting process as much as possible thus using HDR lighting as seen in the beautiful works of Guthrie and Benoit.
          Since almost all the scenes we work on uses the same amount of detail/glossy materials etc. I figured out I could get a good optimization and use it almost in any case.
          As I'm writing this I'm waiting for a 3k test render I launched yesterday that gives me 18 hours estimate on a single machine and it's not even at the quality level I'd like. I will post all the passes/settings in the next post so somebody perhaps could tell me if I did something wrong or it's just the scene.

          Comment


          • Okay you've asked a lot of questions so it's almost a case of rereading akin's tutorial or watching my video again but here's one important point:

            The sample rate is not the be all and end all of what good render settings are. By that I mean you can have a nice or correct looking sample rate pass but still have bad settings.

            For example, if you make a standard max scene with a teapot in it, give it 16 segments so it's smooth. No lights, no materials, just a teapot. Lets assign a default grey vray material just so we're both seeing the same thing. Leave your render at the default 640 x 480 and the default vray render settings of 1 / 4 aa and global dmc noise of 0.01. If you do a render you'll get a perfectly fine image, the edges are smooth and I'd consider that good enough for my image of a teapot. If we look at our sample rate it's got a fair bit of red around the edges so it means that vray is working at it's top level around a fair bit of the image. Personally I don't care so much since the final image is good and I've no render time problems. Now, lets try and fake our sample rate element to show that it can be wrong at times too. Let's change our global dmc noise threshold to 0.1 and re render. Now our image has bad edges in it so the rgb doesn't look good enough. If you go to the sample rate this time, it'll show much less red in it so if you were to judge your render by this in the same way myself and Akin do in our tutorials, you'd expect your render to be really nice and of course in this case it isn't. Let's go the other way and drop our global dmc down to 0.001 or something really fine. If we re render again we get a nice smooth image, similar to the 0.01 render but now our sample rate shows a lot more red again. Is this a problem? No, not really, all it's telling us is that vray is using more of the red or max AA in this render because we've told it that we want to hit a much higher quality render because of our much smaller 0.001 noise threshold. The thing is did it make the image any better? Not really either so I'd be happy with my 0.01 render, even if the sample rate isn't as flawless as some other renders I've done. Let's go the other way and make our sample rate more blue this time. Set your global dmc noise threshold back to 0.01, but this time set your aa to 1 / 50. If you render again you'll get a perfectly nice image and in this case the sample rate isn't showing any red at all. Is this a problem? Not in our simple scene where the max AA has no other materials or lights to mess around with. What the sample rate is telling you by having no red pixels at all is that nothing in the image is hitting the max AA value that you've allowed vray to use - nothing in the scene actually requires 50 AA samples to meet the quality you want. Is this a bad thing? Again not really if there's nothing else in the scene that the AA will mess with. Let's try and force vray to use our 50 aa samples now. Set your global dmc noise threshold to 0.001 again and re render. Now we're starting to get a little bit of red in our sample rate. By telling vray that you want to meet a much finer noise threshold, vray will work much harder on the image and gradually start to get closer to using our 50 max aa samples. Does this make our render much better? No, no real difference in the beauty pass so it's probably a bit wasteful. Has it made our sample rate better? Well, it's given us more of that blue and red look that I normally get with my tuned scenes but I'd be thinking who cares about a nice sample rate pass, the render with the noise threshold set to 0.01 was still perfectly fine and much faster, even though the sample rate element didn't have any red in it.

            The sample rate is just a tool to let you know which pixels in your image are hitting your max AA samples by showing you red. If you've got no red pixels at all then nothing in the scene is using your max AA values, that's all the information that the sample rate is really giving you. If you don't have any red pixels but your render actually looks nice and you're happy with the render time then great. If you've got a sample rate with no red pixels but your render is still noisy, it probably means that nothing in your scene is hitting whatever you have your max AA set to (a clue that it could be too high) and the noise is being caused by dirty lights and materials. If you've got your max aa set really high, then this could be reducing the material and light quality and then causing your noise, hence myself and Akin's preference for trying to find the right AA values before we start looking at our material or light sampling. If you've got red pixels all over your sample rate pass, then it means nearly everything in your scene is hitting your max aa value. Again as before, if you're happy with the render times and the final image quality then great - move on. In our teapot image if we set our aa to 1/3 and then the global dmc noise threshold to 0.001 and render we'll get a tonne of red. Does this mean our render is bad? Again no if you're happy with the quality of the beauty pass. In this case I wouldn't be as our max of 3 aa samples isn't good enough in my opinion to get nice quality edges. If we drop our noise threshold to 0.01 and render we get a nicer looking sample rate (again "nice" in the sense of myself and akin's tutorials) so if you were judging solely on the sample rate pass you'd think everything was fine - same as before though, I don't think the edges are good enough personally so I'd raise the max aa to 6 or 8.

            Definitely post up your passes and settings and let's see if there's anything we can figure out.

            Comment


            • Thx for the reply. I'll post the passes later on. I understand what you wrote and I think I red/watched all the videos/tutorials a dozen times now. I've started with a plane dull render and pinpointed my AA to 1/16 with a clr thresh of 0.01 and it looked perfect. The problem started when I introduced the light, GI and glossy reflections later on. Basically, even rising the dome light subdivs to 500 didn't clean up the GI pass and the sample rate and the render times obviously got higher. If i reduced the clr. threshold I would end up with a cleaner render but with even higher render times, because now the AA is struggling on cleaning up the image right? At the end I've ended up with an AA of 1/24 and a clr. thresh of 0.012 , mats/lights BF subdiv to 300, and the image is clean enough, but not perfect. The render times are a killer. To get a "perfect" image, I should lower the clr thresh to 0.01 wth another hit to render times. I forgot to mention the DMC settings which are 0.9 adaptiveness, 0.007 thresh, all the rest to default.
              Perhaps the scene itself just can't render faster, but I still think I could gain a 20% boost with better settings. Switching to IRR/LC and disabling the retrace option will half the render times for sure. Well, I hope we will be able to discuss it later on when I upload the passes.

              Comment


              • Originally posted by king_max View Post
                If I were doing an animation, I'd certainly go with a sun/sky/portal lights combination. Here we're speaking of static renders for catalogue print which have to be flawless in terms of noise. I don't mind of high render times. I just wanted to better understand the philosophy behind the AA and DMC sampler.
                The method you described is the same that SolidRocks uses which relies on AA to clean up the image, ad in almost all the cases of dark complex interiors renders leads to a quick, but noisy render even if used on ultra settings.

                I wanted to get a straightforward approach to these kind of renders and simplify the lighting process as much as possible thus using HDR lighting as seen in the beautiful works of Guthrie and Benoit.
                Since almost all the scenes we work on uses the same amount of detail/glossy materials etc. I figured out I could get a good optimization and use it almost in any case.
                As I'm writing this I'm waiting for a 3k test render I launched yesterday that gives me 18 hours estimate on a single machine and it's not even at the quality level I'd like. I will post all the passes/settings in the next post so somebody perhaps could tell me if I did something wrong or it's just the scene.
                For sure rendering for animation and print is different, but with my method you can eliminate noise if you want too. I don't rely only on antialiasing that much since my max is at 16 subdiv (64 samples) most of the time (far from universal setting which put them at 100 subdiv which gives 10 000 samples max!). So 64 is far from 10 000. And when I use area lights and directional lights, the result will looks absolutely the same (with some work in comp too). I just put more time setting up ligthing and less time rendering. You can see an example of fake GI that I did here (original here) and it rendered 5 times faster for a result that could be the same feeling with some more work in comp. I also forgot to mention I always check the check box "use DMC sampler thresh".

                I used my method to compare it to some renders based on akin method and it gave the same result in terms of noise free image but sometimes renders faster. If I can fake render intensive lights like vray sun and dome lights it renders a lot faster. What I hate is to have to rely on scripts to change all my scene parameters when 99% of time they can all stay at 8 and be changed by the global subdiv multiplier of the global dmc.

                If you want to understand the inner workings of VRay, I think the most important thing to learned with Akin Bilgic and with Toni Ratincevic and I guess with Joconnel too ( I still have to watch you video John) is that all the subdiv in the scene (set in lights, GI and material settings) get divided by the max subdiv of the image sampler (for each camera ray). but what Akin I think does not mention and Toni does is that this is considering only one primary ray. But when your scene needs more than one primary ray by pixels, the resulting subdiv for a specified material can still reach its originally set value. What we must understand too is that the same lights and GI and mat settings are also multiplied by the global subdiv multiplier (this one I knew!). So the increase of the image sampler max subdiv is not proportionally counteracted by the increase of the global dmc subdiv multiplier cause the first one considers only one ray but not the last one. I still have to see the result of this very important points in my daily routine.
                Last edited by jstrob; 17-10-2014, 07:22 AM.

                __________________________________________
                www.strob.net

                Explosion & smoke I did with PhoenixFD
                Little Antman
                See Iron Baby and other of my models on Turbosquid!
                Some RnD involving PhoenixFD

                Comment


                • Originally posted by king_max View Post
                  even rising the dome light subdivs to 500 didn't clean up the GI pass
                  Raising the dome light subdiv is for cleaning the shadow noise. To clean the GI noise (that you see only in the GI pass) you must increase the brute force subdiv or light cache subdiv (I always use 3000 for lightcache subdiv and it's important to note that this setting is not multiplied by the global dmc multiplier). Or just raise the global dmc subdiv multiplier to raise every subdiv of the scene at the same time except the light cache subdiv (other exceptions are photon map, caustics and aa subdivs).
                  Last edited by jstrob; 17-10-2014, 07:11 AM.

                  __________________________________________
                  www.strob.net

                  Explosion & smoke I did with PhoenixFD
                  Little Antman
                  See Iron Baby and other of my models on Turbosquid!
                  Some RnD involving PhoenixFD

                  Comment


                  • I misspelled that. I was referring to the lighting pass which with a dome light/HDRI light setup acts almost as a GI pass since it's illuminating the scene from all directions. I also mentioned that I know how to eliminate noise and get a clean result. I just wanted to be sure I was using the most optimized settings for this particular scene. I'm using vray for professional work more than 12 years now, both for stills and animation (not only architectural visualization) so I'm pretty sure I know all the various setup scenarios. I would usually stick to IRR/LC and get the job done. As of late I was reading Peter Guthrie and Bertrand Benoit blogs and decided to try and switch to BF/LC + HDRI to push the quality up. That said, I revised the old post from Toni, Akin and Joe and was compelled to try it on a different scene setup.

                    Comment


                    • Ok now I understand! with vray anybody knows how to eliminate noise cause it's very easy by lowering the noise threshold and pumping up sampling. What's difficult is to find ways to make our renders 5 times faster. For this we always have to learn and try different things. Trying other seasoned artists techniques like Peter, Bertrand, Akin etc is a very good way to learn.

                      Originally posted by king_max View Post
                      As of late I was reading Peter Guthrie and Bertrand Benoit blogs and decided to try and switch to BF/LC + HDRI to push the quality up. That said, I revised the old post from Toni, Akin and Joe and was compelled to try it on a different scene setup.
                      We definitely have the same readings these days! Yes BF_LC is the way to go for GI when we really need it (like when many object are bleeding their color on each other). And Irradience is only good when you need to use caching for a camera fly through for example.

                      Good luck.

                      __________________________________________
                      www.strob.net

                      Explosion & smoke I did with PhoenixFD
                      Little Antman
                      See Iron Baby and other of my models on Turbosquid!
                      Some RnD involving PhoenixFD

                      Comment


                      • Click image for larger version

Name:	Direzzionale_Comp_test.VRaySampleRate.jpg
Views:	1
Size:	483.9 KB
ID:	854424Click image for larger version

Name:	Direzzionale_Comp_test.VRayRawReflection.jpg
Views:	1
Size:	484.8 KB
ID:	854425Click image for larger version

Name:	Direzzionale_Comp_test.VRayRawLighting.jpg
Views:	1
Size:	490.6 KB
ID:	854426Click image for larger version

Name:	Direzzionale_Comp_test.VRayRawGlobalIllumination.jpg
Views:	1
Size:	455.1 KB
ID:	854427Click image for larger version

Name:	Direzzionale_Comp_test.RGB_color.jpg
Views:	1
Size:	482.9 KB
ID:	854428

                        Here are the passes of the scene. The same lighting could be achieved with a sun/sky solution, but this scene is huge and there are 14+ cameras to render of various spaces, so using an HDR really speeds up the lighting process. The outside is all 3D with high poly trees, bushes, grass etc which definitely have a huge impact on lighting and render times. I suppose the AA is set too high since it never reaches anything nearly the 25 max. Using lower AA with even higher subdivs for mats/lights and a noise threshold of 0.003 gave the same result with similar render times.

                        Comment


                        • Ok 14+ camera! That would be a little long to fake ligthing for each one. But if your deadline is near you may have no other choice but keep the hdr for reflection only and fake the lighting with rectangular vray light etc. (no sun/sky cause they are also too render intensicve). That solution would take less time than rendering everything as is. I use circular faloff map in the vray rectangular light to fake the sun. Or even a standard directional light if i need hard shadows.

                          One thing I would also try for your trees, bushes and foliage (that would work very well at least for this particular render) is to render a HDR of your outside 3D environment. You use a spherical camera and place it at the center of you environment and you render a spherical hdr that you can then use in place of you 3D trees and foliage for all your render.

                          I guess you are using Reinhard for your color mapping type. Did you try reinhard burn at 0.05?

                          as for the settings I would definitely try adaptative image sample min 2 and max 16 using dmc sampler thresh checked. then global dmc: aa 0.85; noise threshold 0.008, global mult 32, min sample 8. then everything in the scene at 8, except for all the material where we see noise, I would put their ref samplings to 64 and if you use light cache put it at 3000 subdivs. and if you see noise in the light, up the sample of this light to 32.

                          __________________________________________
                          www.strob.net

                          Explosion & smoke I did with PhoenixFD
                          Little Antman
                          See Iron Baby and other of my models on Turbosquid!
                          Some RnD involving PhoenixFD

                          Comment


                          • I forgot to ask you how big is your HDR map. You could try reducing it to see if the result stays the same (the render will be faster for sure). And maybe you can use different map size for reflection and for IBL. You can also blur your HDR to remove noise it will be easier for vray to resolve noise maybe.

                            __________________________________________
                            www.strob.net

                            Explosion & smoke I did with PhoenixFD
                            Little Antman
                            See Iron Baby and other of my models on Turbosquid!
                            Some RnD involving PhoenixFD

                            Comment


                            • Originally posted by Morbid Angel View Post
                              I wouldn't call this a win yet, look at the specular highlight on the tea pot, its much noisier, during animation this would be a problem.
                              That's just the Max Ray Intens option that is unticked. It's in Global Switches Tab in VRay settings.
                              Daniel

                              www.danieljhatton.com

                              Comment


                              • What settings should we use for fog? High/80 Subdivs?
                                Daniel

                                www.danieljhatton.com

                                Comment

                                Working...
                                X