80 likes | 285 Views
Assignment 1 Ambient Occlusion. Description. To render the scene with ambient occlusion and environment map lighting. Three phases Compute occlusion value for static ambient occlusion Render the scene with static ambient occlusion and lighting from environment map.
E N D
Description • To render the scene with ambient occlusion and environment map lighting. • Three phases • Compute occlusion value for static ambient occlusion • Render the scene with static ambient occlusion and lighting from environment map. • Dynamics ambient occlusion.
Implementation • Phase 1 • Preprocessing stage • Compute the per-vertex occlusion value for the input scene. • A good mechanism for speeding up the ray casting process may be required. • Run-time stage • Render the scene using traditional rendering pipeline with the per-vertex oclusion value as the vertex color. • Disable the lighting calculation (glDisable(GL_LIGHTING);). • Assign the occlusion value as the vertex color using glColor(occlusion value);.
Implementation • Phase 2 • Preprocessing stage • Compute the per-vertex occlusion value (in phase 1) and bent normal for the input scene. • Run-time stage • Render the scene with environment map lighting using vertex shader. • Fetch the content of environment map using bent normal and occlusion value. • calculate lighting effect for the vertex using the fetched texture value as the light source. • Graphics hardware with feature of dependent texture read for vertex shader is required (NVidia Geforce 6 series…)
Implementation • Phase 3 • Extend the static ambient occlusion to support animated models. • The occlusion value and bent normal for each vertex are computed in run-time stage. • Approximation of occlusion value and bent normal. • Hierarchical structure for speeding up the calculation (optional). • See GPU Gems 2 Chap. 14 for more detail. • Render the scene in the same way as phase 2.
Notes • The input mesh is in Wavefront OBJ format. • The animated models are saved as s series of OBJ files with the same topological structure. • The program can be written using either • OpenGL and GLSL (recommend). • Direct3D and HLSL.
Resources • Articles • Landis, H. Production-Ready Global Illumination. Siggraph 2002 Course Notes • Pharr, M. and Green, S. Ambient Occlusion. GPU Gems Chapter 17 • Bunnell, M. Dynamic Ambient Occlusion and Indirect Lighting. GPU Gems 2 Chapter 14 • Implementation • Cignoni, P. ShadeVis: Computing Ambient Occlusion. • (http://vcg.sourceforge.net/tiki-index.php?page=ShadeVis)
Important dates • 04/10/2006 Assignment 1 announced. • 04/24/2006 Phase 1 DEMO • 05/08/2006 Phase 2 DEMO • 05/22/2006 Phase 3 DEMO