Interactive Shadow Interactive Shadow Generation in Complex Generation in Complex
EnvironmentsEnvironments
Naga K. Govindaraju, Brandon Lloyd, Naga K. Govindaraju, Brandon Lloyd,
Sung-Eui Yoon, Avneesh Sud, Dinesh Sung-Eui Yoon, Avneesh Sud, Dinesh ManochaManocha
Speaker: AlvinSpeaker: Alvin
Date: 2003/7/2Date: 2003/7/2
SIGGRAPH 2003SIGGRAPH 2003
Alivn/GAME LAB/CSIE/NDHU
2Interactive Shadow Generation in Complex Environments
OutlineOutline
IntroductionIntroduction LOD-based Interactive PVS LOD-based Interactive PVS
ComputationComputation Hybrid Shadow Generation Hybrid Shadow Generation
AlgorithmAlgorithm ResultResult ConclusionConclusion
Alivn/GAME LAB/CSIE/NDHU
3Interactive Shadow Generation in Complex Environments
IntroductionIntroduction Produce Produce hard-edgedhard-edged shadow. shadow. A hybrid approach.A hybrid approach.
The efficiencies of image-precision techniques. (The efficiencies of image-precision techniques. (Shadow Shadow MapMap))
The image quality of object-space methods. (The image quality of object-space methods. (Shadow Shadow VolumeVolume))
A interactive algorithm based on LOD and VC to A interactive algorithm based on LOD and VC to compute PVS.compute PVS.
A novel A novel cross-visibility cullingcross-visibility culling algorithm. algorithm. LOD-selection that avoid the artifacts in self-LOD-selection that avoid the artifacts in self-
shadow.shadow. In a three PC system.In a three PC system.
Alivn/GAME LAB/CSIE/NDHU
4Interactive Shadow Generation in Complex Environments
OutlineOutline
IntroductionIntroduction LOD-based Interactive PVS LOD-based Interactive PVS
ComputationComputation Hybrid Shadow Generation Hybrid Shadow Generation
AlgorithmAlgorithm ResultResult ConclusionConclusion
Alivn/GAME LAB/CSIE/NDHU
5Interactive Shadow Generation in Complex Environments
LOD-based Interactive PVS LOD-based Interactive PVS ComputationComputation
Key WordsKey Words Scene Graph RepresentationScene Graph Representation Occlusion CullingOcclusion Culling ProblemsProblems
Alivn/GAME LAB/CSIE/NDHU
6Interactive Shadow Generation in Complex Environments
Key WordsKey Words
PVS – PVS – PPotentially otentially VVisible isible SSet.et. PVSPVSEE – The – The PVS PVS from the from the eeye-view.ye-view.
PVSPVSLL – The – The PVSPVS from the from the llight-view.ight-view. HLOD – HLOD – HHierarchical ierarchical LLevels-evels-OOf-f-
DDetail.etail.
Alivn/GAME LAB/CSIE/NDHU
7Interactive Shadow Generation in Complex Environments
Scene Graph Scene Graph RepresentationRepresentation
Each node Each node stores stores references to references to its children its children and to its and to its bounding box.bounding box.
Alivn/GAME LAB/CSIE/NDHU
8Interactive Shadow Generation in Complex Environments
Occlusion CullingOcclusion Culling
Computing Occlusion Representation Computing Occlusion Representation (OR)(OR) Render the PVS from the previous frame Render the PVS from the previous frame
but based on the current camera location.but based on the current camera location. Generate a depth map.Generate a depth map.
Scene Graph Culling (SGC)Scene Graph Culling (SGC)Given the OR to use OQ.Given the OR to use OQ. Object Culling – LOD selection.Object Culling – LOD selection. Sub-object Culling – Visible sub-object at Sub-object Culling – Visible sub-object at
the leaf node are added to PVS.the leaf node are added to PVS.
Alivn/GAME LAB/CSIE/NDHU
9Interactive Shadow Generation in Complex Environments
ProblemsProblems
Inaccuracy in Shadow BoundariesInaccuracy in Shadow Boundaries When the distance between a shadow-caster When the distance between a shadow-caster
and a shadow-receiver is increased.and a shadow-receiver is increased. When the angle between the shadow-When the angle between the shadow-
receiver’s normal and the light source receiver’s normal and the light source direction almost 90direction almost 90o o ..
Self-ShadowsSelf-Shadows Ensure that LODEnsure that LODLL is the same as LOD is the same as LODEE for for
objects visible in both the views.objects visible in both the views.
Alivn/GAME LAB/CSIE/NDHU
10Interactive Shadow Generation in Complex Environments
ProblemsProblems
Recomputing PVSLRecomputing PVSL When the user move, LODE can When the user move, LODE can
change.change. Need to compute PVSL to avoid Need to compute PVSL to avoid
self-shadows and popping in the self-shadows and popping in the final image.final image.
Alivn/GAME LAB/CSIE/NDHU
11Interactive Shadow Generation in Complex Environments
OutlineOutline
IntroductionIntroduction LOD-based Interactive PVS LOD-based Interactive PVS
ComputationComputation Hybrid Shadow Generation Hybrid Shadow Generation
AlgorithmAlgorithm ResultResult ConclusionConclusion
Alivn/GAME LAB/CSIE/NDHU
12Interactive Shadow Generation in Complex Environments
Hybrid Shadow Generation Hybrid Shadow Generation AlgorithmAlgorithm
Cross CullingCross Culling Shadow GenerationShadow Generation Architecture of The Process-Parallel Architecture of The Process-Parallel
Algorithm.Algorithm. Frame WorkFrame Work
Alivn/GAME LAB/CSIE/NDHU
13Interactive Shadow Generation in Complex Environments
Cross CullingCross Culling
Partitions the PVSPartitions the PVSEE into three subsets. into three subsets. Fully-lighted (FV)Fully-lighted (FV) Fully-shadowed receivers (SRFully-shadowed receivers (SRFF)) Partially-shadowed receivers (SRPartially-shadowed receivers (SRPP))
Proceeds in two step.Proceeds in two step. Based on OQ, partitions PVSBased on OQ, partitions PVSEE into FV, SR into FV, SRFF, ,
SRSRPP.. Cull away those in PVSCull away those in PVSLL but do not cast a but do not cast a
shadow on SRshadow on SRPP. The remaining, SC, are used . The remaining, SC, are used for shadow generation.for shadow generation.
Alivn/GAME LAB/CSIE/NDHU
14Interactive Shadow Generation in Complex Environments
Shadow GenerationShadow Generation
SRSRPP are clipped against the shadow are clipped against the shadow frusta formed by SC.frusta formed by SC.
The resulting shadow-polygons are The resulting shadow-polygons are calculated by repeatedly clipping the calculated by repeatedly clipping the scene triangles against the planes of scene triangles against the planes of the shadow frusta.the shadow frusta.
Alivn/GAME LAB/CSIE/NDHU
15Interactive Shadow Generation in Complex Environments
RenderingRendering
The shadow are rendered in two The shadow are rendered in two passes:passes: SRSRFF and SR and SRPP are rendered with only are rendered with only
ambient lighting. The shadowed ambient lighting. The shadowed polygons are rendered to the stencil polygons are rendered to the stencil buffer with the depth test enabled.buffer with the depth test enabled.
SRSRPP and FV are rendered with full and FV are rendered with full lighting using the stencil test to prevent lighting using the stencil test to prevent writing in the shadowed regions.writing in the shadowed regions.
Alivn/GAME LAB/CSIE/NDHU
16Interactive Shadow Generation in Complex Environments
Architecture of The Architecture of The Process-Parallel AlgorithmProcess-Parallel Algorithm
Alivn/GAME LAB/CSIE/NDHU
17Interactive Shadow Generation in Complex Environments
Frame WorkFrame Work
Alivn/GAME LAB/CSIE/NDHU
18Interactive Shadow Generation in Complex Environments
OutlineOutline
IntroductionIntroduction LOD-based Interactive PVS LOD-based Interactive PVS
ComputationComputation Hybrid Shadow Generation Hybrid Shadow Generation
AlgorithmAlgorithm ResultResult ConclusionConclusion
Alivn/GAME LAB/CSIE/NDHU
19Interactive Shadow Generation in Complex Environments
ResultResult
Experiment EnvironmentExperiment Environment PerformancePerformance SnapshotSnapshot DemoDemo
Alivn/GAME LAB/CSIE/NDHU
20Interactive Shadow Generation in Complex Environments
Experiment EnvironmentExperiment Environment
On 3 Dell Precision workstations.On 3 Dell Precision workstations. With dual 1.8 GHz pentium CPUsWith dual 1.8 GHz pentium CPUs 2 GB of main memory2 GB of main memory A NVIDIA GeForce-4 Ti 4600 GPUA NVIDIA GeForce-4 Ti 4600 GPU Allocate 72MB out of 128MB on each Allocate 72MB out of 128MB on each
GPU to store the vertices of objects, GPU to store the vertices of objects, sub-objects, and bounding boxes.sub-objects, and bounding boxes.
Use Vertex Arrays and OQ.Use Vertex Arrays and OQ.
Alivn/GAME LAB/CSIE/NDHU
21Interactive Shadow Generation in Complex Environments
PerformancePerformance
Alivn/GAME LAB/CSIE/NDHU
27Interactive Shadow Generation in Complex Environments
OutlineOutline
IntroductionIntroduction LOD-based Interactive PVS LOD-based Interactive PVS
ComputationComputation Hybrid Shadow Generation Hybrid Shadow Generation
AlgorithmAlgorithm ResultResult ConclusionConclusion
Alivn/GAME LAB/CSIE/NDHU
28Interactive Shadow Generation in Complex Environments
ConclusionConclusion
Generate hard-edge shadow.Generate hard-edge shadow. Reduce the aliasing artifact that are Reduce the aliasing artifact that are
present in pure image-precision present in pure image-precision approaches.approaches.
Present an improved algorithm for Present an improved algorithm for PVS computation.PVS computation.
The Cross-culling algorithm can The Cross-culling algorithm can accelerate the performance of a pure accelerate the performance of a pure shadow volume approachshadow volume approach