Modern OpenGL relies heavily on GLSL shaders. They are needed for pretty much everything you draw. To ease the handling of shaders I’ve decided publish my shader-collection (well, part of it, for now) on github. The shaders are sorted by GLSL version (currently: version 1.5, webgl 1.0) and “purpose”. Their implementation is focused on readability, not speed. Hence, they can be optimized quite heavily and be combined as well. Anyway, here’s the link:
More generally speaking it does dynamic thin-film interference of hollow convex two-sided objects in a deferred rendering configuration. In two passes front and back are rendered and the ray is traced through the object. To give you a better idea I screen-captured my demo-program and uploaded it:
As before all physical parameters of the shader can be changed at runtime (as seen in the above video). Bear in mind, that the program uses OpenGL 3.2 core and runs on my late iMac 2011 – it uses a Radeon 6960M, a mobile GPU.
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:
A simple film with constant thickness covers the object.
The surface of the object is “bumped” and the film has a constant thickness.
Both object and film use regular normals, but the thickness of the film varies. This is fake but looks nice:D.
The object remains unchanged while the film (thickness + normal) is bumped. Basically 3, but correct.
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:
(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?
I managed to successfully port some cg shaders over to glsl, gave them a spring-cleaning and integrated them into an OpenGL 3.2 core renderer (yeah, OS X 10.8 if you have to ask – bummer). It is kinda “the real deal”: thinfilm interference evaluated per lambda with interactive refraction indices, light + material spectral power distributions and thickness. I might have more results soon, so far these images below have to do:
Besides I still have other work todo, writing down my ph.d thesis…
As I was working with libSOIL (https://github.com/smibarber/libSOIL for a mac makefile) an exception occured and I couldn’t load anything. Turns out, libSOIL is not OpenGL 3.2 core compatible. Main reason for this is the beautiful safety-net which I encountered in the function
A GPU-based approach for scientific illustrations
Scientific illustrations are used for centuries in several scientific domains to communicate an abstract theory and are still created manually. In this article we present a GPU-based illustration pipeline with which such illustrations can be created and rendered in an interactive process. This is achieved by combining current non-photorealistic-rendering algorithms with a manual abstraction mechanism and a layer-system to combine multiple techniques. The pipeline can be executed completely on the GPU.
@ 15. Anwendungsbezogener Workshop zur Erfassung, Modellierung, Verarbeitung und Auswertung von 3D-Daten, Berlin (2012) 3DNordOst2012.bib
Interactive generation of (paleontological) scientific illustrations from 3D-models
Scientific illustrations play an important role in the paleontological domain and are complex illustrations that are manually drawn. The artist creates illustrations that feature common expressive painting techniques: outlines, both irregular and periodic stippling as well as an abstract shaded surface in the background. We present a semi- automatic tool to generate these illustrations from 3D-models in real-time. It is based on an extensible GPU-based pipeline to interactively render characteristic into image-layers that are combined in an image-editing fashion. The user can choose the techniques used to render each layer and manipulate its key aspects. Using 3D- and 2D-painting the artist can still interact with the result and adjust it to his or her liking.
@ XXII Congreso Español de Informática Gráfica, Jaén CEIG2012.bib