Efficient Storage and Importance Sampling for Fluorescent Reflectance
Content
This MR introduces polished implementation of CGF submission: "Efficient Storage and Importance Sampling for Fluorescent Reflectance".
To facilitate use of GMMs instead of reradiation matrices, multiple parts of the system are adressed:
-
Data representation
- Reradiation matrices
- Native ART representation (parsing and internal representation already in place)
- BFC files (i.e., format of rerad. matrices of RIT dataset used in the aforementioned paper)
- Parsing provided by !16 (merged) (this MR contains the same implementation, therefore !16 (merged) should be merged first, or deleted)
- Mapped to the same internal representation as native ART bispectral data
- GMM
- Parsing (Parser/ArfGMMFit) and internal representation (ColourAndSpectra/Arn2DGMMSpectrum) for newly defined ".gmm" files
- Works for both ASCII and Binary versions of the gmm files
- Reradiation matrices
-
Application of GMM in rendering
- Mainly sampling-related methods of ColourAndSpectra/Arn2DGMMSpectrum, specifically:
randomWavelengthShift
andattenuationForWavelengthShift
- Mainly sampling-related methods of ColourAndSpectra/Arn2DGMMSpectrum, specifically:
-
GMM fitting
- Source/CommandLineTools/compact_fluo/compact_fluo.py
- Single (Python) script implementation of the GMM fitting of bispectral data provided in the native ART format or in the BFC file format
- This script is "installed" (copied) together with other ART command line tools
- Based on a third party BSD 3 licensed fitting code
- Optional parameters include: fitting algorithm, number of gaussians, output filename and debug mode producing full description of the GMM in human-readable ASCII format
-
Transparent use of GMM
- When using BFC_AS_GMM in an arm file on a path to a bfc file, it is converted (by ART using the compact_fluo.py script) to a corresponding .gmm representation - saved next to the original file with additional .art.gmm suffix. This gmm representation is then loaded and used for rendering.
- Checking whenever conversion is required (gmm file does not exist or is older than last update to the bfc file) is applied.
- Can be tested on the Gallery/CompactFluorescence/DebugMeasuredAsFit.arm scene.
-
Gallery
- "CompactFluorescence" Provides three simple scenes of varying complexity based on the teaser image of the CGF submission:
- Full teaser, scene with three objects on top of a pillars and debugging scene with a single object (ball)
- Fluorophores in their original format (reradiation matrix), fitted representation (gmm) and also resampled gmm (reradiation matrix derived by sampling of the gmm representation) are provided
- "CompactFluorescence" Provides three simple scenes of varying complexity based on the teaser image of the CGF submission:
Edited by Vojtěch Tázlar