Realistic 3D Gaming 6.111 Final Project Ranbel Sun, Daniel Whitlow Abstract In order to meet the demands for a realistic 3D gaming experience, extensive computation resources are required, either in software, hardware, or both. Rendering high quality graphics in real time monopolizes available resources to the point where there is very little left for the actual game. The advantage of handling rendering in hardware is that designing the hardware to handle this task from the ground up allows for more efficiency at the cost of flexibility (think dedicated GPUs vs. CPUs). Our goal is to create a 3D rendering system that will produce realistic-looking graphics, and apply them to implement a 3D game.iii Table of Contents Overview (Daniel)............................................................................................................... 1 Description (Daniel) ........................................................................................................... 2 Scene Data Formats (Daniel) .......................................................................................... 3 3D Renderer (Daniel) ...................................................................................................... 3 Input Sequencer (Daniel) ............................................................................................ 4 Ray Generator (Daniel) ............................................................................................... 4 Intersection Tester (Daniel)......................................................................................... 5 Illuminator (Daniel)..................................................................................................... 5 Painter (Daniel) ........................................................................................................... 6 Game Logic (Ranbel) ...................................................................................................... 6 Game Controller (Ranbel)........................................................................................... 7 Game FSM (Ranbel) ................................................................................................... 8 Collision Detector (Ranbel) ........................................................................................ 9 Pseudo-Random Object Generator (Ranbel)............................................................. 10 Video Output (Ranbel) .................................................................................................. 11 Frame Buffer (Ranbel) .............................................................................................. 11 Background Image Processor (Ranbel)..................................................................... 11 XVGA (Ranbel) ........................................................................................................ 11 Testing............................................................................................................................... 12 3D Renderer (Daniel) .................................................................................................... 12 Game Controller (Ranbel)............................................................................................. 13 Game FSM (Ranbel) ..................................................................................................... 13 Collision Detector (Ranbel) .......................................................................................... 14 Pseudo-Random Object Generator (Ranbel)................................................................. 14 Frame Buffer (Ranbel) .................................................................................................. 14 Background Image Generator (Ranbel) ........................................................................ 14 Conclusion (Daniel & Ranbel).......................................................................................... 15 Acknowledgements ........................................................................................................... 15 References ......................................................................................................................... 16 Appendices ........................................................................................................................ 17 Appendix A: 3D Renderer Test Environment Module (Daniel) ................................... 17 Appendix B: Ray Tracer Module (Daniel).................................................................... 26 Appendix C: Ray Generator Module (Daniel) .............................................................. 29 Appendix D: Intersect Tester Module (Daniel)............................................................. 31 Appendix E: Illuminator Module (Daniel).................................................................... 36 Appendix F: Game Controller (Ranbel)........................................................................ 41 Appendix G: Game FSM (Ranbel)................................................................................ 46 Appendix H: Collision Detector (Ranbel)..................................................................... 49 Appendix I: Shape Collision Detection Modules (Ranbel)........................................... 50 Appendix J: Frame Buffer (Ranbel).............................................................................. 53 Appendix K: Pseudo-Random Object Generator (Ranbel) ........................................... 56 Appendix L: 2D Display (Ranbel) ................................................................................ 58 Appendix M: 2D Test Bench (Ranbel) ......................................................................... 61iv Table of Figures Figure 1: Ray casted image from the software prototype renderer ..................................... 1 Figure 2: Screenshot from Nintendo's Starfox on the SNES .............................................. 2 Figure 3: High level project block diagram ........................................................................ 2 Figure 4: Formats of scene objects passed to the renderer.................................................. 3 Figure 5: 3D Renderer block diagram................................................................................. 4 Figure 6: Components of Phong Reflection [1]
View Full Document