Skip to content

⚡💻 OpenGL application inspired by Walt Disney Animation Studios BRDF Viewer. A BRDF Viewer that support standard RGB and spectral data (tristimulus values) color calculation.

License

Notifications You must be signed in to change notification settings

chicio/Spectral-BRDF-Explorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spectral BRDF Explorer

Build iOS GitHub license Supported platform

OpenGL ES application inspired by Walt Animation Disney Studios BRDF Viewer. A simple application thats shows some of the most famous lighting model used in computer graphics and that supports color calculation using RGB and spectral data of lights and object surfaces.


Introduction

In computer graphics usually color calculation is usually done using RGB colors. As a consequence of the fact that light is a subset of the entire electromagnetic spectrum, color in rendering can be computed using spectral distribution data, the tristimulus values and the correlated CIE XYZ color space (Kang, 2007 [1]). This color space was created by the main authority on color and illumination: International Commission on Illumination (CIE). The formulas that define the tristimulus values are (Kang, 2007 [1]):

In this way it is possible to render scenes with high color fidelity, that could show physical phenomenons like metamerism, impossible to obtain with standard RGB data.


Overview

Spectral BRDF Explorer is an OpenGL ES application for iOS and Android devices that support multiple lighting models and color calculation using spectral data of lights and object. It supports 5 lighting models:

  • Phong [2]
  • Blinn-phong [3]
  • Lambertian
  • Oren-Nayar [4]
  • Cook-torrance [5]

All the lighting model above are implemented in specific fragment shader in two version: a RGB version and a spectral one. To show this lighting models I created two scenes, each one with support for RGB or Spectral colors.
The scenes support also other computer graphics technique (not strictly related to the spectral data calculation):

  • shadow mapping
  • skybox (cube map texture)

Scenes

Scene 1

  • RGB data
  • all lighting models
  • Skybox and shadow mapping

Scene 2

  • Spectral data
    • Illuminant D65 [6] and Macbeth color checker [7] spectral data
  • all lighting models
  • Skybox and shadow mapping


Other projects

For other information about color calculation in computer graphics see my thesis project Spectral Clara Lux Tracer: Physically based ray tracer with multiple shading models support and Color Rendering Index (CRI) evaluation.


References

[1] H. R. Kang, "Tristimulus specification," in Computation color technology, Bellingham, Washington: SPIE Publications, 2006, ch. 1, pp. 1-16

[2] B. T. Phong, “Illumination of Computer-Generated Images,” Communications of the ACM, vol. 18, no. 6, pp. 311-317, 1975.

[3] J. Blinn, “Models of light reflection for computer synthesized pictures,” in SIGGRAPH '77, San Jose, 1977, pp. 192-198.

[4] M. Oren and K. S. Nayar, "Generalization of Lambert’s Reflectance Model," in SIGGRAPH '94, Orlando, 1994, pp. 239-246.

[5] R. Cook and K. Torrance, "A reflectance model for computer graphics" in SIGGRAPH '81, vol. 15, no. 3, pp. 301–316, 1981.

[6] Wikipedia [Online]. Available: https://en.wikipedia.org/wiki/Illuminant_D65.

[7] D. Pascale, “RGB coordinates of the Macbeth ColorChecker,” The BabelColor Company, 1 June 2006. [Online]. Available: http://www.babelcolor.com.

About

⚡💻 OpenGL application inspired by Walt Disney Animation Studios BRDF Viewer. A BRDF Viewer that support standard RGB and spectral data (tristimulus values) color calculation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published