is there any reason area lights are still not directly visible in Cycles? It doesn’t make any sense from light transport perspective to have illumination coming from nothing. It makes area light very difficult to use. Most of the time I have to resort to emissive geometry, which comes with significant performance cost. Right now, for Cycles, there is no win scenario when using area lights.
Furthermore, Area Light even has visibility flag for camera:
And it is the only one of those flags that is not respected, so this is on the border of being a bug. Bug or a limiation, either way, it should really be fixed as not having visible area lights is just a no go for any kind of even basic production scenario.
It might be worth it to add lights to the main BVH just like any other geometry while we’re at it. Right now Cycles is doing a naive O(n) loop over all light sources to find intersections which scales terribly and becomes unusable when you have 100s of area lights.
@StefanW that’s out of my knowledge, maybe you can create a second patch that can be added as a patch to be applied after your many lights sampling patch, and with that we can solve this.
Right now this patch has a problem because if the light is not powerful enough it’s kind of transparent.
In any case I would like to continue working with this and leave it as a functional patch, can you please take a look at my current show-stopper and give me some clues about that?
Of course all the hard work comes from @lukasstockner97 , and I would have been unable to do this without the help and guidance of @povmaniac and @brecht
I will upload the patch as a new one, just because I’m not sure I can update the Lukas patch.
And it is already implemented in our build, I’ll upload a new version to graphicall tomorrow probably.
It has a limitation or side effect that I don’t know how to change, if the light is not powerful enough it is kind of transparent, not sure why, and I’m also not sure where to look for this, but I don’t think it’s a big problem either.
Here is the actual DIFF if anyone wants to try it:
The sampling code for emissive triangles and emissive area lights is about equally efficient. As long as you leave them as large quads and don’t tessellate them for no reason, quality should be good.
I have a workaround way to see the area light. I usually place a glass material in front the area light or the view camera, it makes I can see the it easily.
To minimize the performance lost, I set the glass material ior to 1,that is very fast.