It is possible to define an auxiliary dependent variable for the optical path length by selecting the Compute optical path length check box in the
Additional Variables section of the physics interface node’s Settings window. Initially, the optical path length is set to 0 for all released rays. It is possible to reset the optical path length to 0 when the rays interact with boundaries.