Announcement

Collapse
No announcement yet.

Script WIP: Freeform Region Rendering Mode

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

  • Script WIP: Freeform Region Rendering Mode

    Hi. I want to share my WIP script I'm currently working on. It lets you define multiple freeform region zones for rerendering. Just like Region Mode, but not limited in shape and number.

    BENEFITS:

    Precise selecting of objects needed to be rerenderd. For example you may have some heavy objects with glossy materials, which you don't want to rerender. But when you draw Region rectangle, parts of those objects may get into regions, resulting in longer rendering time.

    Glossy interpolation speedup. As you know, even when you render in Region mode, Glossy Interpolation computes for whole screen. With this script it is computed only for defined region(s)

    You can precisely select objects with Displcacing and rerender them with different GI settings (generally lower)

    One rerender instead of multiple ones. In Region mode you can render only one region per rendering. But sometimes you may want to render multiple regions instead of one big region to save time. But if your scene is heavy, it will take some time to prepare it before every render (ie ligts, maps, bsp, etc.). Now you can draw as many regions as you wish and hit Render!

    Single Frame GI mode in Region rendering. In single frame mode, GI is computed just like Interpolation - for the whole screen, regardless of region selection. So, you probably may want to switch to Bucket mode, but it also has some disadvantages like seams between buckets. But now, with this script, you can use Single frame for regions


    Note, this is still a WIP, so most likely it has some bugs. I'll try improve it when I get some free time.

    Here's the link to script. Note, if it doesn't open, try again later. It is hosted on free host, and they go offline sometimes.

    http://alexcooper.nm.ru/stuff/Cooper-FRR.zip

    Here is a couple of examples:

    Pic 1

    Pic 2

    Pic 3

  • #2
    hehe what a cool idea!
    ____________________________________

    "Sometimes life leaves a hundred dollar bill on your dresser, and you don't realize until later that it's because it fu**ed you."

    Comment


    • #3
      and what is even cooler - it works! (at least for me)
      BTW, it's my first more or less serious script

      Comment


      • #4
        great.

        now please code a function that draws a selection outline around a selected object.

        Comment


        • #5
          Nifty! I like the concept!

          Thinking in terms of region net render script from the old viz days.. Mabye this might be a better alternative to the whole DR/Stripes/Bucket Mode issue..

          could have an overlap/fade setting.. that could mabye enable people to send region renders (Or dr) without having to have a "High" irradiance map.. have a variable overlap, the lower the lighting solution, the higher the overlap between regions.

          Of course, sticking the image together at the end would be a mess, but its just a thought on mabye where it could go forward..

          regards,
          Dave Buchhofer. // Vsaiwrk

          Comment


          • #6
            fantastic

            thanks you very very very much

            Vince
            Architecture & design Sàrl
            global solution for architecture
            www.architecture-design.ch

            Comment


            • #7
              VERY VERY nice, COOPER!!!!

              thank you for sharing this w/ us....this is really great!!........it's what I was looking for for a while

              thanks again,

              paul.

              Comment


              • #8
                Hi COOPER,

                Great idea! very ingenious

                Only drawback I saw was that the "mask" casts a GI shadow so the output is not the same as the full render. Hope you don't mind but I hacked your code to apply a vraywrapper matte with a standard material with 0 opacity inside. The result is no GI shadow and no alpha from the "mask".

                Here is the code I replaced you material app with:
                Code:
                		$.mat = a
                				   (	
                					a = VRayMtlWrapper () 
                					a.mattesurface = on	
                					a.basemtl = standardmaterial ()
                					a.basemtl.opacity = 0
                				   )
                Eric Boer
                Dev

                Comment


                • #9
                  Hi guys, thanks for comments I'm really glad you find it useful, or should I say didn't find it useless hehe Hey, ReRender! Thank you so much for helping to get rid of this GI shadow I was planing to dig in this direction later, however I believed that relatively small size of mask object shouldn't affect overall lighting in scene at all. But now with your help it's completely complete But I afraid that playing with opacity and matte properties may result in unpredictable behavoir.. Gotta test it now with and without matting BTW, it is possible to access Matte properties without VrayMtlWrapper, via object custom attributes. I wonder if there will be any difference

                  Comment


                  • #10
                    Hmm.. Bad news RErender. As I expected, Matting ruins all concept of "not generating and recievig of GI". When Matte = on, Prepasses start to compute for the whole screen

                    Comment


                    • #11
                      Did you try it by properties or with a wrapper? Seems to be working here but I'm not sure what your test is (I'm probably missing something :P), show calc is only showing samples in the opening.

                      btw, I typed it wrong should be
                      Code:
                       
                                     (   
                                     a = VRayMtlWrapper ()
                                     a.mattesurface = on   
                                     a.basemtl = standardmaterial ()
                                     a.basemtl.opacity = 0
                                     ) 
                                $.mat = a
                      Eric Boer
                      Dev

                      Comment


                      • #12
                        Well, I afraid while it looks like it computes only for openings, it does compute for whole screen. just tested on very simple scene with teapots lying on the plane. Without matting it rendered in 15 seconds. And with matte rendertime was thrice as large So I have come to conclusion that it traces rays for the whole scene through matted object



                        Comment


                        • #13
                          I was thinking about adding a feature to display previously rendered image outside region instead of only black color. I think it is possible by getting last rendered image via scripted command, and then mapping it with Camera Map onto our region plane. However, it will affect rendering a bit since drawing solid black color is faster then drawing even simple bitmap. What do you think, should I try to add this or leave as it is?

                          edit: just tested it, with mapped image it took 1:48 and without image (only black color) 46 seconds..

                          Comment


                          • #14
                            Hey ReRender, funny how we missed the fact that it already doesn't cast GI shadow Look at this thread

                            http://www.chaoticdimension.com/foru...pic.php?t=7041

                            And the mask has Vosible to reflection option turned off, so it doesnt create GI shadow

                            Comment

                            Working...
                            X