mitsuba-renderer / mitsuba3

Mitsuba 3: A Retargetable Forward and Inverse Renderer
https://www.mitsuba-renderer.org/
Other
2.1k stars 246 forks source link

Traversable batch sensor [closed because wrong branch with bad history. New PR #1297] #1296

Closed DanielPSchenk closed 2 months ago

DanielPSchenk commented 2 months ago

Closed because of bad git history (non-cleaned branch), will make a new one soon

Description

Currently the parametes of child sensors of batch sensors can not be modified because there is no traverse function for the batch sensor. I need this functionality for a project, so I quickly implemented it. The traverse function iterates the vector of sensor references, calling the appropriate function for pushing the child sensors to the traversal callback with object name "sensor\<NUMBER>". I did not test automatic differentiation as I have no usecase at hand where I could really test if my solution works. I do not see a reason why it might break down, but because this is untested, I set the children parameters to nondifferentiable to not create the impression that this is an intended feature.

Testing

I tested that the child sensor to_world transformations can be changed and fov can be set. I also ran a test for performance and stability with 100 random sensor transform changes and had no crash or performance degradation.

Checklist