Expose quad lights with ANARI - #62
Merged
Merged
Conversation
Signed-off-by: Stefan Zellmann <info@szellmann.de>
Signed-off-by: Stefan Zellmann <info@szellmann.de>
Signed-off-by: Stefan Zellmann <info@szellmann.de>
Collaborator
|
i'll merge this already, BUT: could you possibly provide some sort of mini-reproducer in pynari for testing? just a plane with a box or sphere, and some quad light(s) shiniing on it? |
Collaborator
|
BTW: "I'll already merge this" means "I'll merge this if and when the tests have run through" :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR exposes quad lights via the Anari interface, plus a couple of fixes to make quad lights work again in shader code.
I'm currently computing the
"emission"value ascolor*intensity, but I'm not sure how barney interprets the physical quantities involved, exactly. (I opted forintensityas that was directly accessible from within Vela.) It would probably be (more) correct to interpret emission ascolor*radiance, assuming that quad lights emit the same amount of energy in all directions and at all angles (Cycles, e.g., has a spread parameter that allows to control the angular dependency, which Anari does not have, meaning it's probably more complicated than that). In that case we should probably convert intensity to radiance, but again not sure how barney would interpret that, exactly.At the moment, for my test scenes I have to set very high intensity values to see something (order of intensity=5000 for a scene where other devices require order of intensity=1.0). I also noticed that Barney applies inverse square fall-off to quad lights in the PDF and reservoir sampling weights, which I think is only valid for point light sources. (Point lights are also way darker than with other devices.)
Anyway, this PR enables quad lights to begin with, and I'm happy to adapt how emission is computed.