Announcement

Collapse
No announcement yet.

Refraction is hard to sample on CPU

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

  • Refraction is hard to sample on CPU

    Hi,

    I'm working on a glass object filled with liquid and noticed that it seems really hard to V-Ray to render this, especially with the CPU engine.

    Here are two renders of the same scene, with exactly same settings and materials. On the GPU version, the SSS and the Bercon Noise map used as bump aren't taken in account. The global depth is 20 on both engines.

    Click image for larger version

Name:	A_CPU_5min.jpg
Views:	1
Size:	223.7 KB
ID:	885501
    Click image for larger version

Name:	A_GPU_5min.jpg
Views:	1
Size:	125.3 KB
ID:	885502

    Difference is quite visible and the CPU has really hard times to correctly render the scene. The GPU on his side, is really fast as usual and do 90% of the work in less than a minute. But the difference
    I found the CPU really slow on this case so I did another test without refraction this time.

    Click image for larger version

Name:	B_CPU_5min.jpg
Views:	1
Size:	101.3 KB
ID:	885503
    Click image for larger version

Name:	B_GPU_5min.jpg
Views:	1
Size:	95.2 KB
ID:	885504

    There is again a difference but way more subtle this time, in fact, the artifacts of .jpg files are enough to hide the little noise of the CPU version.


    So the refraction computation seems to be the real bottleneck for the CPU engine. Is there any workaround other than reducing reflection/refraction depth to cut down render times ?



    Hardware used :
    CPU : 5960x@$4,2Ghz
    GPU : MSI GTX 980 @ stock

  • #2
    So you're using progressive in each I take it? Have you tried the other variants just to see what times were like?

    Either way does seem like a scene where denoiser would do well, regardless of GPU/CPU.

    Comment


    • #3
      Yeah, sorry I didn't make that clear. Progressive for CPU and GPU doesn't give the choice.

      I haven't tried the adaptative sampler but I suppose the result would be quite similar, maybe with a little less noise with the help of Min Shading Rate. I will try.

      The denoiser could do a great job in some cases, like on the floor in this scene, but I'm not sure it could retrieve missing informations in glossy reflections. Anyway, it's a great tool when bruteforce power is lacking

      Comment


      • #4
        It's true that it's not going to retrieve anything that it doesn't already have, but it's not bad at guessing and connecting the dots IMHO. Give it a try though because I don't see a lot of thin details in your example in the trouble areas. There are a lot of cases where you can use even the lightest preset for denoise and get that last bit of grain/noise out without any noticeable lack of detail many times.

        Here is a horrible example using GPU progressive and denoise running the first pass on default. I think it does a fairly good job in most cases but it will drop out where there arenot enough samples (cube in the upper right for example). I'm sure on the second pass it wouldn't have dropped those areas and then the lower denoise settings could be used.

        That said, it doesn't really answer your question does it? I'm betting that the your GPU is just that much faster/better at getting to that many paths traced in the same time. What's the path trace number for each?

        Sorry for the side track on my part. I'm kind of a fan of denoise and trying it out on everything and anything just to see what it does and where it breaks.

        Click image for larger version

Name:	No Vray denoise.JPG
Views:	1
Size:	153.9 KB
ID:	863671
        Click image for larger version

