hi Ife,
thanks for reporting this. yes, I have noticed the stalling situations since the early days of MMC. it has some built-in heuristics to prevent stalling, but no matter how small the chance this may happen, MC seems to always have a way (not surprisingly) to bump into it, as long as the photon number is big enough.
ray stalling is a classic graphics ray-tracing problem, known as "self-intersection", see
https://www.kns.org/files/pre_paper/49/23S-249-%EA%B6%8C%EC%84%B1%EC%A4%80.pdf
https://developer.nvidia.com/blog/solving-self-intersection-artifacts-in-directx-raytracing/
the root cause of the issue is the limited precision (floating-point) when performing ray-triangle intersection testing - after advancing a ray to the intersecting surface, you hope that its next intersection will be in a different triangle, but limited precision may result in the ray hitting the same triangle again and again, and get trapped.
almost all mesh-based MC codes have some sort of built-in heuristic to "nudge" the ray/photon beyond the intersecting surface, so that it can move on to the next intersection. most of these heuristic involves adding a small increment (epsilon) sufficiently big to overcome the precision limit. However, such epsilon is not robust and guarantee self-intersection won't happen.
in comparison, mcx also has to handle such self-intersection at all voxel boundaries. it manages to achieve a robust solution by first rounding to the integer (exactly on the voxel boundary), and then take an nextafter operator to ensure that the resulting coordinate passes the boundary in the velocity's direction. however, "nextafter" won't work for mesh data because coordinates are not along integers.
I have been experimenting some new heuristics to more robustly detect such trapped photons and minimize such self-intersection. hopefully in our next release, this could improve.
Qianqian
You don't often get email from ifechiej...@gmail.com. Learn why this is important
--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mcx-users/9b5f2512-2dc1-44a2-b52d-4fe3e1452276n%40googlegroups.com.