codeinsane on DeviantArthttp://creativecommons.org/licenses/by/3.0/https://www.deviantart.com/codeinsane/art/Happy-GGX-Buddha-202080444codeinsane

Deviation Actions

codeinsane's avatar

Happy GGX Buddha

By
Published:
1.9K Views

Description

Another experiment in BRDFs. The Happy Buddha model is lit by three spherical isotropic light sources and an HDR environment map. The rendering is done in real-time via OpenGL in a deferred manner.

See [link] for an animated version ( 33 MB, h264 codec, 16-235 color range ).

The vast proportion of irradiance variation in the image is due to per-pixel roughness differences, rather than albedo/specular intensity textures. The rough areas generally appear brighter, but produce dull, dimmer speculars.

Spherical area lighting is accomplished by using a pre-convolved look-up table for the BRDF. The basis is formed by Michael Ashikhmin's "Distribution-based BRDFs". The approach requires storing a 1D Normal Distribution Function (NDF) in the half-angle space (same as in any microfacet reflection model). This NDF can be convolved by assuming a spherical light source, yielding a 2D look-up texture. The analytical GGX reflection model is plugged here, with a variable roughness parameter, all in all, resulting in a 3D look-up texture plus some arithmetic common to all dBRDFs.

Naturally, the cosine term by which you normally multiply radiance for "game rendering" with point lights would be incorrect here. Instead, the approach uses an approximation due to John Snyder ( "Area Light Sources for Real-Time Graphics" ).

Environment mapping is done by Monte Carlo integration over the BRDF in the pixel shader. Importance sampling (based on the inverse CDF of the NDF, stored in another look-up texture) plus careful environment map mip selection helps reduce the noise and improve performance ( higher LoD bias = less texture cache thrashing ). 24 samples per pixel are used in the current version.

The screenshot collage contains 50% downsampled versions of the original images ( Lanczos-3, proper gamma treatment :D ), hence the noise from environment mapping is less apparent. Showing the original stills would not make much sense either, as the noise is animated and the perceived, subjective noisiness is closer to the one depicted in the downsampled images.

Environment mapping is rendered in a separate deferred pass to improve performance. Due to GPU rasterization specifics, with forward rendering, you may pay up to 8x shading cost for meshes composed of small triangles. The environment mapping is rather costly, hence doing it as a deferred pass gives a noticeable speedup, especially in case of the highly tessellated Happy Buddha model.
Image size
1050x1680px 499.17 KB
Comments0
Join the community to add your comment. Already a deviant? Log In