Fixed bug with un-normalised ellipse area lights not having proper area calculation and erroneously reverting to quad lights. #4
No reviewers
Labels
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: blender/cycles#4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "boberfly/cycles:fixes/ellipse_unnormalize_bug"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi all, not too sure how this one got away but we found in Gaffer that un-normalised ellipse area lights (we have disk lights similar to USD Lux) came out as quad lights again. This calculation should re-establish the pi calculation as well as the negative sign for the kernel-side code to detect that it is an ellipse again.
I am not sure if area calculation should be
-M_PI_4_F
or just-1.0f
for un-normalised ellipsed area lights though...Hmm something different but it's worth making a note of it, it seems like un-normalising of lights only works for specular reflection and not diffuse for some reason, for point and spot lights only.
https://github.com/GafferHQ/gaffer/pull/5239#issuecomment-1567538345
Looking into it, not sure exactly what's up here but it is probably in Cycles and probably an issue in the Hydra delegate also...
edit: some more hints, it looks like energy loss when increasing roughness on the spec lobe, so it isn't just diffuse.
If it works different for low and high roughness, I would expect there to be a different in the two multiple importance sampling methods,
light_sample
andlight_intersect
.In Blender, the Debug panel has an option to disable MIS and switch between the two, to verify if they give the same result.
@weizhen is doing work in this area currently, to get more correct and physically based light units.
I remember that point/spot lights are an approximate of an oriented disc, so I am not sure if that has something to do with things, so I'll re-link an old patch from @Stefan_Werner here:
https://archive.blender.org/developer/differential/0004/0004676/index.html
Not too sure if it might be "the time" to integrate this over the approximate in another PR for 4.0 (if at all). I will do a test of this soon.
I am working on changing point light to sphere light #108506. How to deal with spot light I'm not sure yet.
Hi @weizhen
That's great news! For spotlights, USDLux/Prman treats these exactly like sphere lights except it has "shaping" applied to it to be in the shape of a cone or an IES profile applied:
https://openusd.org/dev/api/class_usd_lux_shaping_a_p_i.html
If that helps you in figuring out how to deal with spot lights.
This should be addressed now.
Pull request closed