Announcement

Collapse
No announcement yet.

V-Ray Scene Optimisation Script

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

  • #91
    Sorry for going AWOL but I've been sick and have had some projects sweep out any chance of doing test renders. The test renders I had done however really did confirm the above, that I was getting very similar results between Vlado's method and your script.

    I guess there's still a bit more testing to be done though...

    I would like to say, Lele, that the ArchViz preset's settings were astronomically high for my needs. The LC calculation took 3 hours on it's default settings and the render was predicting 45 hours (my final frame only took 7). Also it seems your AA settings for the Archviz preset were 4/5 and not fixed and the LC samples was way way higher than your sqrt(W*H) equation.

    I cant remember if I was using the current script version or the previous tho. And thanks for adding the little VFB option

    Anyway, back to bed this flu has taken hold...
    James Burrell www.objektiv-j.com
    Visit my Patreon patreon.com/JamesBurrell

    Comment


    • #92
      eheh, yeah, the 32 "shading rate" for the arcviz preset was for that particular scene i was benchmarking, at that particular resolution. In fact, when the resolution goes bigger, there's a strong chance that you won't have just so many annoyingly small details, and you can drop it back to the SR 1.0 (ie. the sweet spot).
      Same goes for the AA, 4/4 (or slightly higher) is mighty fine if the res is high, and the detail distribution is even.
      I suppose i may split the presets for low (up to full HD) and print Res, as well as for stuff with and without DoF/Moblur (much like for the vfx ones).
      As far as using the MSR versus the script, there is still a wee bit of difference depending on AA thresholds and settings, adaptive amount, and so on.
      I'll manage a test from default settings (rather than converting my own to match sampling 1:1 with MSR) to show you just how big that can be, but you have an inkling already from the benchmarking done above for specialised versus AA rays.
      If your thresholds let the AA kick in, and your max AA is high (ie, old universal settings), then you're in for some waiting.

      EDIT:
      As far as, in general, my presets being overkill, here's what 2 stops up (four times brighter) looks like:
      Click image for larger version

Name:	four_times_brighter.png
Views:	1
Size:	457.6 KB
ID:	853972
      So, as stated before, if you can do with more visible noise, and your stuff won't be consigned to a comp department that will skew the hell out of it, feel free to drop the noise threshold and number of SPP down to manageable levels (say, 8 and 1024 respectively), which will still look good on an 8bit display device.
      This said, i am fairly confident (until, of course, proven wrong!) that there's little performance to squeeze out of vray to get this image just as clean, with any other approach, at present.
      I'd be curious to see someone render it with the other methods, from Paul's settings, rather than my tweaked ones, and see what differences there are.
      Or just give me a VPN access to one of those shiny nodes your company has, and i'll do that myself, without wasting a lifetime in waiting. :P
      Last edited by ^Lele^; 12-08-2014, 08:00 AM.
      Lele
      Trouble Stirrer in RnD @ Chaos
      ----------------------
      emanuele.lecchi@chaos.com

      Disclaimer:
      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

      Comment


      • #93
        So here's a noisier result, which rendered in a third of the time (for a third or thereabout of the SPP, as the maths commands.)
        Click image for larger version

