Announcement

Collapse
No announcement yet.

shadow grain

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

  • shadow grain

    I'm noting quite a bit of grain in my shadows even though I have the Nederhorst settings (min:1 Max:100, threshhold:0.005, fully adaptive DMC). With those settings, it was my understanding that there was no need to set the subdivisions on the lights since these are overriden by the render global settings. But I am still getting a lot of grain on the soft shadows for vray sphere and rectangular lights. I am not seeing this on the Maya lights since I can increase the quality on the ray trace shadows directly there. I did try to set the adaptive sampling to .85 (the default) and then increase the subdivisions of the vray lights from 8 to 128 with no visible change. What am I missing here?

    p.s. to keep things simple I have 1 vraymaterial on all objects, with zero reflections, just lambertian diffuse. GI is off.

  • #2
    You do need to set higher subdivs on the lights. I normally have DMC sampler sub-divs mult=0.01 (which I think is consistent with the Nederhorst settings). To get grain free lights I usually bump each light's subdivs to 400 (usually I'm using rect and dome lights). I think this gets multiplied by the DMC setting to give an actual value of 4. Interestingly, this also improves render times, which might not be what you would think, but it does!

    You may also want to experiment with changing your fully adaptive DMC to around 0.85 (I think this may even be the default). Adaptive is great, but sometimes it seems that the DMC sampler benefits from a higher number of initial samples so that it does not have to work as hard to get under the noise threshold.

    Comment


    • #3
      Are you noticing the noise when you color correct your image, or just in the beauty by itself?

      Comment


      • #4
        Originally posted by Metzger View Post
        Are you noticing the noise when you color correct your image, or just in the beauty by itself?
        In the beauty.

        Comment


        • #5
          Originally posted by djx View Post
          You do need to set higher subdivs on the lights.
          Hmm, my understanding was that using the Nederhorst/universal settings made tweaking the subdivs of individual lights and such unnecessary as long as the adaptive sampling was set to 1.0 (=100%). Is that incorrect? I'm basing this off of the video tutorial by Andrew Weidenhammer, but perhaps I misunderstood him. He says:

          "if it's set to zero then you'll have to set all your monte carlo random sampling objects like area lights or reflective and refractive glossy settings... manually... mental ray style, which is a pain. Fully adaptive DMC allows vray to take that over."


          Originally posted by djx View Post
          I normally have DMC sampler sub-divs mult=0.01 (which I think is consistent with the Nederhorst settings).
          I assume you mean that you set the threshhold to .01, rather than the multiply which would be set to 1. I actually had it at .005 (meaning increased quality) and was still getting noise in the shadows.

          Comment


          • #6
            Originally posted by sharktacos
            my understanding was that using the Nederhorst/universal settings made tweaking the subdivs of individual lights and such unnecessary as long as the adaptive sampling was set to 1.0 (=100%)
            I think the idea with the universal settings is to trade off some optimisation for a simpler approach where "everything is a noise problem", but they are not necessarily the best settings in all cases, and if you know a bit about how the dmc sampler is working you can get better results with some fine tuning. In some setups the "noise problem" is just too much for these universal settings to deal with in a reasonable time so you can help it out by increasing the subdivs on the lights, and making things not totally adaptive.
            Originally posted by sharktacos
            I assume you mean that you set the threshhold to .01, rather than the multiply
            No, I did mean the Settings|DMC Sampler|Subdivs Mult (also known as vraySettings.dmcs_subdivsMult). I normally set this to 0.01 which multiplies all the shader and light subdiv settings by this number. This has the effect of overrriding any subdiv settings from the shaders and lights so that it is all controlled by the DMC sampler. This is kind of what you want. However in the case of things like rectLights and domeLights I have found that if I increase their subdivs to something like 400 (or higher) then two things happen. I get way less grain in the light soft shadows and render times decrease. Same if I decrease adaptive Amount from 1 to 0.85, quicker renders and smoother glossy reflections.

            These are easy things to test, and usually I play a bit with the numbers because different scene lead to different "sweet spots".
            Remember that with vraySettings.dmcs_subdivsMult=0.01, then setting the light subdivs to 400 is really only like setting them to 4 (ie 0.01x400).
            Similar things happen with vray dirt samples. You'll need to put these really high to see a smoother effect when using universal settings.

            I found this document very helpful in explaining some of the mysteries of the DMC.
            Last edited by djx; 24-05-2011, 09:47 PM. Reason: more info

            Comment


            • #7
              Thanks for your detailed reply djx. I'm not yet following why you would want to set the multiply to .01. Wouldn't that mean that you are drastically lowering the overall sample quality?
              I can see how that would increase render speed, and how you could then add subdivs to lights and such as needed, but I don't think it would solve my particular problem since I already have the subdivs for my light at 128 with the mult at 1. If I set the mult to 0.1 I would need to set the light subdiv to 12800 to get the same results (which would still have grain since the values are identical). I suppose I could crank the lights subdivs even higher, but I thought 128 was already quite a lot, and was surprised to see grain.

              Comment


              • #8
                I suppose everyone has their own variation on the "universal" or "Nederhorst" settings. This is to be expected given that there are so many options in the vray settings (several GI methods which can be used in either primary or secondary calculations for a start).
                I'm taking the brute-force primary, light-cache secondary combination. My approach is largely based on a gnomonology tutorial by Chris Nichols called "Speed VS Quality In VRay". On this subject it is the best tutorial I have seen so far and it changed the way I approached things considerably.

                The idea is that by setting the mult to 0.01, it no longer matters what values have been set in lights or shaders because they are simply being multiplied to their lowest possible setting. This can be important if you get a scene where someone was using some different method, since it saves you having to inspect and modify individual shader/light subdivs settings. Then in the Image Sampler you choose Adaptive DMC and set min=1, max="a high number", say 24 or 48, and threshold to a low number. I think this last part is pretty much what everyone thinks of as the "universal" method. You then adjust the threshold and let the Image Sampler (using DMC) adaptively subdivide to reduce the noise below the threshold or until it uses the maximum samples.

                And my previous post was just about my observations that you can help the DMC sampler reach the noise threshold more efficiently if you give it more to work with by adding back subdivs on lights that create soft shadows. I have found this to be true in many of my scenes. Once you find the sweetspot (which is usually rectlight subdivs around 400 to 600 for me), it is quite a measureable difference in speed and quality - and gains in both - which is the surprising thing, since normally it would be one or the other.

                David

                Comment


                • #9
                  Hi there. I keep planning to do another video on just this subject. Just been too busy.

                  The document that David (djx) possted a link to was key to understanding the Adaptive Amount setting.

                  A simple way to handle it is to reduce the adaptive amount a bit from 1.0 to .9 or so. That way, the subdivs you place in lights, shaders etc have some effect. Manually increasing the light subdivs that you know is giving you noise can really speed up the render. So a large area light that has noisy shadows, can be pumped up to something like 400 like djx says. Say a .9 adaptive amount that means the light subdivs will only initially cast 10 percent of it's set subdivs. if set to 8, it would be less than one sample, but for the minimumAdaptiveSubdivs setting which keeps it at 8. If you set it to 400, the light will get an initial 40 samples, which is actually a pretty good rate, maybe higher than you need. 256 (thus 25 subdivs) might be plenty.

                  This really has an effect when dealing with Fog, and AO. I couldn't get good and fast fog renders or AO while using pure nederhorst settings, since the DMC sampler is not always where you want to do your glossy sampling. Sometimes certain effects need more samples at the get-go. Namely very large area lights, fog, AO.

                  Hope this helps.

                  Andrew

                  Comment


                  • #10
                    @sharktacos: I've been experimenting with one of my scenes where a very large rect light is creating some wide soft shadows that looks a bit grainy. Its not bad grain, and I kind of like the "film grain" feel anyway. Normally I start with the ImageSampler Adaptive DMC min=1,max=24,thresh=0.01. In fact that is usually my production settings. It is definitely a trade off between accuracy (less) and speed (more), but usually acceptable. I tried increasing the ImageSampler Adaptive DMC max subdivs to 48 (everything else the same), with the expectation that it would reduce the grain. In fact it had the opposite effect. I guess more subdivs makes it more accurate, but to get back to the level of grain that I had before I had to lower the thresh to 0.005 which had the expected result of doubling the render time.
                    In this case, the visual difference between the image taking 3 minutes and the one taking 6 minutes was barely noticeable and certainly not big enough that I would waste the time.
                    Anyway, just thought I'd mention it. Maybe you could try using much lower max samples and a higher threshhold to see what happens.

                    Comment


                    • #11
                      Thanks for thr great comments everyone!

                      I'm getting it to work with the following settings:
                      Adaptive DMC: Min:1 Max:25 thresh: 0.01
                      DMC Sampler: Adaptive .9 Mult: 1
                      VraySphere Light: sudivs: 500

                      I'm just surprised that I need to make the light's subdivs so high to get soft shadows, which does crank up the render time.

                      Comment


                      • #12
                        Just remember... when you have AdaptiveAmt set to .9, you are tossing 90% of the light's samples at the get-go. The light samples at 500 are really only using 10% of the initial setting. So 50 subdivs. That's somewhat high, but not unusual. Probably a large light.

                        If you were to render the same image cleanly using dmc only... you might need a max subdivs of 50 or above, and a threshold of .003. That would be close to your equiv image quality, but would take way longer than adding some more subdivs to the offending light.

                        so you say longer render times, but you're comparing a noisy image to a clean image, right? Not really a fair comparison

                        Glad to help, hope it's looking awesome!

                        Andrew

                        Comment

                        Working...
                        X