LuxCoreRender / LuxCore

LuxCore source repository
Apache License 2.0
1.16k stars 145 forks source link

Physically accurate Monte Carlo photon transport simulations #588

Open fangq opened 2 years ago

fangq commented 2 years ago

This is not a bug report, but a question and request for pointers

I recently bumped into this project as I read about Blender 3.2, and was attracted by the "physically correct" rendering capability of this library, and would love to understand more about LuxCore's features and perhaps consider further utilities of this library for research purposes.

My group has been developing GPU Monte Carlo (MC) photon transport simulators over the past decade, see

http://mcx.space/ https://github.com/fangq/mcx (CUDA based - voxelated volume) https://github.com/fangq/mcxcl (OpenCL based - voxlelated volume) https://github.com/fangq/mmc (OpenCL/CUDA/SSE based - tetrahedral meshes) http://mcx.space/#publication

The user community of our tools are largely optics researchers, biomedical optics instrumentation design and data analysis. Our implementation provides quantitative solutions to the radiative transfer equation (RTE) using MC stochastic simulations, and has been serving the "gold-standard" solutions to many optics measurements. Because most of our applications require rigorous modeling of light-tissue interactions in the wavelength ranges of visible and near-infrared (NIR) light, therefore, modeling the high-scattering nature of the medium has been a main focus.

Under the hood, our MC simulator is basically a parallel ray-tracer that can simulate random photon packets across 3D spatially-varying tissues/shapes. Comparing to most computer-graphics based ray-tracers/renderers, our MC simulators can handle volumetric scattering, scattering-phase-functions/anisotropy (g) and output both surface-based light intensities (in our field, we call it diffuse reflectance or transmittance) and volumetric light intensity (we call it fluence or fluence rate). Because it handles spatially-varying media, it requires a volumetric discretization - either in the form of a voxelated grid (as in MCX) or a tetrahedral mesh (as in MMC). The optical properties (absorption coeff, scattering coefficient, anisotropy and refractive index) are associated with volumetric elements (voxels/tet) instead of surfaces as in most CG rendering engines. Because our simulators are physically accurate and are meant to guide scientific experiments, so the computational speed has been much slower compared to most rendering engines.

Because of this, I would like to know

We are currently working on implementing our physically accurate MC simulations using rendering APIs (optix, shaders etc). Since I notice this library, I've love to explore the possibilities of building our next-gen simulator using this library - if it is not too far from where we are standing.

thanks, appreciate any comments or pointers.

Dade916 commented 2 years ago

LuxCore handles volume absorption and scattering, both for homogenous and heterogenous volumes. LuxCore also supports heterogenous volumes read from https://www.openvdb.org files (so you can represent pretty much anything you want). It supports both OpenCL and CUDA acceleration.

However, it is designed and tested for visual simulation (i.e. architectural visualization, industrial design, etc.) so, while the results should be correct from the numerical point of view, they are never been validated with a comparison with real and simulated values: I don't think LuxCore is a tool suited for your application.