About Portal Area Light

Hi Jesse,

At 5.08mins you introduced portal lighting.  I wondered how much performance gain one can get and therefore did a test.  I am using the blend file you provided, Blender 4.3.2, sky texture, Volumetric Cube and no other lights, Rendered in CYCLES with 1024"Max Samples", Denoiser is OptiX.  No other lights added in the scene.

I rendered multiple times to take averages and I find on average portal light rendered at around 4min46sec and without portal light at 4min50sec (only 4sec difference).  With portal, the image is brighter in shade areas.  However, the render speed gain is not significant.  Can you elaborate on the topic?  Or I have missed something important?  Thank you.🙂

PS: I was going to include both rendered images but not knowing how.


1 love
Reply
  • Martin Bergwerf replied

    Hi kchow,

    That might be because of the Volumetrics you are using.

    It always depends on your Scene and Lighting and your Hardware, how much the performance gain actually is, but it's a gain, that is basically 'for free'.

    With most speed-ups, the quality will suffer (a bit or much), so it becomes a balancing act.

    1 love
  • Omar Domenech replied

    It all depends on what you're working on. If you're just making a still image, you hit render once and you're done, you're like well 4 seconds, big deal. But then if you're working on an animation of a flyby of a room on a house, and you have to render 1,000 frames, you are saving 4 seconds per frame, that's 66.6 minutes you are saving, so over an hour of render time. And animations can have thousands of frames. And then if you have not one but various portals throughout your scene, say you have 4 rooms and you are saving 4 seconds in every room you render, now that's 16 seconds of render time you're saving. And if you have to do a 1,000 frames animation and you're saving 16 seconds per frame, that time saver shoots up significantly. 

    1 love
  • Dwayne Savage(dillenbata3) replied
     "With portal, the image is brighter in shade areas."

    You hit the head of nail and totally didn't know it was there. To reproduce the brighter shadows you need more indirect bounces and/or light tricks. An often times the light tricks cause more noise which means you need more samples or deal with more blurring in denoising. Portals are more about realistic lighting of indoors from outdoor lighting coming in thru an opening(AKA Portal) like a window. Also, as Omar points out in an animation even fractions of a second add up. Take for example 1 minute of animation. If you're using 24 FPS that is 1,440 frames. If you use 30 FPS that's 1,800 frames. Plus as the camera moves this will effect render times as well. As Martin points out, it very much becomes a balancing act of quality vs speed. 

    1 love
  • Keswick Chow(kchow) replied

    Hi Martin spikeyxxx,
    I am not looking at absolute performance here (but the ratio difference in performance).  When use portal as a tool, I wish to understand more of the performance with and without portal added.  As I studied the use of portal, I use little tests like this to gain actual experiences.

    Having read your comment, I disabled the Volumetric Cube and did another test. I rendered with and without portal alternatively three times and took average of the results.  The data surprised me! On all three occassions the without portal is actually faster!  The averages are: with portal 170.2secs and without portal 166.4sec. The without portal is faster by 3.8sec(-2.3%)!

    However, with portal and same number of samples, I noticed that the quality of the image is better, noise is lesser.  Therefore, there is no simple answer to use portal or not!  In the beginning, I have a naive thought that the portal will help speed up render time in noticeable magnitude.  It is not the case now that I find it affect the quality too.

    1 love
  • Keswick Chow(kchow) replied

    Hi Omar dostovel,
    I totally agree with you. In animation, the render time will be more critical.  That is why I am eager to learn to what extend those portals affect the render performance.  As of this scene the speed up percentage is 4sec/290sec = 1.38%


    PS: To my surprise, without the Volumemetric Cube included the scene actually rendered slower with the portal!  The image is better in quality with portal though.

    1 love
  • Keswick Chow(kchow) replied

    Hi Dwanye dillenbata3,

    As I did more test renders, I am beginning to realize that the subject include portal or not is not as clear cut.  And there are a lot more factors affecting the decision.  And as you mentioned, in animation, noise, quality and render speed will need to be balanced carefully.  There are much to consider and not just portal or not.  The "max samples", denoise etc will need to be considered too!

    I will need more time to learn the interconnections of these parameters.

    Thank you.🙂

    1 love
  • Martin Bergwerf replied

    Hm, that surprises me too, that without Portal, it Renders faster...well, Portals are more for quality, than for speed it seems. And that actually makes sense. In an enclosed scene, with light coming through a relatively small window, for instance, rays, shot from the Camera have only a small chance to 'find the light source' (window). A Portal 'tells' Cycles, where to 'look for the light' and that means more Samples will find the Light Source and contribute to the Lighting. It doesn't necessarily mean that Blender uses less Samples (although it might for some Pixels, when using 'Adaptive Sampling', now enabled, when using the Noise Threshold Threshold)...Then there is also Path Guiding, which helps Cycles to clean up the Noise faster on certain Scenes, but that only works on CPU at the moment.

    Like you know by now, there is a lot to it; there are no simple rules, what to use when.

    2 loves
  • Kaizen replied

    Hi Keswick,

    Awesome you took the time to dive into this!

    From what I've experienced there's about a 100 settings you can optimize for faster renders, if not more. Each has it's own benefit and drawback and usually combining multiple of them works best, as well as making changes that fit your scene e.g. path optimization for a scene with caustics. 

    Anyways here's the funny part though; on better hardware setups the difference, especially when doing only 1 or 2 optimizations, can actually be 0 or even a net negative (longer renders). I don't know why, or how, that happens and I expect this is something that would require both some of the big brains at Blender AS WELL AS people over at the GPU manufacturer. 

    I've done multiple videos on render performance and re-rendering the same scene 100's of times, with the exact same settings, still has resulted in HUGELY varied results. A 1 min 30 sec render could range anywhere from 1 min 25 sec to 1 min 35 sec, with 0 changes to the settings. My idea is that Blender and your GPU play in synchrony and that this balance of communication between the software and the hardware is what drives the final speed of the render. This communication varies depending on other stuff your PC is doing, even when personally not doing anything. Background tasks, CPU usage, GPU usage for things etc or even the time between renders (waiting longer seemed to give my GPU some breathing room and made the renders faster?!). Again 100's of factors.

    I believe that adding these small optimizations in the long run is a positive, as understanding they exist and applying them is useful for when you really need it. In all other scenario's it might add a few seconds of rendering, but that 'is what it is'.

    Cheers and happy rendering!

    2 loves
  • Keswick Chow(kchow) replied

    Hi Jess,

    Thank you for taking the time to reply.  I do not understand the portal lighting from the beginning and now I understands a little of its characteristic.  It is a huge task then to try to understand each of hundred of these settings and the effects they applied to quality and performance optimization.  I hope that one day I can gain more experience in realistic and efficient lighting in rendering.🙂


    1 love