Announcement

Collapse
No announcement yet.

DMC sampler

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

  • DMC sampler

    Hi,

    I use adaptive subdivision as image sampler all the time. Now I wanna try Adaptive DMC image sampler. It has better AA and produced better image quality in complicated scenes. But I have a problem about the noise from glossy surfaces.

    Its noisy and when max subdivs is higher, noise is more. Somewhere I read that the more max subdivs the more other subdivs is divided, so when max subdivs is 50 and glossy surface has 50 subdivs, there is only one sample per ray. Thanks to max subdivs, pixel can be divided 50 times for AA, so glossy samples can be 50 too (one sample for every ray). But for most situations its not divides by 50 and/or there is still too noise on a glossy surface.

    So I have to put a very low number in Adaptive Amount to use all max subdivs, but in this case adaptivnes and DMC sampler is for nothing i think. And/or use really low number in noise threshold like 0.002. And/or put a really high number in glossy material, but I have to use something like 200-400 and I think its too much.

    Dont know if I all understand right, I spent some days to understand DMC sampler and all the things with image sampler and how is it connected, so I hope so

    I use adaptive subdivision all the time and its straight forward and really easy to use, but DMC produced better image quality, textures, AA and so on, so wanna use it, but the noise in glossy really freaks me out Dont know, maybe 300 subdivs in glossy material with DMC sampler is nothing special

    Thanks for any tips.
    AMD TR 7980X, 256GB DDR5, GeForce RTX 4090 24GB, Win 10 Pro
    ---------------------------
    2D | 3D | web | video
    jiri.matys@gmail.com
    ---------------------------
    https://gumroad.com/jirimatys
    https://www.artstation.com/jiri_matys
    https://www.youtube.com/channel/UCAv...Rq9X_wxwPX-0tg
    https://www.instagram.com/jiri.matys_cgi/
    https://www.behance.net/Jiri_Matys
    https://cz.linkedin.com/in/jiří-matys-195a41a0

  • #2
    DMC sampler is quite complex and hard to understand in all what goes on under the hood. Without going too much into detail, you may explore these settings:

    Set all your lights to 128 subdivs
    Set all your shaders to 128 subdivs (in glossy reflection)
    Set your DMC sampler to 2/16
    Set your DMC sampler settings to:
    Adaptive amount 0.7
    Noise 0.01
    Global subdivs 2.0

    This should produce very clean render at most reasonable render time. The trick here is to work with the noise threshold and global subdivs, if for example your reflection still produces grain even after 128 samples, lower the noise threshold to 0.005 and this should help. If you get a very clean result, but the render time is very high, reduce the global multiplier to 1.0 and see if its acceptable.

    The idea is to get the most cleanest image first and work backwards to get the most ideal render time by reducing the settings until you reach the acceptable level of grain.

    Also keep in mind that, the reason you get good result with adaptive subdivision is that it forces to take all the rays into account, while adaptive dmc can mutate rays to compensate for areas where there isnt enough, thus producing more grain and longer render times, if there isnt enough initial rays (subdivs) to begin with on a given shader or light.

    Your shader is also important. How is it setup? does it have many textures in the reflection glossy channel? are they using blur of less then 1.0? Is the glossy value lower then 0.6? if so, expect the grain to be extreme in that shader, which will propagate the grain all around your image also, since those rays will bounce.
    Last edited by Morbid Angel; 11-06-2011, 11:42 AM.
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

    Comment


    • #3
      Originally posted by Morbid Angel View Post

      Is the glossy value lower then 0.6? if so, expect the grain to be extreme in that shader, which will propagate the grain all around your image also, since those rays will bounce.
      How do you usually deal with such a situation Dmitry?

      Which BRDF gives less noise at low glossy values like 0.6????

      Thanks
      jamie

      Comment


      • #4
        Its a fine balance my friend. If you start having a glossy value lower then 0.6, like for example 0.4, 0.3, then you might as well not have any reflection on the surface at all since it will be so dispersed that no reflected object will be visible in it and at that point the reflection contribution is nearly same as the diffuse contribution, yet from the rendering point of view the rays must be computed and bounced and their contribution taken into account by other surfaces etc.

        We found that blinn has the best result for glossy values. Lots of people prefer to use wards however for very blurry surfaces, and really nothing wrong with that, but its my understanding that those materials will need much more rays to get cleaner reflection.
        Dmitry Vinnik
        Silhouette Images Inc.
        ShowReel:
        https://www.youtube.com/watch?v=qxSJlvSwAhA
        https://www.linkedin.com/in/dmitry-v...-identity-name

        Comment


        • #5
          I also find that once you are below .6 - .5 then there's no real detail to worry about so I tend to turn on reflection interpolation. Do you find that helpful at all as well? It seems to speed things up, but I haven't tested it exhaustively or anything.

          b
          Brett Simms

          www.heavyartillery.com
          e: brett@heavyartillery.com

          Comment


          • #6
            you gotta keep in mind that we work with animation, and in that case interpl reflection would flicker most likely.
            Dmitry Vinnik
            Silhouette Images Inc.
            ShowReel:
            https://www.youtube.com/watch?v=qxSJlvSwAhA
            https://www.linkedin.com/in/dmitry-v...-identity-name

            Comment


            • #7
              Ah - that wouldn't have occurred to me Thanks/b
              Brett Simms

              www.heavyartillery.com
              e: brett@heavyartillery.com

              Comment


              • #8
                Thanks for some start settings, I will give it a try and see what I get.
                AMD TR 7980X, 256GB DDR5, GeForce RTX 4090 24GB, Win 10 Pro
                ---------------------------
                2D | 3D | web | video
                jiri.matys@gmail.com
                ---------------------------
                https://gumroad.com/jirimatys
                https://www.artstation.com/jiri_matys
                https://www.youtube.com/channel/UCAv...Rq9X_wxwPX-0tg
                https://www.instagram.com/jiri.matys_cgi/
                https://www.behance.net/Jiri_Matys
                https://cz.linkedin.com/in/jiří-matys-195a41a0

                Comment


                • #9
                  It's a difficult one indeed.

                  At the very base level, vray fires off one anti aliasing ray into your scene, that hits an object and then vray looks at the material properties of that object and how it's being shaded. For each time it hits the object, it'll look at how many material samples are being used in the material applied and then fire out that many rays to figure out it's reflections or refractions. If the result is clean enough, vray stops shading at this point, if not it goes up to the next level of anti aliasing - in this case 2 rays of anti aliasing. Since it's firing two rays of anti aliasing, this time it actually halves the number of material samples it uses (since it's using double the amount of aa rays) and does the same thing - if it's good enough, it stops, if not it goes up to 3 levels and so on. The AA rays seem to be the master controllers of your sampling in vray, someone please correct me if I'm wrong, setting every other level of sampling based on how many aa rays are being used.

                  So this is all very well and good, with vray trying to use the minimum amount of samples in every case to get the best result. However what I find is that it isn't always smart enough to find out where the noise is coming from and then adjust accordingly. Say you've got a scene with a really blurry reflection material in it, which is noisey as hell. Vray comes along as usual, fires a single, shades and checks for noise. This result isn't good enough so it ups it's aa to 2, halves it's glossy reflection samples as a result and then checks again. Again not good enough so it goes to 3 aa samples, but again thirds the material samples which ends up not being good enough. It may well be a case that the AA is working against you here, lets say it's actually the glossy reflection actually causing the noise. In this case you'd actually be far better off getting vray to use less aa samples which will in turn keep your material samples high, and if it's the reflection making all the noise problems, this'll get cleaned up far more efficiently than going through numerous iterations of increasing aa and reducing material samples would.

                  This is where your render elements come into play. If you turn on your lighting, reflection, specular, refraction and shadow passes, you'll be able to see each component as they are in the final image and be able to nail down where the noise is coming from. the samplerate element can also be useful to show you where is getting high aa samples (red) and where's getting low amounts (blue) and from that you can deduce that lower aa areas probably get more material samples.

                  If you've got a scene which is overall noisy, you can try using more aa for a start. If you've got a scene where you've loads of stair stepping or dirtiness on edges then use more aa. If you've got a scene which is overall noisy and lit by a hdr, you can try upping the samples of your dome light or your brute force samples. If you've got a scene which has noise on some materials, you can try using lower aa and higher material samples on the materials that are noisy. If you've got a scene where everything is nice and clean but you've got grainy motion blur, then up your motion blur samples. The exact same with DOF.

                  It's not the easiest thing in the world but the dmc can make your renders twice as long or half as long if you can find the source of the noise. I think there's a few things I'm unclear about so I don't have a final strategy about getting quick clean images, but hopefully vlado can shed some light on these.

                  One question from me - where do samples from lights fit in? Are they rays shot from the surface of the light itself per pixel? Or are they dealt with bit the camera rays hitting an object and then being traced to a light and taken from there? If for example an object is hit by a camera ray and that ray bounces towards the light, does vray look at the amount of subdivs per light and then trace that number of rays from the object towards the light?

                  Lots of questions

                  Comment


                  • #10
                    Morbid, your site is down in your signature by the way.
                    Colin Senner

                    Comment


                    • #11
                      Originally posted by joconnell View Post
                      If you've got a scene which is overall noisy, you can try using more aa for a start. If you've got a scene where you've loads of stair stepping or dirtiness on edges then use more aa. If you've got a scene which is overall noisy and lit by a hdr, you can try upping the samples of your dome light or your brute force samples. If you've got a scene which has noise on some materials, you can try using lower aa and higher material samples on the materials that are noisy. If you've got a scene where everything is nice and clean but you've got grainy motion blur, then up your motion blur samples. The exact same with DOF.

                      It's not the easiest thing in the world but the dmc can make your renders twice as long or half as long if you can find the source of the noise. I think there's a few things I'm unclear about so I don't have a final strategy about getting quick clean images, but hopefully vlado can shed some light on these.
                      this sums up some of the dmc problems really well. I found out that the "universal" approach can be sometimes really useful and easy to make it work, but quite often it creates more problems than it solves.

                      Comment


                      • #12
                        I have been trying out the method suggested by Toni Bratincevic @ http://www.interstation3d.com/tutori...yfing_dmc.html.
                        This method works great but takes a bit to get your head around. The first time I tried it I wasn't convienced and I didn't completely explore the concept but the second time around (about a month later) I was sold.

                        Basically you increase you're Adaptive Dmc Image Sampler Max value to 50. When you do this all the Subdivs on material and lights are divided by this number (50 in this case) when sampling, which will leave you with a number decimal number less than 1 which will be rounded up to 1. This means only 1 subdivs sample will be taken per eye ray. After that the Adaptive Dmc Sampler will kick in and start trying to reduce the noise until it hits the the Clr Threshold value. The problem with this is it takes along time.

                        So to counter act the High Adaptive Dmc Image Sampler Max value, we need to increase the subdivs on the Materials and Lights. Rember these value will be divided by the max number (50 in this case). So to get 8 subdivs sampled we need to input 400subdivs.
                        400 / 50 = 8
                        (This can be very strange to understand at first)
                        You could do this manually but I started to find this strange and annoying. So I decided to just globally multiply all subdivs by 50. By doing this I could still type in subdiv values that seamed familiar. (ie. 8,16,24,32)
                        Obviously mupltipltying subdivs globally will affect the Irmap HSph subdivs, so to counter act this I set this value to 2 (2x 50 = 100subdivs).

                        The one thing to remember to enable is sub-pixel mapping, as this will increase the render speed.

                        Some of the benefits of this method are as follows:

                        1. Reasonably fast vs qaulity
                        2. Your get the same colour pop with sub-pixel on as you do with it off
                        3. Reflections and lighting are superbly clean
                        4. AA works on areas where it should and leaves DMC Sampler to smooth out lighting and materials
                        5. Displacement works like a charm

                        Below are my settings:

                        Click image for larger version

Name:	Settings.jpg
Views:	1
Size:	391.8 KB
ID:	844116

                        I will post some image of these settings in action.
                        Design.Visualize.Create
                        www.phildarby.co.za + www.visoo.co.za
                        sigpic

                        Comment


                        • #13
                          I'll have to try that. Since reading that blog entry a while ago I have been feeling freer to use higher material subdivisions, but I can't say I really grasped the explanation till you laid it out so simply. Thanks!

                          Question about the noise setting, that I've never been clear on: following the Universal method I have always checked "use DMC sampler thresold" in the Adaptive DMC rollout, and basically ignored the CLr Threshold control. If you *dont* do that - like with your setup - do they both have an affect? If so, should they have matched values or how does it work then?

                          /b
                          Brett Simms

                          www.heavyartillery.com
                          e: brett@heavyartillery.com

                          Comment


                          • #14
                            I guess you could leave it check but what I have gauged so far is that there's a fine line between letting the Adaptive Dmc Image Sampler do it's work of AA,
                            and letting the DMC Sampler gather more samples to smooth things out. (If that makes sense)

                            This is a trial and error thing, also taking into account that you might need to add more subdivs per material or light.
                            When I get a chance I will try rendering a car at 4000px and will post results.
                            Design.Visualize.Create
                            www.phildarby.co.za + www.visoo.co.za
                            sigpic

                            Comment


                            • #15
                              In a way it's a very annoying one since each scene is going to have unique sampling needs - in theory the vray render elements can tell us a lot about where the noise it, I'd also like to see maybe an expanded sample rate element or even some better statistics in the render dialog to give us some hints.

                              Comment

                              Working...
                              X