Details
Diff Detail
- Repository
- rB Blender
- Branch
- soc-2022-many-lights-sampling
- Build Status
Buildable 24631 Build 24631: arc lint + arc unit
Event Timeline
When traversing the light tree, the original paper uses the bounding box to compute distance and angles for the node importance. However, when computing the importance of a single emitter, we could make use of better knowledge of the respective quantities. Before this patch, this idea is only applied to spot and point lights, now we also support mesh and area lights.
The original paper computes a conservative estimation, i.e., the maximum possible contribution a cluster could make to a shading point. However, this results in an overestimation for emitters with spread. Therefore, we add a minimum possible contribution min_importance, then select two emitters separately based on min_importance and max_importance, and finally randomly choose one of them. This idea stems from the paper Real-Time Stochastic Lightcuts, page 5. For us, the most important term is the maximal outgoing angle from an emitter (cos_max_outgoing_angle), because that's where emitters with spread might have zero contribution. This is different from the paper Real-Time Stochastic Lightcuts, which only considers minimal and maximal distance. For spot and area light, we do compute the minimal and maximal distance to the shading point, however, the computation would be too expensive for area and mesh lights, so we simply use the distance to the centroid, as in the original paper. In this case, min_distance might not be an ideal name for a variable.
If adding min_importance also to light clusters, we see the improvement in scenes with multiple light sources with spread.
| scene | without this patch | with this patch | master |
| light spread, 16spp | |||
| two spot lights, 2spp | |||
However, with this patch, the variance is increased in scenes with a lot of mesh lights, because theta_o is set to π to take account of the fact that the mesh light might be double-sided. This causes min_importance to be zero most of the time. Setting theta_o to zero while properly considering the surface orientation should solve this problem (in the future).
| scene | without this patch | with this patch | theta_o=0 | master |
| instanced mesh lights, 16 spp |









