Skip to content

cgaueb/light_probe_placement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Illumination-driven Light Probe Placement

Overview

This repository contains the source code of a prototype implementation of the Eurographics 2021 Poster: Illumination-driven Light Probe Placement, in the form of a Unity component. Some test scenes are also included. However, the source code can be simply added and used in a Unity project without the additional content in this repository.

Some helpful/quick links are:

Key Features:

  • Light Probe/Evaluation Point Placement Types: Grid (good for Light Probes), Stratified, Random, Poisson (good for Evaluation Points)
  • Stopping Conditions: Minimum Probes and Maximum Error
  • Two illumination-based simplification options:
    • Luminance, for scenes with similar light colours, i.e. to retain a higher probe density at regions with high luminance transitions
    • Chrominance, for scenes with contrasting light colours, i.e. to retain a higher probe density at regions with high chrominance variations

Table of Contents

Algorithm Overview

This work proposes a light probe simplification method that preserves the indirect illumination distribution in scenes with diverse lighting conditions. This is accomplished through an iterative graph simplification algorithm that discards probes, according to a set of evaluation points, that have the least impact on the global light field.

UIPanels

Briefly, the algorithm consists of two stages: Setup, to generate the reference light probe configuration, and Simplification, to perform the graph decimation.

Setup steps:

  1. Generate a (dense) set of light probes (LP)
  2. Compute the LPs radiance field (e.g. SH coefficients) and store them in a graph
  3. Generate a set of evaluation points (EP)
  4. Compute the EPs incident energy by sampling a set of directions around each EP. The incoming energy for each direction is determined by interpolating the k-nearest LPs from the graph. Store either the result of each direction separately, or the average over all directions (approximate result, but less sensitive to outliers)
  5. Store the EP incident energy as a reference

Simplification steps:

  1. While the requested minimum LP set and/or maximum error is not reached:
    1. Iterate over all LPs
      1. Select a candidate LP to remove and compute a new temp graph (with n-1 LPs)
      2. Compute the new radiance field for the EPs, as in 1iv
      3. Compute the error with the reference field as:
        • Convert the RGB values to Luminance-Chrominance, like YCoCg [MS03]
        • Compare the YCoCg components using different weights to preserve different illumination characteristics (e.g. Y=1,Co,Cg=0 for Luminance-driven and Y=0.1,Co,Cg=0.45 for Chrominance-driven simplification)
        • Compute the final cost based on absolute percentage errors, e.g. SMAPE, or others
      4. Keep this graph configuration if it has the minimum error and go to a
    2. Replace graph with the n-1 LP graph with the minimum error

Unity Component Instructions

To Import

  • Add a Light Probe Group object to your scene
  • Import the contents source code of the Unity component and add the LumiProbes script in the Light Probe Group

To Run

  • The component is configured in two panels: the Placement panel (left), which places the LPs and EPs, and the Settings Panel (right), which configures optimisation parameters:

UIPanels

  • Once these are set, click Bake Light Probes (Async) and Run Optimiser (right):

Optimisation

The entire process is also illustrated for a test scene below: Examples

All messages are logged in the log file: LumiProbes_log.txt.

How to Cite

The license is MIT. If you use the contents of this repository for your work, please cite it as described below:

LaTeX and BibTeX example usage

In our work, we have used the source code~\cite{Vardis_2021_EG_2021_Poster}, available at 'https://github.com/cgaueb/light_probe_placement'.
@article{Vardis_2021_EG_2021_Poster,
    booktitle = {Eurographics 2021 - Posters},
    editor = {Bittner, Jirí and Waldner, Manuela},
    title = {{Illumination-driven Light Probe Placement}},
    author = {Vardis, Konstantinos and Vasilakis, Andreas Alexandros and Papaioannou, Georgios},
    year = {2021},
    publisher = {The Eurographics Association},
    ISSN = {1017-4656},
    ISBN = {978-3-03868-134-2},
    DOI = {10.2312/egp.20211026}
}

Notes-Limitations

  • This is a preliminary version of this research work
  • High-processing times are currently observed for high EP-LP counts. Various pipeline stages allow for useful optimisations, e.g. by exploiting spatial locality during the generation of the new graphs.
  • With respect to the component implementation, some parts could be more conformant with Unity's implementation guidelines for productions purposes.
  • The component has been tested with Unity version 2021.1.4f1

Any advice/additions are welcome!

Acknowledgments

This research is co-financed by Greece and the European Union (European Social Fund) through the Operational Programme "Human Resources Development, Education and Lifelong Learning 2014-2020" for the project "Modular Light Transport for Photorealistic Rendering on Low-power Graphics Processors" (5049904).

The Office, Block15 and TestProbes scenes in this repository have been created by the CG AUEB Group. The Sponza model was obtained from Morgan McGuire’s Computer Graphics Archive. The Ethan character and all other scripts are part or have been modified from the Unity's Standard Assets.

The C# Poisson implementation for the LP/EP placement is based on Bart Wronski's implementation that you can find here.

References

About

Unity component for the implementation of the Eurographics 2021 Poster: Illumination-driven Light Probe Placement.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages