CS513 Assignment 5.2: Translucent Frank (as of Nov 13, 2009 morning)
by Muhammad Karim
General Configurations:
   # Development Platform: Windows 7 x64, Visual Studio IDE, Debug+Release build
   # Used OpenFrameworks library
   # CPU: Intel Core2Duo 2.24 GHz
   # Graphics Hardware: ATI Mobility Radeon HD 3470 (OpenGL 2.1)
-
Translucent Frank Results
Frank Rendered with Multiple Blur Passes
Frank is rendered in this image with 4 blur passes (using Gaussian filter with Sigma=4.0, 7 samples). The Gaussian
weights were computed using the object space distance of the fragment samples. LightMap texture were of 1024x1024 resolution.
Comparison between Different Blur Radii (Passes)
Frank is rendered using 1, 2 and 4 blur iterations respectively. Each pass takes N samples either in Horizontal or in
Vertical dimension (alternated between each pass)
(Earlier) With Blurred Lightmap
The lightmap is blurred using a static blur kernel, that uses constant gaussian weights on the 7 neighboring fragments
in both x and y dimensions. (reference fragment, 3 on one side, 3 on other side)
(Earlier) With Blurred Lightmap
The lightmap is blurred using a static blur kernel, that uses constant gaussian weights on the 7 neighboring fragments
in both x and y dimensions. (reference fragment, 3 on one side, 3 on other side)
(Earlier) With non-blurred initial Lightmap
Frank is rendered after applying the lightmap texture (found artifacts on map seams, need to fix!)
\
-
Discussion:
-
Frank's lighting was initially rendered in a LightMap and his object space positions were baked into a Texture. These textures were passed into
the final blur shader that blurs the LightMap. Finally, the blurred LightMap was applied on Frank.
-
LightMap, Baked position textures were of 1024x1024 resolution.
-
To implement multiple blur passess effectively I used 2 (Source and Destination) buffers and ping-ponged between them to update the LightMaps. At each pass
I always read from the Source buffer and Render into the Destination buffer, and then swap the buffers. So while rendering I always use the Source buffer LightMap.
-
In each pass I applied the Gaussian filter to either horizontal neighboring samples or vertical neighboring samples. This produces correct results
since the 2D filter is separable into two 1D filters that goes each dimensions in sequential passes. So in every pass I alternate between the dimensions.
-
The fragment shader to blur the LightMap is configuration using the following parameters:
-
horizontal: (0/1) which dimension to take neighboring sample from to make the filter kernel
-
lookupDist: distance between neighboring fragment samples (I used 2 in the images above)
-
numSamples: number of fragment samples to use for the filter
-
sigma: the standard deviation used in the Gaussian filter function (I used 4.0 in most cases)
-
More blur radii means more passes means more computations and slowdown in the framerate.
-
The texture seams are the only remaining issue to fix.
-
The Blur LightMap shader is here.