Mentions légales du service

Skip to content

Importance Sampling the wavelength for glasses in spectral multiplexed mode

MURRAY David requested to merge dmu_glass_spectral_sampling into master

When crossing a glass in spectral multiplexed rendering, only one wavelength (one spectral bin) is kept. Currently the sampling for this wavelength is uniform which is inefficient for colored glass.

This branch replaces the uniform sampling with importance sampling based on the per-wavelength transmittance of the material. That way, wavelengths which are likely to contribute the most are kept more often.

When the material is only slightly colored and does not present many variations in its transmittance, uniform sampling is still used to avoid computing, storing and using a CDF and PDF on the GPU.

Comparison in term of mean variance, time, and efficiency (= 1/(Variance*Time), higher is better) with 46500 ray per pixel (128x128 pixels):

Sampling Mean Variance Time Efficiency
Uniform 0.000024 379.18s 107.73
IS 0.000012 372.15s 231.73

To reproduce: ./malia -log_variance -samples 46500 -wr 380:750:4 -wpp 93 -logging 3 -scene glass_sphere.msf

Scenes :

To compare either use the master branch with kappa = 0 and using only extinction parameter, or IS must be disabled manually in microfacet.cu, ask me if needed.

Edited by MURRAY David

Merge request reports