How to obtain "throughput" at each surface intersection in mitsuba? #1401
-
Hi there, I’m implementing a "path guiding" algorithm in Mitsuba. I’m trying to extract the throughput at each surface intersection during path tracing using the following code: while loop(active):
... # path tracing code
thp = throughput.torch()
valid = si.is_valid().torch() However, this doesn’t seem to produce the correct results. Could you please advise on the proper way to obtain the throughput at each intersection? Thank you in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @woAIxuexiSR, You did not give much information so I am assuming that you are trying to run the latest version in JIT mode ( You can switch from symbolic mode to wavefront mode with the following flag (I think), but you should expect a big slow-down and increased memory usage: dr.set_flag(dr.JitFlag.SymbolicLoops, False) See also this discussion about recording paths: #187 |
Beta Was this translation helpful? Give feedback.
Hello @woAIxuexiSR,
You did not give much information so I am assuming that you are trying to run the latest version in JIT mode (
cuda_*
orllvm_*
variants).By default, Mitsuba integrators run in symbolic mode, meaning that the path tracing loop gets executed in a single kernel. A great advantage is that intermediate values can be kept in registers, without constantly writing state out to global memory & reading it back in at each bounce.
But it also means that you cannot break out of the loop mid-way to start executing PyTorch code.
You can switch from symbolic mode to wavefront mode with the following flag (I think), but you should expect a big slow-down and increased memory usage: