Announcement

Collapse
No announcement yet.

Understanding DMC Sampler

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

  • Originally posted by vlado View Post
    The subdivs multiplier will take into account the local subdivs for the particular effect (reflection, GI etc) and only multiply that by the given multiplier. The shading rate will force the subdivs to a value that causes the given number of samples to be taken for each shading hit, regardless of the particular AA settings.

    You are correct that you can achieve both of these effects simply by adjusting all subdivs everywhere to suitable values. However it is not always clear what the values should be, and I myself don't have the patience to go through every material/map/light/etc every time I change AA settings. Also, I find it much easier to control the render quality from one central place.

    However the main reason for the introduction of the shading rate is the new progressive sampler - without it, it would be really tricky to control the render quality.

    Best regards,
    Vlado
    Got it. Thank you. That makes a lot of sense and will allow me to focus our internal testing a little more pointedly with that in mind.

    Comment


    • I thought to post here, but then i preferred to start a new thread, given there's a script which wasn't built around EXACTLY what's in here, but rather personal experience.
      I won't link it here, as it'd feel like spamming, but you can find it in the general section with me as a thread starter.
      Lele
      Trouble Stirrer in RnD @ Chaos
      ----------------------
      emanuele.lecchi@chaos.com

      Disclaimer:
      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

      Comment


      • Originally posted by vlado View Post
        The subdivs multiplier will take into account the local subdivs for the particular effect (reflection, GI etc) and only multiply that by the given multiplier. The shading rate will force the subdivs to a value that causes the given number of samples to be taken for each shading hit, regardless of the particular AA settings.

        You are correct that you can achieve both of these effects simply by adjusting all subdivs everywhere to suitable values. However it is not always clear what the values should be, and I myself don't have the patience to go through every material/map/light/etc every time I change AA settings. Also, I find it much easier to control the render quality from one central place.

        However the main reason for the introduction of the shading rate is the new progressive sampler - without it, it would be really tricky to control the render quality.

        Best regards,
        Vlado
        I totally agree with a central place to control all subdivs! Even with scripts it's a pain when you have dozens of material, maps and lights. "one to rule them all"

        But why is the min shading rate at 2 by default? If I use dmc sampler should we set it to 1?

        __________________________________________
        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


        • Ok I could not wait for Vlado to answer so I found the answer myself just by playing with the amazing Akin's DMC calculator. And I strongly suggest every vray users stop playing video games and start playing the DMC calculator instead. It' s a lot more fun when we start understanding something so complicated! http://www.cggallery.com/tutorials/dmc_calculator/

          The answer to my question is that I will set the minimum shading rate to 1 at all time and not use it. Cause what I want is to control 4 values: the min and max per pixel primary sample (aka image samples aka antialiasing) and the min and max per pixel secondary sample (aka DMC samples). And I don't need the MSR to control those values exactly.

          I fact I think I just really understood why it's so important to separate the primary samples from the secondary samples. I am also wondering if I should stop using the adaptative amount. Cause I don't really need that one either to control those 4 values exactly.

          To understand the MSR (Min. shading rate in the Image Sampler (Antialiasing)) we must first understand it's relation and difference with the GSM (Global subdivs mult. in the Global DMC)

          The difference between MSR and GSM is that...

          ...the MSR will raise the number of times the max primary sample is multiplied to give the max number of secondary samples per pixel only starting when it is higher than what the other setting are resulting by themselves (because this value is setting a minimum so if the value is already higher than that minimum it will not be changed). So it's a minimum raising a multiplier (max samples multiplier).

          ...but the GSM is a multiplier. So it directly multiply the same value (the values multiplying the number of image sample to give the max secondary samples values). So it's a multiplier multiplying another multiplier.

          To sum it all the MSR is a minimum raising a multiplier and the GSM is a multiplier multiplying that same multiplier. So if you put the GSM to 1 (no effect and it's the default value) the MSR will start having an effect as soon as you raise it to 2. but if for example you set the GSM to 8, the MSR will have no effect until you raise it from 8 to 9 cause the multipliers are already at 8 from the GSM.

          We also must understand that when raising GSM or MSR, the multiplier for the min secondary samples by pixel will also raise once in a while because that one depend on the max sec sample multiplier via the adaptative amount.

          But again maybe you will not understand what I just wrote until you start playing with the DMC calculator by raising the GSM or the MSR slowly on after the other and seeing the effect on the multiplier and resulting max and min samples per pixel.
          Last edited by jstrob; 21-10-2014, 06:32 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 jstrob View Post

            To sum it all the MSR is a minimum raising a multiplier and the GSM is a multiplier multiplying that same multiplier. So if you put the GSM to 1 (no effect and it's the default value) the MSR will start having an effect as soon as you raise it to 2. but if for example you set the GSM to 8, the GSM will have no effect until you raise it from 8 to 9 cause the multipliers are already at 8 from the GSM.
            Are you sure you wrote this correctly? I only half-understand this stuff, but it seems like you wrote GSM twice in the last sentence (quoted above) where you should have written MSR.

            such as:

            but if for example you set the MSR to 8, the GSM will have no effect until you raise it from 8 to 9 cause the multipliers are already at 8 from the MSR.

            Comment


            • Originally posted by davision View Post
              Are you sure you wrote this correctly? I only half-understand this stuff, but it seems like you wrote GSM twice in the last sentence (quoted above) where you should have written MSR.

              such as:

              but if for example you set the MSR to 8, the GSM will have no effect until you raise it from 8 to 9 cause the multipliers are already at 8 from the MSR.
              Ok yes thanks you are right davision I just correced it in the preceding post. But the correct sentence is:

              "but if for example you set the GSM to 8, the MSR will have no effect until you raise it from 8 to 9 cause the multipliers are already at 8 from the GSM."

              And I know it is very difficult to understand before you just start playing with the calculator and understand correctly where the calculation comes from by reading the notes inside the calculator. for example just set the GSM to 8 in the calculator and raise the MSR unit by unit by pressing the up arrow that appears next to it and you will understand better how the values are playing together.

              And this example works with the following values:
              Attached Files
              Last edited by jstrob; 21-10-2014, 06:42 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


              • Also about the adaptative amount I can't stop using it cause it is not only related to the calculation we see in the calculator but also to the importance sampling. Importance sampling is a sampling method that takes into account the importance of the pixels in the image based on factors such as brightness and distance. If a pixel is brighter for example it is given a higher importance and thus receive more samples. If we set adpatative amount to zero the importance sampling will stop.

                __________________________________________
                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


                • dmc! i will never understand you. this is the most anoying thing in vray to get noise-free renderings in a fairly time...
                  www.vis-art.de
                  www.facebook.com/visart3d

                  Comment


                  • Understanding the sampler is a trip down a deep rabbit hole, and may not be just for everyone.
                    But to get clean, quick renders in V3, you really need only to do this:
                    *)Set your AA to the minimum EDGE quality you need (fixed-4, for example, or 16 rays per pixel to find objects in the scene, and proceed to anti-alias their edges).
                    *)Render with default subdivs everywhere, and find the most noisy bit in your shot, proceed to draw a region around it in the Vray VFB.
                    *)Raise "Min Shading Rate" by increments of 8 (8/16/24/32 and so on) until the region is clean.
                    *)Remove the region, and render for final.

                    This will be the absolute quicker speed for the given cleanliness of both edges and shaders/lights.
                    Adaptivity will stop VRay in areas that are clean, and let it work in those which aren't, while limiting the Camera Rays (ie. your AA) will make sure render times won't shoot through the roof.
                    Any deeper optimisation will provide diminishing returns, and should be avoided unless you know exactly what's going to happen (to the degree where you can see the maths numbers with your eyes open.).

                    Give it a try.
                    Lele
                    Trouble Stirrer in RnD @ Chaos
                    ----------------------
                    emanuele.lecchi@chaos.com

                    Disclaimer:
                    The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                    Comment


                    • Originally posted by jstrob View Post
                      If we set adpatative amount to zero the importance sampling will stop.
                      Which is MUCH quicker in shooting a precise number of rays than doing so WITH adaptivity.
                      Lele
                      Trouble Stirrer in RnD @ Chaos
                      ----------------------
                      emanuele.lecchi@chaos.com

                      Disclaimer:
                      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                      Comment


                      • Originally posted by ^Lele^ View Post
                        Which is MUCH quicker in shooting a precise number of rays than doing so WITH adaptivity.
                        Your last but one comment is confirming the method I've been using since Vray 3, so pleased about that! But the above comment, so you would set the adaptive amount to zero, and would you also not change the min samples?

                        Woudl I be right in thinking you dont use adaptive AA anymore, just fixed? Or do some scenes speed up with vray allowed to step up?

                        Comment


                        • Originally posted by m_hinks View Post
                          Your last but one comment is confirming the method I've been using since Vray 3, so pleased about that! But the above comment, so you would set the adaptive amount to zero, and would you also not change the min samples?
                          Min samples will be overridden by MSR anyway.
                          It's there more for a maths need than to be used as a sampling-forcing device.
                          As i understand it, it's there to allow for a stable average of the rays' values within the adaptive kernel, in case all the sampling is very low across AA, shaders and lights. In other words, it needs at least two other rays to establish an average value against which to check for variance for the current ray (you'll notice it doesn't go below that), and i'd assume more than the default is probably not leading to a much stabler average (diminishing returns).
                          abs(kernel average-current ray) is what we call "noise threshold".

                          Woudl I be right in thinking you dont use adaptive AA anymore, just fixed? Or do some scenes speed up with vray allowed to step up?
                          Hardly ever, yes.
                          It's ofc faster to shoot one camera ray to begin with than 16 (with fixed-4, for instance), however the time spent shooting those rays is negligible, up to a point (16, for example), because MSR, when high enough, won't have the camera rays do the additional work of spawning specialised ones, nor the noise thresholding for the AA part will have to be processed (fixed, hey! ^^), so they will go quick enough to negate the possible issues with shooting less.
                          Note this is a PERSONAL PREFERENCE.
                          Your mileage WILL vary.
                          Lele
                          Trouble Stirrer in RnD @ Chaos
                          ----------------------
                          emanuele.lecchi@chaos.com

                          Disclaimer:
                          The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                          Comment


                          • Thanks Lele,

                            Your preference is held in high regards! Just on the adaptive amount, I'm still not clear what you might typically set this to?

                            Comment


                            • Normally, no lower than .5, as some it's always welcome to stop my mistakes (say, i forgot a very glossy reflection with many bounces...).
                              However, now that (in the nightlies at least) the exact number of RPP can be read on shaders and lights, i'd say casting 64/128 (non adaptive/adaptive) RPP is more than enough for most circumstances, whatever the Cam ray settings needed.
                              Ofc, higher RPP are obviously good if one needs to clean the hardest of effects (and golly, have we not plenty of those now, with raytraced SSS, volumes, and whatnot.), and raising subdivs on the shader enough will override the MSR values, allowing for custom sampling anyways.
                              Lele
                              Trouble Stirrer in RnD @ Chaos
                              ----------------------
                              emanuele.lecchi@chaos.com

                              Disclaimer:
                              The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                              Comment


                              • Nice, and I like that in the nightlies they have increased to use of the display of samples.

                                Comment

                                Working...
                                X