Name:	Vray denoise.jpg
Views:	1
Size:	266.2 KB
ID:	863672

        Comment


        • #5
          No problem, the denoiser is a really cool feature and since it's available I don't set the noise threshold as low as before, which is great. But complex scenes with hard-to-sample materials, many lights or indirect lighting scenarios are greedy of computation ( and so in hardware :'( )

          Your scene is a perfect example of the usefulness of the denoiser ! Did you try with CPU ?

          I tried with the bucket mode, 5 minutes again.

          Click image for larger version

Name:	A_CPU_bucket_5min.jpg
Views:	1
Size:	476.0 KB
ID:	863679

          And I tried the denoiser on a progressive render. Like I thought, there isn't enought pass to let the denoiser properly does his job. Maybe 10 minutes more of rendering would be sufficient.

          Click image for larger version

Name:	A_CPU_denoised_5min.RGB_color_denoised.jpg
Views:	1
Size:	144.6 KB
ID:	863680


          So yes, I suppose it's just the GPU that is more powerful than my CPU and traces many more path in the same amount of time. But it's not visible this much usually, so I am surprised. ( will check the numbers )
          Last edited by John_Do; 29-09-2016, 02:05 AM.

          Comment


          • #6
            My bad quick test was done using the CPU for progressive rendering and the GPU for denoising. I don't use CPU denoiser because it's so much slower than the GPU one even with my horribly slow 660 gtx. Denoiser is set to use the GPU by default.

            You're right with that one test- the first pass wasn't enough. You can set the threshold/time for when it tries to denoise higher too. I would actually just leave the timer as is, but on the lowest denoise strength- this will not slow down render times too badly and will give Vray the info it needs so that you can come back when you're render is nearly done and experiment with what denoise settings work best for the shot/scene.

            I can't tell you why, because I don't really know, but some things are just faster on the GPU- denoising and progressive rendering seem to be two of them. Someone more knowledgeable on the subject will have to weigh in.

            Comment


            • #7
              Originally posted by GidPDX View Post
              My bad quick test was done using the CPU for progressive rendering and the GPU for denoising. I don't use CPU denoiser because it's so much slower than the GPU one even with my horribly slow 660 gtx. Denoiser is set to use the GPU by default.

              You're right with that one test- the first pass wasn't enough. You can set the threshold/time for when it tries to denoise higher too. I would actually just leave the timer as is, but on the lowest denoise strength- this will not slow down render times too badly and will give Vray the info it needs so that you can come back when you're render is nearly done and experiment with what denoise settings work best for the shot/scene.
              Great advice, I don't get used to use the denoiser during rendering, but always at the end. ( yeah, I'm a bit dumb)

              Until now it was more a way to get rid of that last bits of noise more than a way to cut down dramatically render times.


              Originally posted by GidPDX View Post
              I can't tell you why, because I don't really know, but some things are just faster on the GPU- denoising and progressive rendering seem to be two of them. Someone more knowledgeable on the subject will have to weigh in.
              Maybe I have a clue

              Click image for larger version

Name:	comparison.png
Views:	1
Size:	358.0 KB
ID:	863698

              I have to do more tests with indirect lighting scenarios but I will seriously rethinking the nature of my next hardware purchase.
              Last edited by John_Do; 29-09-2016, 09:50 AM.

              Comment


              • #8
                Well, that's fairly good evidence that the GPU is faster, though the times elapsed is different. Would be interesting to see how long the CPU takes to reach 1 path/pixel reached, or just how many kpaths after the same exact time.

                Are you running a 980 or is it a 980ti?

                When I'm testing denoising and I just want to make sure it gets the last little bit of noise, I just leave the RE for the VFB set to "RGB color denoised". Nothing will appear until the first phase is reached, and then I just wait and see if it takes a second phase etc.

                The progressive for GPU and CPU seem to work differently too for denoising. Normally denoiser works better on the CPU rendering at lower quality than the GPU version- I have no idea why though.
                Last edited by GidPDX; 29-09-2016, 10:23 AM.

                Comment


                • #9
                  Out of interest have you tried to compare that with Modo render?
                  In my testings I found that Vray does a very good job as long as you don't need refractive shading. Especially with lot of bounces 20 and up. While Modo somehow deals with that quite fast and good, even if you just have 8 bounces, Vray kind of get lost in sampling AA. Progressive is a solution, but you don't need GPU, its also good on CPU.
                  I remember that 8 years ago when switching to Modo render I solved a problem scene where the Camera looked through several layers of glass by rendering it in Modo. Hope so, there is a better solution.

                  Comment


                  • #10
                    Originally posted by GidPDX View Post
                    Well, that's fairly good evidence that the GPU is faster, though the times elapsed is different. Would be interesting to see how long the CPU takes to reach 1 path/pixel reached, or just how many kpaths after the same exact time.

                    Are you running a 980 or is it a 980ti?
                    Yes it's faster, but this is valid only for this scene on this particular case. It would be interesting to make a scene and a real test protocol to compare in a extensive way CPU and GPU engines.

                    I have a single 980, a MSI model.


                    Originally posted by Robert View Post
                    Out of interest have you tried to compare that with Modo render?
                    In my testings I found that Vray does a very good job as long as you don't need refractive shading. Especially with lot of bounces 20 and up. While Modo somehow deals with that quite fast and good, even if you just have 8 bounces, Vray kind of get lost in sampling AA. Progressive is a solution, but you don't need GPU, its also good on CPU.
                    I remember that 8 years ago when switching to Modo render I solved a problem scene where the Camera looked through several layers of glass by rendering it in Modo. Hope so, there is a better solution.
                    Interesting, I haven't though to use Modo renderer. I will try, I 'm really curious to see if there are significant differences.
                    Last edited by John_Do; 29-09-2016, 12:55 PM.

                    Comment

                    Working...
                    X