+1 to what @PeterZatko said. Photon mapping, ironically, is the most straightforward approach for this. You can get that done by directing the photons to the mouth of the pipe using a photon-port (the photon map manual). @mostapha and I started a dialog with the lead researchers of Photon Mapping to implement this in HB[+], but it will be a while before it all falls into place.
The other point-in-time approach using rpict might require you to run genBSDF first to encapsulate the diffuse part of the calculations in a separate XML data structure and then use BSDFs “in-scene” (see this and this).
The phase(matrix)-based approach is somewhat complicated. It is also probably the most inaccurate as we dont do much by the way of specular calculations in Three-Phase or Five-Phase. Last I checked there were no empirical validations for this approach (within this context). In case you want to give it a shot, here is a demo of what worked for me the last time I tried. The images on the bottom are from a four-phase simulation (on the left is DC).
The matrix order for tracing rays is something like shown in this script: https://gist.github.com/sariths/f36e458dd06ef5658f18172ddb143df8
. If you use Andy’s approach from the presentation that Peter shared, remember to use the “light” primitive as recommended by him on page 96 (in HB[+] all matrix calculations are currently Monte-Carlo based and therefore employ glow instead of light) .