Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 4.47 KB

paper.md

File metadata and controls

72 lines (50 loc) · 4.47 KB
title tags authors affiliations date bibliography
Rawls: A Python package for managing `.rawls` image files
Python
Computer Graphics
Statistics
Global illumination
name orcid affiliation
Jérôme BUISINE
0000-0001-6071-744X
1
name index
Univ. Littoral Côte d’Opale, LISIC Calais, France, F-62100
1
9 June 2020
paper.bib

Summary

Global illumination methods based on stochastic techniques provide photo-realistic images. These methods are generally based on path tracing theory in which stochastic paths are generated from the camera point of view through each pixel toward the 3D scene (see \autoref{fig:path-tracing}).

Scheme of global illumination rendering of 3D scene.\label{fig:path-tracing}{ width=60% }

The Monte Carlo theory based on the rendering equation [@kajiya1986rendering] ensures that this process will converge to the correct image when the number of paths grows [@kollig2002efficient]. However, they are prone to stochastic perceptual noise that can be reduced by increasing the number of paths (see \autoref{fig:noise-overview}) as proved by Monte Carlo theory but requires a lot of time to generate such image.

Overview of noise evolution during rendering.\label{fig:noise-overview}

.rawls extension

In order to tackle this perceptual noise problem, some methods have been implemented in order to reduce variance and improve the rendered image [@delbracio2014boosting; @boughida2017bayesian]. Unlike online rendering statisticals methods, .rawls (for RAW Light Simulation) extension files can be used offline into a post-processing task in order to prepare huge dataset.

A .rawls file is a custom image file obtained as output of renderer. These files keep fully information about generated images such as rendering parameters (number of samples, integrator, sampler, camera...) and store all RGB spectrum values before gamma correction as float (32 bits).

.rawls contains 3 blocks and specific lines information within each block:

  • IHDR:
    • First line: next line size information (into bytes)
    • Second line: {width} {height} {nbChannels}
  • COMMENTS:
    • All lines: information from the renderer as comment
  • DATA:
    • First line: data block size
    • Next lines: all pixels values as bytes code at each line

Motivation

Rawls Python package have been developed to manage .rawls files format. Files with .rawls extension can be generated using custom pbrt-v3 [@pharr2016physically] renderer which enables to generate k images of n samples per pixels [@pbrtp3d] of the same .pbrt file 3D scene. Rawls Python package can load .rawls file, save it into .png, can also merge few .rawls images in order to extracts statisticals information from samples for each pixels distribution (such as Mean, Variance, Skewness, Kurtosis). As the distributions of pixels when rendering an image do not seem to follow a Gaussian law, paying attention to their distribution seems interesting.

Application

If we have a pool $10000$ images of $1$ sample per pixel, we can generate $\binom{10000}{k}$ of $k$ samples from pool of $10000$ samples (\autoref{fig:stats-overview} gives an example of extracted images obtained). In this way, deep learning techniques such as Autoencoder [@xie2012image; @chaitanya2017interactive] can be used for noise reduction as it's possible to have a huge image database. A deep learning model should intuitively generalize better by knowing the approximations of the distributions for each pixel.

Extracted statistics from 20 samples ditribution.\label{fig:stats-overview}

This package contains 2 main classes:

  • rawls.rawls.Rawls: manage .rawls file (loading, add comments, saving).
  • rawls.stats.RawlsStats: manage multiple .rawls files (fusion, statistics extration).

Documentation with examples is available at https://prise-3d.github.io/rawls/.

Acknowledgements

This work is supported by Agence Nationale de la Recherche : project ANR-17-CE38-0009

References