Announcement

Collapse
No announcement yet.

RENDER TIMES v CAMERA DISTANCE

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

  • RENDER TIMES v CAMERA DISTANCE

    Hello all, I've been using VRay for a number of years now and I come across this same problem every so often. I'm hoping someone can explain the reason and any possible solutions. It's happens when I have a camera move that moves closer or away from geometry, render times increase massively when near the geo and decrease further away. I'm guessing it's the relationship between pixel density and sampling. Does anyone have a solution for rendering geo close to camera efficiently?

    Regards

    Keith
    KEITH ROGERS

    Learn the rules like a pro so you can break them as an artist.

    http://www.3layersofparallax.com/

  • #2
    It's a bit of a vague question since there's a lot of variables - textures, details, materials and so on. Could you post an example of two frames far and close?

    Comment


    • #3
      Thanks for replying Jo, Your right about there being lots of variables and I'm sure this is quite vague but I've just encounted it on a few projects and never really had the time to work out why it happens. It's probably one of those things that's obvious when someone spells it out. I've attached a couple of jpegs of a simple example. Some glasses in a dishwasher draw. No textures just shaders. Close up render time was 9 mins, further away was about 3. I feel a bit stupid asking this question as it seems obvious.

      Cheers


      Click image for larger version

Name:	GLASSES_CLOSE.jpg
Views:	1
Size:	302.3 KB
ID:	855020
      Click image for larger version

Name:	GLASSES_FAR_AWAY.jpg
Views:	1
Size:	276.9 KB
ID:	855021
      KEITH ROGERS

      Learn the rules like a pro so you can break them as an artist.

      http://www.3layersofparallax.com/

      Comment


      • #4
        the numbers of pixels where the engine needs to render reflection/refraction is much higher in first pic than in second pic.
        www.mirage-cg.com

        Comment


        • #5
          Okay so in this case, you're getting far more pixels that have to be calculated for starters, and since everything is closer to your camera, the effects of the depth of field are far more pronounced. The wider the spread / shallower the focus of your depth of field, the more samples the renderer has to take to try and reach the quality setting you've set in your dmc sampler.

          Pretty much the rule is anything that causes more noise means more that it'll be harder to get a clean image, and vray is always trying to work towards a clean image. So say for example you've got an object that takes up 25% of the final frame and it's using blurry reflections. If you move the camera in and it's now 50% of the frame, it's just more pixels that are using those blurry reflections so there's a larger surface area of the render that need harder calculations than in the 25% of the frame render.

          Likewise what can often happen as well is the blurrier things get, the harder they are to sample.

          This is a bit of a simplification but it might work as an understanding:
          If you take the example of a mirrored reflection and have it reflecting a red object and a blue object. When vray renders a totally crisp reflection, a reflection ray is fired out straight from the objects surface until it hits something. Say for example it hits the red sphere. To make sure that this is the correct result, vray will fire out more and more reflection rays just to check. Each time it takes a new sample, it gets the average of all the samples it's taken so far and checks that. If they all keep coming back with the same red value, vray notices that adding more and more samples keeps coming back with the same average red result so it decides that a red reflection is probably correct and stops sampling.

          When you start using blurry reflections, each of the reflection rays will take the direction straight out of the surface of your mirror but then also add in a little bit of divergence. The blurrier you make your reflections, the more divergence it'll add in and if you have totally blurry reflections, it'll end up adding in random divergence as much as 90 degrees up, down, left or right from the original mirror direction. So say we have our mirror and again a red and blue ball. Vray does it's first reflection ray for the pixel. It just so happens that this ray is perfectly straight and hits the red ball so vray records red for this reflection. The next reflection ray that fires goes off in a slightly different direction but this time hits the blue ball. Vray records the blue value for this reflection sample and then compares it to what else it's got. It goes "hang on a second, red is totally different from blue, and if I average them out I get purple. I'm not so sure about this, lets take another sample and make sure." So say the third sample it takes hits the red ball. If we look at our three averages, we started with red from one sample, we got purple when we added in our second sample which was blue, now a third sample of red has been added in and it's made our average colour change again to a more red tint purple. If we take a fourth sample and it hits blue, then when we average it goes back to a purple again.

          Each time vray takes a new sample, if it changes the average significantly, vray doesn't trust it. The more samples you're averaging though, the less influence a single sample will have. If we take 50 samples in total, say 25 of them hit red and 25 hit blue, then the average is purple. If we take one more sample and it hits red, that means we have 26 red and 25 blue. It'll average out to just a slightly more red purple. Vray will keep adding samples until the average of the lot starts to stabilize and adding one additional sample doesn't make our average change really significantly.

          So if you apply this to any kind of "blurry" or "soft" effect in vray, you could be talking about blurry reflections, refractions or even soft area lights. In the case of materials, changing your glossiness will increase the amount of random colours or objects that it's rays can hit, and it means vray has to take more samples to make sure that the average it's coming up with is the right one.

          Comment


          • #6
            Wow thanks Jo, very nicely put. I'm a sucker for laymen's terms. To be honest I had an rough idea of what was happening but it's always good to read someone else's explanation. Thanks for taking the time to write that.

            Kind regards

            Keith
            KEITH ROGERS

            Learn the rules like a pro so you can break them as an artist.

            http://www.3layersofparallax.com/

            Comment


            • #7
              Glad to help!

              Comment

              Working...
              X