1 / 25

Fast Simulation of Lightning for 3D Games

Fast Simulation of Lightning for 3D Games. Jeremy Bryan Advisor: Sudhanshu Semwal. Overview. Introduction Applications Previous Research Design Implementation Results Future Work Conclusion. Introduction. Realistic cloud-to-ground lightning strike 3D game emphasis

garin
Download Presentation

Fast Simulation of Lightning for 3D Games

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fast Simulation of Lightning for 3D Games Jeremy Bryan Advisor: Sudhanshu Semwal

  2. Overview • Introduction • Applications • Previous Research • Design • Implementation • Results • Future Work • Conclusion

  3. Introduction • Realistic cloud-to-ground lightning strike • 3D game emphasis • Real-time requirement • Cellular Automata implementation

  4. Introduction (cont.) • Lightning Basics • Strong electrical field • Stepped leader • Upward positive leader • Attachment process • Return stroke

  5. Applications • 3D Games • Movies • Physical modeling • ???

  6. Previous Research • Reed • “Visual Simulation of Lightning” • Emphasis on rendering with ray-tracing • Simple 3D model generation

  7. Previous Research (cont.)

  8. Previous Research (cont.) • Dobashi • Identical modeling technique as Reed • Takes scattering effect due to atmospheric particles and clouds into account

  9. Previous Research (cont.)

  10. Previous Research (cont.) • UCCS Physics website 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. • Find largest breakdown number (X) • X=Eαr

  11. Cellular Automata • Discreet lattice • Discreet time-steps drive simulation • Each cell has finite set of values • Each cell evolves according to same set of rules • Evolution of cell depends only upon local neighborhood interaction

  12. Design • Complex Lightning Algorithm • Ground up • Assign values on the fly • Random numbers for “r” • Make the calculations • Find largest breakdown number (X) • X=Eαr • Segment length

  13. Design (cont.) • 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. Design (cont.) • Complex Branch Algorithm • Parent iteration • Uniformly distributed probability function • Recursive • Random branch length

  16. Design (cont.) • 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 • Programming Languages • Supporting packages • HeightMap Tutorial • Linked list library • OpenGL car tutorial

  18. Implementation (cont.) • Development model • Class structures • CCamera • CVoxel • Lightning • Camera • Target • Car • Explosion

  19. Implementation (cont.) • Observations • Run-time dependent on max branch depth and probability of branching • Large branch clusters detract from final product and are time intensive • Number of voxels in a given dimension match map size. Increasing resolution would not enhance results.

  20. Results

  21. Results (cont.)

  22. Results (cont.) • Survey

  23. Results (cont.) Sample Size = 64

  24. Future Work • Efficiency • Support for light sources • Branch modeling • Control point support • ???

  25. Conclusion • Aesthetically pleasing results • No discernable lag-time • 3D game environment

More Related