Name:	vr_scene07_lower_quality.jpg
Views:	1
Size:	213.1 KB
ID:	853973

        To ME, this wouldn't count as a job well done, and at work i'd likely get grief.
        Then again, i've definitely seen worse. ^^
        Lele
        Trouble Stirrer in RnD @ Chaos
        ----------------------
        emanuele.lecchi@chaos.com

        Disclaimer:
        The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

        Comment


        • #94
          Originally posted by ^Lele^ View Post
          basically, you can leave the subdivs on everything to their default, set your AA as it's needed to clean dof/moblur/high frequency geo or texture detail, and the simply use the "min shading rate" spinner to sample multiple times per camera ray shot.
          Might there be an issue with this approach if the min. shading rate parameter is driving samples away from the AA and towards secondary sampling?
          For instance, if I set my AA min/max and Colour Threshold values in the first instance just high enough to achieve a clean DOF then I don't want to enable anything subsequently that will reduce those camera rays as I know this will introduce noise in the DOF for sure.
          Isn't this what MSR does? (going from the examples in the Vray documentation - I've not tested anything directly yet). or does Vray perhaps know not to interfere with the camera rays in the areas where they are needed?

          With the universal method approach in combination with a variable MSR - given max AA is at 100 then I suppose an increased MSR would have to be quite significant to undermine the cleanliness of those effects that need camera rays.
          But, if you're taking AA just up to the point at which it's necessary then won't raising the MSR instantly begin to degrade that effort?
          Sorry, I should find time to test this myself before suggesting but it seems as though in theory this could be the case.

          Comment


          • #95
            set your AA as it's needed to clean dof/moblur/high frequency geo or texture detail, and the simply use the "min shading rate" spinner to sample multiple times per camera ray shot.
            is there a particular method of calculating "as it's needed" and how to work out what the "multiple" is for camera ray shots.

            I just have an image that I rendered with your settings and I got all these crazy circular artefacts.

            Click image for larger version

