Announcement

Collapse
No announcement yet.

Sampling and material Subdivs

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

  • Sampling and material Subdivs

    So, I've been working with vray for many years now and it's still a mystery. I had nothing to do at work a couple of weeks back and took time to study vray , trying to understand it better. I watched all 10 hours or so of the "V-ray For Architectural Visualization" DVD and got a bit confused.

    My experience tells me that when using the Adaptive DMC sampler you need about 10-20 Max subdivs and at most 0.005 threshold to get good results. On the DVD, he explained about supersampling and that he used 6 Subdivs at the most for final renders.. As I said, I got a bit confused, so I began trying his theory. I've been working like this for our project at work, and a project I'm doing at home, and I just can't get good results with only 5-6 max Subdivs...

    First I tried min 2 and max 5 subdivs for the DMC sampler. It works fine when sampling edges, but when sampling glossy reflections it's not nearly enough. I tried increasing All my material subdivs alot (30-40) and still didn't get good results. And by now the rendertimes was the same as with 8 subdivs per material and about 12-18 max DMC sample subdivs.

    Finally I ended up with a mix of both theorys. Around 20 subdivs per material and max 12 subdivs for the image sampler. But I'm still confused.. I've read about it in the online manual, various articles and threads, and in the ultimate vray guide.

    Can someone enlighten me? What do you guys use? Do you use max 8 subdivs per material and push the sampler to about 20 max subdivs, do you go higher on the mateial subdivs or is there another way to get smooth reflections and good AA with low DMC subdivs?

    I hope you understand what I'm confused about
    http://www.cgpro.se - Portfolio

  • #2
    I've found that aa samples are quite bad at cleaning up glossies so you're better off using low aa and high material samples. 1 / 4 is fine for getting your edge sampling looking good unless you've got difficult lines or complex geometry so that's aa done, then it's just a case of bringing up the material subdivs to clean up your glossies. It all depends on what portion of your scene is actually using glossy reflections too and what causes all of the noise.

    The more you increase your aa samples, the less material samples it'll use and I find that aa samples are quite inefficient at cleaning up glossies - not very intuitive but give it a go!

    Comment


    • #3
      for me it depends on the scene type.. for animation i invariably use high AA to clean everything, since i need high aa to avoid geometry shimmer in distant shots, and with the aa high enough, the glossies are usually clean. in stills as JoConnell says, you can usually get away with lower aa subdivs, so it makes more sense to use local subdiv settings, since those will only add processing time to the specific effect that needs em.

      if youve got lots of different glossy effects on top of each other ( dof/ glossy refs / ao/ area lights) its sometimes quite hard to pinpoint where the grain is coming from, and in that case, unless im after the last percentage of speed, ill usually clean with aa too, as its much less setup time.

      Comment


      • #4
        Yep. I normally use render elements to break everything down into spec, ref, lighting and gi and it gives me a better idea of where the noise is coming in. The sample rate element can give you an idea on where in your frame is using high aa (red) and low aa (blue) too so you can start working out if you've got a low aa area with high noise and so on. I'd love to have the sample rate element split into one channel for aa, one for materials and one for shading but I'm not sure if this is possible or even how vray works.

        Comment


        • #5
          i think probably by now everyone has seen this link, but just in case... its the most in depth explanation ive seen of how vray actually works.. read it 3 or 4 times and it starts to make sense...


          http://www.interstation3d.com/tutori...yfing_dmc.html

          Comment


          • #6
            Originally posted by super gnu View Post
            i think probably by now everyone has seen this link, but just in case... its the most in depth explanation ive seen of how vray actually works.. read it 3 or 4 times and it starts to make sense...


            http://www.interstation3d.com/tutori...yfing_dmc.html
            Yes this is a great tutorial about the theory how DMC Sample works.
            for my blog and tutorials:
            www.alfasmyrna.com

            Comment


            • #7
              I see why you read it 4 times..

              Damn, I didn't know that the DMC sampler worked that way.. I wonder why this tutorial is the only one that brings up the way DMC handles secondary rays.. it's so complex, and not at all how I thought it would be. I don't know where to begin experimenting..
              http://www.cgpro.se - Portfolio

              Comment


              • #8
                the simplest explanation i can come up with (and ive yet to recieve cnfirmation that i understand correctly) is this:

                if your dmc sampler max rate is higher than your material/effect subdivs, then the max sampling rate for those effects will then be equal to the dmc aa max rate, not the local sampling settings, since the dmc aa -must- take minimum one sample for each glossy effect for each aa sample.

                so if yer subdivs are 8 and your aa max rate is 30, theres no point increasing your local subdiv settings, unless its to above 30.. id love confirmation that im right (or wrong :O.) on this...?

                Comment


                • #9
                  probably depends if your dmc aa is linked to the dmc noise threshold or not...

                  Comment


                  • #10
                    Hmm, if I understood that correctly, I think your right

                    The number of secondary rays are devided by the number och primary sample rays, if I understood the article. If you got 50 material subdivs and 5 Max sample subivs, only 50/5=10 secondary rays per primarey ray will be used to calculate one pixel - And Max 5 primary rays, which depends on your threshold and adaptive amount setting.

                    If the sample Max rate is higher or equal to the Material subdivs, then only one secondary ray per primary ray will be calculated, which will be equal to 8 since thats the minimum number of samples put in the DMC sampler. Which is what you said.

                    Am I wrong or right? I hope someone knows this and can correct me if I'm lost.
                    http://www.cgpro.se - Portfolio

                    Comment


                    • #11
                      Originally posted by fAEkE View Post
                      Hmm, if I understood that correctly, I think your right

                      The number of secondary rays are devided by the number och primary sample rays, if I understood the article. If you got 50 material subdivs and 5 Max sample subivs, only 50/5=10 secondary rays per primarey ray will be used to calculate one pixel - And Max 5 primary rays, which depends on your threshold and adaptive amount setting.

                      If the sample Max rate is higher or equal to the Material subdivs, then only one secondary ray per primary ray will be calculated, which will be equal to 8 since thats the minimum number of samples put in the DMC sampler. Which is what you said.

                      Am I wrong or right? I hope someone knows this and can correct me if I'm lost.
                      Correct... but if DMC Subdiv Max is equal (or higher) to material subdivs then you are not using Min samples, you are basically using only 1 glossy reflection ray per pixel... and whole adaptive and noise setup is basically ignored because at that point you are controlling everything with color threshold. Min sample works ok till the point where for material you have at least number of glossy rays that's equal to Min samples (per one eye ray), or higher.

                      I need to update that tutorial when I have time, I have some ideas how to extend it and make some explanations more easier to read.
                      www.interstation3d.com

                      Comment


                      • #12
                        Ah ofc, thanks for taking your time and reply. And thanks alot for the tutorial! I just have to figure out how to use this new information
                        http://www.cgpro.se - Portfolio

                        Comment


                        • #13
                          After some testing I have another question.

                          I was rendering a car interior yesterday and tried different settings to get my final quality. I used 2, 5 as DMC sample subdivs with 0.008 as threshold to try and get an adaptive solution based on light and material subdivs. All other DMC sampler settings default (Global subdivs, adaptive amount and min samples). I have alot of area lights in the scene, but only 4 of them, plus a HDRI dome light are used as main, so I made my tests with them. In the end, I ended up with 24 subdivs for all materials, and 48 subdivs for the lights.

                          Now to the point. I first tested with a non reflective material and then I only needed to use 48 subdivs for the HDRI dome and 8 for the rest, no problem. But when applying the actual scene materials with reflections, I had to use 48 subdivs for all lights to get a good result. Why is this, and how does it work?

                          I have read the article again, and I don't understand why you would put subdivisions for each light.. material subdivs are easy to understand. An "eye ray" hits the material and secondary rays are taken depending on the material subdivs. But how does light subdivs work? The eye ray hits the material and secondary rays searches for lights.. but how many rays? As many as all light subdivs in the scene? And why do I need so many subdivs to get a clean reflection.. the light is just a plane with one value all over it... should'nt need all thos samples?

                          I feel stupid, but I don't get it hope someone can explain
                          http://www.cgpro.se - Portfolio

                          Comment


                          • #14
                            with direct lights, the rays go the opposite way, from the lightsource into the scene, hitting surfaces and illuminating them. the eye rays (or reflection or gi etc) then hit the areas illuminated by the direct light rays and take a brightness value from those surfaces.. thats why you can use em without GI. with self illum materials or lights with "store with imap" enabled, its as you described, with rays propagating from the camera out into the scene until they hit the light source. thats why you dont have subdivs for a light material (unless its in "direct light mode")

                            this is also why small objects with vray light materials on them make your scene blotchy, as you need an awful lot of rays until enough of them hit the light source to give a stable lighting approximation.

                            regarding subdivisions for lights, its all about the area shadows.. to calculate a correct shadow you need to evaluate all points in the scene from all points on the surface of the light.. to do this accurately you need a lot of individual rays.

                            also if i understand you correctly, to get a clean reflection of a vray light on a reflective surface, youd need a lot of material subdivs since the contrast between areas reflecting the light (way brighter than white) and the rest of the scene (typically below 100% white) is very high, so the grain is very contrasty.

                            Comment


                            • #15
                              Right, so the sampling works both ways?

                              Material refl and refr subdivs works as described in the the article. Eye rays from camera and then splitting into secondary rays. While light subdivs work the other way around, rays shot from the light splitting into secondary rays, and both primary and secondary rays will then be traced to the camera.. strange..

                              To get clean reflections I had to use high light subdivs, that was what I meant and what I don't understand. Should it not come down to material subdivs alone? I mean, the sampling will be done by comparing the primary light rays and the material..
                              http://www.cgpro.se - Portfolio

                              Comment

                              Working...
                              X