Spectral Rendering on the GPU – now with bumps

My GLSL spectral rendering shader (here & here) is now able to do some (environmental) bump-mapping. It does physical wavelength-based thinfilm interference with sampled SPD‘s on the GPU in realtime. All parameters are adjustable at runtime. I’ve implemented five distinct “film-setups” that have different ways to interpret/change film thickness and normals of film and object surface. The setups are outlined in this sketch:


Here’s a textual description:

  1. A simple film with constant thickness covers the object.
  2. The surface of the object is “bumped” and the film has a constant thickness.
  3. Both object and film use regular normals, but the thickness of the film varies. This is fake but looks nice:D.
  4. The object remains unchanged while the film (thickness + normal) is bumped. Basically 3, but correct.
  5. The object is bumped and the thickness is modulated such that the film’s surface is “flat”(like setup 1). The inverse scenario of 4.

Finally some screenshots from the same angle and same film settings: refraction index=1.09, tilm-thickness:550-1170nm, CIE D65 light, silver material. The matte utah teapot is shown on the left, the shiny teapot on the right:

Teapot_Matte_Setup1 Teapot_Shiny_Setup1Teapot_Matte_Setup2 Teapot_Shiny_Setup2Teapot_Matte_Setup3 Teapot_Shiny_Setup3Teapot_Matte_Setup4 Teapot_Shiny_Setup4Teapot_Matte_Setup5 Teapot_Shiny_Setup5

(Click on image to enlarge)

I hope to be able to record a demo video soon (~ this week). While going through the sourcecode I also noticed that there’s no dispersion as the refraction index is const. This should be easily adjustable, I just need some data. 

Also, while the uffizi gallery is nice I’d like to try out some other cubemaps (m.be. from Humus) and some other models. Maybe a wobbling soapbubble?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>