Announcement

Collapse
No announcement yet.

What's quicker, omni or rectangular lights?

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

  • What's quicker, omni or rectangular lights?

    I'm rendering an architectural exterior scene. Quite a large building. I added some rectangular lights because the building looked so dark otherwise.

    But the render time multiplied many times when I did so. I added many smaller lights instead of one large in each floor, thinking that'd be quicker than one large. But is it?
    And is omni lights quicker?

    I'm using IR and LC.
    Please mention what V-Ray and SketchUp version you are using when posting questions.

  • #2
    Re: What's quicker, omni or rectangular lights?

    thomthom

    When faced with similar situations I have used single large rectangular lights, to give an overall, fairly even, illumination. I don't know which is quicker, rect or omni, but I would guess that one big rect light will be the fastest. I would only use individual, smaller lights if I wanted to create concentrations of light.

    David
    Sketchup 2015
    Vray version 2.00
    www.davidcauldwell.co.uk

    Comment


    • #3
      Re: What's quicker, omni or rectangular lights?

      I think I read somewhere that large rec lights are slow. Also, the space needed to be illuminated is not square so one rec doesn't fit well. And it's cross the wall of the inner core where I'm concerned it'd cause burning at of the walls where it meet the light...
      Please mention what V-Ray and SketchUp version you are using when posting questions.

      Comment


      • #4
        Re: What's quicker, omni or rectangular lights?

        Everything when talking about speed almost always goes back to raytracing, so I'll explain both in those terms. Omni lights are the easiest to work with raytracing wise, and will typically result in the minimum number of rays that need to be traced. Everything gets traced from a single point, and there's no need to see if a given point should try and trace rays from a light (not so with a spot light, which is just an omni light with an angle check on it...outside that angle and don't trace it..).

        Rectangular lights on the other hand have a physical area that is associated with its generation of light. Therefore, "theoretically" the entire area of the light must be sampled in order to by completely accurate. Of course this is impossible bc points are infinitesimally small, and there are an infinite number of them along the surface of any rectangular light (this is one of the "technicalities" that prevent any renderer from being truly "physically correct"...anyway). So what it comes down to is that we've got to sample a certain number of points to get an idea of the contribution of a rectangular light. Typically, these samples are generated through the concept of subdivisions, so however many subdivisions you have on your light just square that an you'll have the number of rays traced for that particular rec light. By default we have 8, so if you haven't changed a thing on your rec light settings, then you'll trace 64 rays every time you sample a rec light. Thats opposed to 1 ray for sampling a rec light and I think you'll know the answer.

        Now, I went through all that explanation more to for proper use of rec lights as opposed to the rec light/omni light comparision. Omni lights are fast, but they tend to make your renders look fairly flat and sharp, and don't do much for your reflections (cause they won't show up). So I still recommend using rec lights in most situations. Anyway, back to the real story. Those 64 samples are regardless of the size of your light, so thats why the technique of using one large light above a ceiling or behind a wall tend to be faster than a light at every opening/light. However, there are some significant disadvantages with that, mainly that your actually taking some samples of that light that will never be used (the ones that are right behind geometry...not over openings), which is of course fairly inefficient. Remember you're going to take all 64 samples every time you sample that light, regardless of what parts of the light are truly visible. In the end, the "one large light" technique tends to require more sampling anyway, so say you bump it up to 16 subdivisions, which means 256 samples, more than half of those are probably thrown away.

        So enter the "multiple lights where I need them" technique. Depending on the number of lights that are being used, this can be almost worse than the "one large light" technique. Say you're making a 4 X 6 grid of rectangle lights...that's going to be 24 lights. Each one of those with the same number of subdivisions will be 1536 (24*64) samples, which would be so much bigger than the 24 samples if they were omni lights, and 256 samples of a large highly sampled rec light. However, that's at the default 8 subdivisions, which may be overkill in this situation. If we manage those subdivision, we can bring our total number of samples down and get just as good quality. So lets say we take 4 subdivisions instead of 8, leading to 16 samples per light as opposed to 64. Looking at all the lights, this translates to 384 samples as opposed to 1536 with 8 subdivisions (with all of those 384 samples being used efficiently). Now this is starting to look much more manageable. The more rec lights you add, the more you have to start thinking about how their sampled. Sometimes, you just have to have them so you need to manage them, other times, the quality of the rendered image is night and day from omni lights to rec lights.

        Lastly (and bringing this back to your original question), rec lights have an option called Store With Irradiance Map. Basically, what this does, rather than sample all of the lights when calculating a given pixel (which can be many individual samples depending on you're AA settings), it will sample your rec lights @ each IR sample as opposed to pixel sample. Generally (and I'm just guessing here) the number of irradiance map samples is about 25% of the number of pixel's you're rendering...not to mention that most pixels will require more than one sample. Needless to say, this can significantly decrease the amount of time that is require to sample rec lights. Just keep in mind that the quality of your rec light solution is tied into your IR quality (which isn't that much of an issue really).

        So, take charge my friend, and don't resign yourself to the complacency of omni lights, simply for "speed's" sake. Speed is in your hands, regardless of your choice of light. ;D
        Damien Alomar<br />Generally Cool Dude

        Comment


        • #5
          Re: What's quicker, omni or rectangular lights?

          Yet again I'm impressed by the quick answer and very good explanation dalomar.
          I recommend this for the tips and tricks section.

          Things are much clearer now. It explains the times I'm getting. ...with about 200 rec lights all with default settings... x_X ...and I'm still using the original version for this project, since it was created with it, so there are no component lights...

          Knowing that I've made a severe grand overkill I'll get right on revising the light setup and do some more reading on V-Ray.

          Thank you very much dalomar for this very useful reply.
          Please mention what V-Ray and SketchUp version you are using when posting questions.

          Comment


          • #6
            Re: What's quicker, omni or rectangular lights?

            ;D

            Now thats what I call an answer!!
            Sketchup 2015
            Vray version 2.00
            www.davidcauldwell.co.uk

            Comment


            • #7
              Re: What's quicker, omni or rectangular lights?

              Its a gamble any time I start talking about sampling and doing a little math, but its amazing to see how much that helps. Glad you guys found it useful.
              Damien Alomar<br />Generally Cool Dude

              Comment


              • #8
                Re: What's quicker, omni or rectangular lights?

                Thanks for that very informative post Damien, I copypasted it into my VRay tips Notepad file for future reading- I need to read it a couple more times to get my head round the maths! LOL

                I'd been meaning to ask a similar question regarding a movie I rendered a few months ago- it was a default SU skylit fly-around 2 minute film of a residential block with luxury shops on the ground floor. It was fine for the apartments to just be skylit, but the shops really needed interior lighting to look open and occupied. However as this was going to be a film (and I don't have a render farm) it was vital that I got the render times down as low as possible. I quickly realised that I really only needed very simply lit shop interiors (perhaps just one omni per room), but preferably with lots of visible lights just below the celings to simulate spotlights without them actually contributing to the lighting of the scene. Is this possible in VfSU? I was using v.1.00 at the time and it was the first time I'd used emitter materials or lights in VfSU, but I couldn't find a setting to stop the light produced from the light or emitter actually lighting the scene... did I just miss something obvious?

                After a few tests I settled for using about a hundred tiny emitter panels with extremely low subdivs (I forget the figure), and left it rendering on my colleague's PC for 2 weeks. The final result was fine except for one glaring problem- the emitter fake "spotlights" flickered one and off between frames and this also affected the lighting of the shop interiors. I'm sure there must be a better (and faster) way of achieving the desired simple bright interiors with "fake" spotlights effect.
                SU 2018 + VfSU 4.0

                Comment


                • #9
                  Re: What's quicker, omni or rectangular lights?

                  It really was of great help. I got an better idea of how V-Ray works. And I see it help to think a bit more math when I wonder of how it might work. ...I can hear my own words I told my math teacher; "I'll never have any use of that!" Looks like I'm having a cooked hat for dinner...
                  Please mention what V-Ray and SketchUp version you are using when posting questions.

                  Comment


                  • #10
                    Re: What's quicker, omni or rectangular lights?

                    Don't get too choked up on the math guys. Essentially, if you can do multiplication, then you can follow along with the math that I did

                    8^2 = 8*8 = 64
                    16^2 = 16*16 = 256
                    4 * 6 = 24
                    24 * 64 = 1536
                    4^2 = 4*4 = 16
                    24 * 16 = 384

                    Its only when you start talking about the math behind the geometry or rendering equation itself that things really get up to your ears. That's stuff is a little beyond me, so I don't think you'll see me writing any explanations about that any time soon ;D
                    Damien Alomar<br />Generally Cool Dude

                    Comment


                    • #11
                      Re: What's quicker, omni or rectangular lights?

                      Originally posted by dalomar
                      Its only when you start talking about the math behind the geometry or rendering equation itself that things really get up to your ears. That's stuff is a little beyond me, so I don't think you'll see me writing any explanations about that any time soon ;D
                      Yea, I came across that when I was browsing the net for V-Ray related info. My screen filled with equations and diagrams and illustrations that supposedly explained the mathematical functions of the various functions. When I come across that stuff I eventually end up hitting the Back button a few times.
                      Please mention what V-Ray and SketchUp version you are using when posting questions.

                      Comment


                      • #12
                        Re: What's quicker, omni or rectangular lights?

                        I set up an isolated test; a box with an opening where the sun is coming from the back so it's quite dark inside the box by default.

                        Then I inserted a rectangular light covering 90% of the ceiling where I rendered the same scene with various subdivs.
                        2 subdivs: 26.4s
                        20 subdivs: 27.3s
                        200 subdivs: 1m21.2s
                        2000 subdivs: (still rendering after watching one Mythbusters episode) {1h33m4.8s - about two Mythbusters episodes}

                        What I also notice with the various test renders is that I can't really see any difference in them. Though this is with a completely empty room.
                        But I see that I can reduce the subdivs in the scene I mentioned in the OP drasticly. Knowing that the number of ray is the square, I see how much impact even 1 subdiv makes. Now I can place them more smartly.
                        Please mention what V-Ray and SketchUp version you are using when posting questions.

                        Comment


                        • #13
                          Re: What's quicker, omni or rectangular lights?

                          200 Subdivs stored with IR took 28.5s. as opose to 1m21.2s when it's not stored. And the render still looks exactly the same.
                          Please mention what V-Ray and SketchUp version you are using when posting questions.

                          Comment


                          • #14
                            Re: What's quicker, omni or rectangular lights?

                            Inserting a large cube occupying most of the volume and adding a person, just to see the effect. I don't see any difference whether it's 1 subdiv or 200 subdivs. With exception to speed of course.

                            The V-Ray manual says that lower numbers yields more noise, but I'm not seeing that. Maybe it's just the scene I'm testing with, but it's good news for my other scene as setup are similar. Meaning I can slash the number and lights and subdivs to a couple of handfuls instead of a couple of hundred lights as I currently have.

                            Think I heard a sigh of relief from my computer and make-do renderfarm.
                            Please mention what V-Ray and SketchUp version you are using when posting questions.

                            Comment


                            • #15
                              Re: What's quicker, omni or rectangular lights?

                              If you're trying to see more noise, the tell tale sign typically are the shadows, not the actual illumination quality. And specifically, any part of the shadow that is blurry.
                              Damien Alomar<br />Generally Cool Dude

                              Comment

                              Working...
                              X