ospray icon indicating copy to clipboard operation
ospray copied to clipboard

GeometryLight reduces effect of HDRILight

Open mnaehrig opened this issue 2 years ago • 0 comments

Following image was rendered via pathtracing. It contains just a single HDRI light and simple geometries with Principled materials: hdri_only

If we add a geometry light (small sphere with Luminous material), the overall brightness is significantly reduced: hdri_and_geometry_light

We found out that this issue was introduced with commit cbf9d26. So it can't be reproduced with OSPRay 2.7.1 and earlier. A possible fix is to change computation of selectionPDF in VirtualLight.ispc from:

const uniform float selectionPDF = rcp((uniform float)pathContext.numLights - w->pathtracerData.numGeoLights);

to:

const uniform float selectionPDF = rcp((uniform float)pathContext.numLights);

But currently I'm not sure if this change has unexpected side effects.

mnaehrig avatar Jan 31 '23 07:01 mnaehrig