Name:	danni_RGB-color.jpg
Views:	1
Size:	133.8 KB
ID:	853975

            Its just a plane with a Simbiont material that I made (stripes) the stripes are meant to be black and white, but that circular patten radiating from the partially visible box is not meant to be there.

            One more question about putting everything at its default: is this true also of the LC samples. Or should you use the Sqr(renderheight*renderwidth) ?
            Is there a post where vlado states how to arrive at the numbers.

            I'm sorry if I digress to far from the topic of this thread, I would like to make a preset that contain's vlado's options.... As I an usually rendering at the native resolution of my camera (5760x3840) renders take a bit of time.

            Raj
            Last edited by rajdarge; 12-08-2014, 04:14 PM.

            Comment


            • #96
              I figured out the circular artefact was due to a vray plane I had put in the scene but forgot about .... sorry

              Comment


              • #97
                Lele,
                One thing I noticed with your script is that it turns the dynamic memory setting to "static" and I noticed it was causing a bit of a slow down on larger scenes
                Maybe it should just be set to "auto" ?
                Chris Jackson
                Shiftmedia
                www.shiftmedia.sydney

                Comment


                • #98
                  Originally posted by jacksc02 View Post
                  Lele,
                  One thing I noticed with your script is that it turns the dynamic memory setting to "static" and I noticed it was causing a bit of a slow down on larger scenes
                  Maybe it should just be set to "auto" ?
                  Yeah, noted, Chris, thanks.
                  It IS a performance enhancer IF the scene fits to ram.
                  I'll leave it alone to its "Auto" default.
                  One more question about putting everything at its default: is this true also of the LC samples. Or should you use the Sqr(renderheight*renderwidth) ?
                  Is there a post where vlado states how to arrive at the numbers.
                  http://docs.chaosgroup.com/display/V...tCacheOverview
                  like the photon map, the light cache is not adaptive. The illumination is computed at a fixed resolution, which is determined by the user.
                  In 2008 i prepared a set of scripts, amongst which a LC calculator, and this approach comes from back then.
                  Purely my own ingenuity after reading the manual and testing it out for a while.
                  Try different values for shading rate -or subdivs, as you prefer- and sample size until you find a better way about it for your specific image size, and contents.
                  Unfortunately, the LC settings are expressed as two different types: one is an absolute number (subdivs) and the other is a fractional one (sample size). Hence the default being hit and miss, depending on what the scene is.
                  I doubt it has ANY pretense at all of being THE way about LC (wrongly worded: i READ ABOVE it is not. ).

                  for instance, if I set my AA min/max and Colour Threshold values in the first instance just high enough to achieve a clean DOF then I don't want to enable anything subsequently that will reduce those camera rays as I know this will introduce noise in the DOF for sure.
                  When i say "clean DoF/Moblur" or geo, i mean their outline, not their shading.
                  The MSR will, in the case of an "old" universal settings scenario, stop the AA from reaching very high values, of course.
                  But my approach is to have the user FIX the AA to just what is needed.
                  So the MSR in that case will just shade the underlying image better, while your AA will stay where you set it (you'll notice i've progressively moved away from min/max scenarios for the AA, and closed in to a Fixed value. I prefer control over the rendertime to arbitrary rendertimes for a clean image.).
                  Lele
                  Trouble Stirrer in RnD @ Chaos
                  ----------------------
                  emanuele.lecchi@chaos.com

                  Disclaimer:
                  The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                  Comment


                  • #99
                    Originally posted by rjohnson33 View Post
                    Might there be an issue with this approach if the min. shading rate parameter is driving samples away from the AA and towards secondary sampling?
                    For instance, if I set my AA min/max and Colour Threshold values in the first instance just high enough to achieve a clean DOF then I don't want to enable anything subsequently that will reduce those camera rays as I know this will introduce noise in the DOF for sure.
                    MSR will totally ignore any of your sampling settings in lights and materials and just tell vray for every camera ray you shoot, fire this multiple of secondary rays. So if you've got aa 1 / 50 and a min shading rate of 2, regardless what value of aa the pixels in your image end up needing, vray will always shoot 2 secondary rays for each camera ray. It's another kind of brute force type approach and gets around any of the division stuff - completely ignores it.

                    Comment


                    • When i say "clean DoF/Moblur" or geo, i mean their outline, not their shading.
                      The MSR will, in the case of an "old" universal settings scenario, stop the AA from reaching very high values, of course.
                      But my approach is to have the user FIX the AA to just what is needed.
                      So the MSR in that case will just shade the underlying image better, while your AA will stay where you set it (you'll notice i've progressively moved away from min/max scenarios for the AA, and closed in to a Fixed value. I prefer control over the rendertime to arbitrary rendertimes for a clean image.).
                      Ah, I see. Makes sense, thanks for the explanation. Another thing I was going to mention was that the Colour Threshold value that your script defaults to was a bit high for tough DOF scenarios and it might be worth having a reminder in the script to adjust this but now this becomes moot if you're approaching with fixed AA as standard.

                      Comment


                      • Originally posted by joconnell View Post
                        MSR will totally ignore any of your sampling settings in lights and materials and just tell vray for every camera ray you shoot, fire this multiple of secondary rays. So if you've got aa 1 / 50 and a min shading rate of 2, regardless what value of aa the pixels in your image end up needing, vray will always shoot 2 secondary rays for each camera ray. It's another kind of brute force type approach and gets around any of the division stuff - completely ignores it.
                        My point wasn't really based on the assumption that the MSR divides or reduces sampling in lights and materials it was based on the assumption that a higher MSR results in lower AA subdivisions (in a situation where you have adaptive subdiv AA).
                        Therefore if you don't fix your AA (as Lele has suggested in the previous post) then higher MSR = less camera rays = potential to compromise geometric detail/outlines/DOF/textures (or anything that you need camera rays for)

                        I see the MSR as more of a function that diverts effort from the AA to shading when it's allowed. Rather than a supplementary boost to shading alone.
                        This is what the documentation suggests anyway. There's an example there with a raised MSR (from 1 to 16) where you can see that the DOF quality has been reduced by the higher MSR.

                        Anyway, not a problem either way with a Fixed AA as has been pointed out

                        Comment


                        • Originally posted by joconnell View Post
                          MSR will totally ignore any of your sampling settings in lights and materials and just tell vray for every camera ray you shoot, fire this multiple of secondary rays. So if you've got aa 1 / 50 and a min shading rate of 2, regardless what value of aa the pixels in your image end up needing, vray will always shoot 2 secondary rays for each camera ray. It's another kind of brute force type approach and gets around any of the division stuff - completely ignores it.
                          No, John.
                          It acts as a MULTIPLIER for whatever you have set in your shaders/lights subdivs per Camera ray.
                          Hence me being able to exactly match the SPP and rendertime from my setup with divide off and divide on plus MSR.

                          edit:YES John.
                          I was dead wrong, and you were right!
                          I am using the previously shown sample counter scene (plane/dome).
                          With a GSM of 512, and an aa of 1/1, it renders with 512mil shadow rays, for a 1000*1000 px image.
                          REGARDLESS of the light's subdivs (in this you are right).
                          However, it is, to me at least, quite counter-intuitive as compared to the rest of V-Ray's interface lingo and standard: it's rays per pixel, and not subdivs.
                          So for the same image (1Mpx) setting the MSR to 10 leads to 10mil shadow rays, or 3.16 and change subdivs (if Divide was off).
                          With aa at 2/2, 40mil, and so on.
                          This, plus divide on, plus arbitrary max AA samples, to me, is rendertime madness.
                          It's definitely helpful for the progressive sampler, in that it's all now nicely in linear space, rather than powers of two and square roots, but good grief i can see TD hell coming debugging a shot so set up.
                          I'll stick to my approach of precise calculation of what is going to happen before the render starts.
                          Last edited by ^Lele^; 13-08-2014, 05:10 AM. Reason: i was dead wrong.
                          Lele
                          Trouble Stirrer in RnD @ Chaos
                          ----------------------
                          emanuele.lecchi@chaos.com

                          Disclaimer:
                          The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                          Comment


                          • So I spent some quality time adding the latest changes to the script (geo left to auto in the raycaster), and most of all, typing a wall of text to tooltip each and every script parameter.
                            I suppose it'd be worth preparing a page with some form of "manual" which would collect the info i scattered (my bad, and i am so sorry for that) across this lenghty thread, and then linking it to a "?" button somewhere in the script.
                            Anyhow, i chose to also make a change to the Archviz preset, whereby now the LC remains at the SR of 1, but "retrace" is turned on, so that for large render sizes one doesn't have to wait days for the LC to complete, and any light leaks or inaccuracies in the LC will be dealt with at screen render time.
                            Notice that some of the tooltips contain WARNINGS (capitalised on purpose) and some contain tongue-in-cheek remarks for the least attentive among us ( or should I say, those with a more selective reading skill).
                            They're not meant to offend anyone, but to honestly point out some relevant stuff and keep the thread from repeating the same sentences over and over again.



                            Let me know what you think of the tooltips.
                            Last edited by ^Lele^; 17-08-2014, 05:25 AM. Reason: I made a silly mistake in the INFO DISPLAY math (only). grab the new version in the first post of the thread.
                            Lele
                            Trouble Stirrer in RnD @ Chaos
                            ----------------------
                            emanuele.lecchi@chaos.com

                            Disclaimer:
                            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                            Comment


                            • This script is absolutley brilliant, and has been very helpful in letting us achieve the perfect quality/speed balance. Thank-you for it!

                              So... what other great scripts have you written?
                              http://www.glass-canvas.co.uk

                              Comment


                              • Originally posted by GLASS-CANVAS View Post
                                This script is absolutley brilliant, and has been very helpful in letting us achieve the perfect quality/speed balance. Thank-you for it!

                                So... what other great scripts have you written?
                                Wow, what a nice endorsement!
                                Thank you!

                                AGES ago i had a set of tools for Vray, but my backup disk died a horrible death recently, and i fear i lost the sources.
                                Those included an exposimeter with matrix/weighting, white balancing and even an early, experimental sample rate calculator (based on the SR Render element), a physcam auto-focus, a mass light changer for vray lights, a realtime vray sky preview in viewport (at the time of max 8. it was quite the custom hack...) and a few other assorted bits.
                                For individual companies, meh, too many to count.
                                One of the nicest, thought, was a reflection painter, which Thorsten may even remember, or have still laying around.
                                It allowed for drawing of reflection shapes on , say car bonnets, and it would create the reflector so that when you rendered, your reflection would be just in the place you drew it.
                                Cue reflected smilies (i won't mention the other stuff that was drawn with it, but you may guess...) on very high profile cars, and you know why i didn't work for Macke for too long, lol :P
                                Lele
                                Trouble Stirrer in RnD @ Chaos
                                ----------------------
                                emanuele.lecchi@chaos.com

                                Disclaimer:
                                The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                                Comment

                                Working...
                                X