Experimental Cycles light portals

Cover window area. But look at my post above, if you’re using in conjunction with other lamps it seems buggy.

Holy crap this needs to go to trunk asap. :slight_smile:
has the gooseberry team evaluated it yet on their production scenes? I would be curious to hear their results.

I don’t know how much it would help for gooseberry. Most of the scenes are more open and wouldn’t really benefit from a portal architecture.

same blend file used a couple of posts down but renders faster try it.

https://mega.co.nz/#!8YZkgTQL!KRkfpTD6Qe1k-hiuggsi3h9UUzN7tXtFMeiMs2jIIVY

So here is my latest test with one of my older scene:
The first render took 8m54s - portals with HDRI (multiple importance set to 256)

The second took 8m32s - my own setup with emitting plane inside the window - no world in the scene

The third took 8m48s - it is lit by hdri (multiple importance set to 256) - I had to decrease the Strenght of the world from 32 to 16 and it was still brighter than the portal render

All renders had another lamps inside the interior (point and mesh lamps). I also applied small correction in Lightroom - the same for all the renders (I wanted to compare a real world scenario).

My thoughts - it is clear that the second render is much less noisy than the other two. The difference between the first and third render is not that big (!) This is quite strange because it is very different result than what we can see with simple scenes. I guess this is caused by other lamps that can cancel out the advantage of portals.

Edit: I noticed that on the first render the portal didn’t completely covered the opening (I set it the same way as the emission plane) so I changed that and rerendered it but the result is almost the same:

Please ignore the missing chair and misplaced board on the wall - it is caused by some strange cycles bug with placing groups into scene that randomly appears.

I think there’s something weird with HRDs. It can be seen in the scene I posted above. Portals+HDRs are noiser than without portals.

Mine are rendered with HDRIs

It’s not strange, it’s just a bad test. If you want to know what kind of improvement portals bring, you need to disable all other lights and compare. The contribution of the environment light will appear as much less noisy. Of course, if that contribution is small compared to the other lights, the noise of the other lights will still dominate (but not cancel out!). Also, you can only sample so many lights per pass, so adding more lights decreases the likelyhood of any one being sampled (which can cause noise). Mesh lights are the worst of all, you shouldn’t even be using them in such a scene.

That HDR has a couple of very bright spots of light compared to the rest of the environment and requires a very high MIS map resolution. It’s good to know that it doesn’t improve for such an image, but you can’t generalize from that.

I made a blog post about light portals its pretty much a tutorial for those who need help

If you see the second render you can see that the other lamps are not contributing too much noise as the noise is not that clear. This means that the main source of noise is the portal and HDRI. It might be a bad test but it shows that in real use the portals don’t offer any advantage compared to mesh lights. I can barely imagine an interior scene that is lit only by the environment light, so the test that don’t involve other lights seems useless to me.
As for mesh lights: I tested that a while ago and didn’t noticed any difference when using area light compared to using plane with emission shader…

The second image uses an area light, so it doesn’t compare. If that gets sampled, it will get very high importance. What I mean is, if you have several lights and the portal, your portal isn’t going to get sampled a lot (and neither is your HDRI). That’s when you might want to use branched path tracing. So having the other lamps there causes noise. As cdog’s test shows, it can also depend on the HDRI you use.

This means that the main source of noise is the portal and HDRI. It might be a bad test but it shows that in real use the portals don’t offer any advantage compared to mesh lights.

Yes they do. You get to use the light environment, you don’t have to have some shape to reproduce it. Of course putting a large area (or simple mesh) light is much more efficient than sampling an HDRI in general, that’s comparing apples and oranges. Portals still make sampling that HDRI much more efficient, as you can see in the tests that were performed.

I can barely imagine an interior scene that is lit only by the environment light, so the test that don’t involve other lights seems useless to me.

You can’t? Do you leave the lights on in your home at broad daylight?

As for mesh lights: I tested that a while ago and didn’t noticed any difference when using area light compared to using plane with emission shader…

If it’s just a single face, there little difference to an area light, what I mean is you shouldn’t be modeling a lamp shape with many faces and then try to light your scene that way, because that is inefficient.

As long as you don’t post your scene, I can only speculate on what (if anything) makes it particularly inefficient to render.

Well, having environment + interior lights on is really common, most of the times it’s not a 1:1 representation of real scenarios.

The problem i got seems a weird bug, not a matter of portals or light contributing more or less then the other.
Anyone took a look? It’s in this post

I love you, Lukas.

WOW! These render have a huge difference. Has anyone tryed using this on a real project yet?

Thank you! I’ve been waiting for something like this, I hope it will be in master soon:)

Heya! Great to see light portals in Cycles!
Just one issue with that: I set up a simple scene like yours and I tryed to bake textures with Cycles. Every time it gives me a black texture (not baking any lighting on it), while with the stable 2.73 release I can do it ok, without your light portals obviously. Were you aware of that? Any workaround to make it work?

Hdr https://www.flickr.com/photos/joethorntoniii/16296775886/in/photostream/
Lord Odin
I am also using a 970 and so (kernel _sm_52.cubin) and exits error.

CUDA error_ Not found in cuModuleGetGlobal(&cumem,&cubytes,cuModule,name)

Another great feature by Lukas :smiley: I hope this doesn’t conflict or de-prioritize the adaptive sampling patch however. Anyway I see some great improvements in the screenshots, and hope this also makes it into Blender soon!

sorry for my english
maybe you already know about this bug, but
if you disable \ enable checkbox Is Portal, then lightportal stops working. We need to create a new portal or change device CPU / GPU.

https://youtu.be/t66rzSGN3F0

Attachments

LP.blend (458 KB)