Propose a solution about fixing connection of delta emitters to senso…#1848
Open
dongclin wants to merge 1 commit intomitsuba-renderer:masterfrom
Open
Propose a solution about fixing connection of delta emitters to senso…#1848dongclin wants to merge 1 commit intomitsuba-renderer:masterfrom
dongclin wants to merge 1 commit intomitsuba-renderer:masterfrom
Conversation
…rs with spatial extent in ptracer
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.
Description
Address the limitations of the default ptracer integrator when simulating a system with delta emitters (e.g. Spot/Point Lights) and spatially extended sensors (e.g. Irradiancemeter)
ptracerimplementation, point light produces negligible signal (on the order of10^-6)ptracerseems originally be designed for a pinhole camera, since the probability of a ray from a delta emitter to a delta sensor is zero, the integrator explicitly prevents connections between these. refirradiancemeterfrom an area light (which is not delta light) remains nearly constant regardless of the distance between the emitter and the sensor, it should probably follow the inverse-square law.irradiancemeter::sample_directionreturned a fixed weight ofdr::Pi. refSuggest fix
ptracer
has_framecheck to verify a valid normal exists before performing coordinate transformations or back-face checks. (Since a delta light wound't have a normalsi.n)irradiancemeter
(1 / (PDF * surface_area)).Testing
To validate the modifications made to the
ptracerintegrator and theirradiancemetersensor, a numerical verification test was performed by comparing simulation results against an analytical solution for a fundamental optical setup.The test considers a disk of radius R centered at the origin (0,0,0) in the xy-plane, illuminated by a point light source with radiant intensity I (Watt/Steradian) located at height h on the z-axis.
Analytical solution
Scene setting
Test Results:

ptracernow successfully captures signals from a point light source, resolving the connectivity issue.Additionally, unit tests were implemented for the
test_incoming_flux_integratorfunction. During these tests, the measured value ofmi.TensorXf(img)was approximately 3.8, which is consistent with the theoretical expectation ofradiance * dr.piChecklist
cuda_*andllvm_*variants. If you can't test this, please leave below