Download presentation
Presentation is loading. Please wait.
1
Fast Simulation of Lightning for 3D Games Jeremy Bryan Advisor: Sudhanshu Semwal
2
Overview Introduction Introduction Applications Applications Previous Research Previous Research Design Design Implementation Implementation Results Results Future Work Future Work Conclusion Conclusion
3
Introduction Realistic cloud-to-ground lightning strike Realistic cloud-to-ground lightning strike 3D game emphasis 3D game emphasis Real-time requirement Real-time requirement Cellular Automata implementation Cellular Automata implementation
4
Introduction (cont.) Lightning Basics Lightning Basics Strong electrical field Strong electrical field Stepped leader Stepped leader Upward positive leader Upward positive leader Attachment process Attachment process Return stroke Return stroke
5
Applications 3D Games 3D Games Movies Movies Physical modeling Physical modeling ??? ???
6
Previous Research Reed Reed “Visual Simulation of Lightning” “Visual Simulation of Lightning” Emphasis on rendering with ray-tracing Emphasis on rendering with ray-tracing Simple 3D model generation Simple 3D model generation
7
Previous Research (cont.)
8
Dobashi Dobashi Identical modeling technique as Reed Identical modeling technique as Reed Takes scattering effect due to atmospheric particles and clouds into account Takes scattering effect due to atmospheric particles and clouds into account
9
Previous Research (cont.)
10
UCCS Physics website UCCS Physics website Find largest breakdown number (X) X=E α r r is a generated random number that represents atmospheric properties. E is the electric field and can be found by using Maxwell’s Equations. α controls the weight of E on r.
11
Cellular Automata Discreet lattice Discreet lattice Discreet time-steps drive simulation Discreet time-steps drive simulation Each cell has finite set of values Each cell has finite set of values Each cell evolves according to same set of rules Each cell evolves according to same set of rules Evolution of cell depends only upon local neighborhood interaction Evolution of cell depends only upon local neighborhood interaction
12
Design Complex Lightning Algorithm Complex Lightning Algorithm Ground up Ground up Assign values on the fly Assign values on the fly Random numbers for “r” Random numbers for “r” Make the calculations Make the calculations Find largest breakdown number (X) Find largest breakdown number (X) X=E α r X=E α r Segment length Segment length
13
Design (cont.) Pseudocode Pseudocode Proc GenerateComplexLightning // Load the starting coordinates list.add target.coords while height <= MAX_ALTITUDE Assign r to 26 neighbor cells if they do not have one Calculate E for 26 neighbor cells if not done previously Find maximum X list.add maxE.coords end while for each voxel in list temp = rand() if temp < BRANCH_PROBABILITY then GenerateComplexBranch() end if end for end proc
14
Design (cont.)
15
Complex Branch Algorithm Complex Branch Algorithm Parent iteration Parent iteration Uniformly distributed probability function Uniformly distributed probability function Recursive Recursive Random branch length Random branch length
16
Design (cont.) Pseudocode Pseudocode Proc GenerateComplexBranch BranchLength = rand() while (BranchHeight >= 0 And BranchLength >=0) Assign r to neighbor cells if they do not have one Calculate E for cells if not done previously Find maximum X BranchList.add maxE.coords end while for each coord in BranchList.coords if (rand() < BRANCH_PROBABILITY) then GenerateComplexBranch() end if end for end proc
17
Implementation Object-Oriented Design Object-Oriented Design Programming Languages Programming Languages Supporting packages Supporting packages HeightMap Tutorial HeightMap Tutorial Linked list library Linked list library OpenGL car tutorial OpenGL car tutorial
18
Implementation (cont.) Development model Development model Class structures Class structures CCamera CCamera CVoxel CVoxel Lightning Lightning Camera Camera Target Target Car Car Explosion Explosion
19
Implementation (cont.) Observations Observations 1. Run-time dependent on max branch depth and probability of branching 2. Large branch clusters detract from final product and are time intensive 3. Number of voxels in a given dimension match map size. Increasing resolution would not enhance results.
20
Results
21
Results (cont.)
22
Survey Survey
23
Results (cont.) GlassnerBryanReedDobashi Mean3.1718752.252.281252.296875 Median422.52 Mode4132 StdDev0.968631.1408711.0759821.03402 Sample Size = 64
24
Future Work Efficiency Efficiency Support for light sources Support for light sources Branch modeling Branch modeling Control point support Control point support ??? ???
25
Conclusion Aesthetically pleasing results Aesthetically pleasing results No discernable lag-time No discernable lag-time 3D game environment 3D game environment
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.