SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
Computer Graphics 471
Project Report
In fulfillment of Comp 471 winter 2009- ver 1.2


4/10/2009


Team Members:




       Date         Rev.   Description                  Author(s)   Contributor(s)

       08/04/2009   0.5     First Draft                             The Team

       10/04/2009   1.0     Document Review                         The Team

       10/04/2009   1.1     Added reflection/shadow                 The Team

                            Cleaned up layout. Added
       10/04/2009   1.2     Build & User manual                     The Team




                            Concordia University Montreal

                                          Winter 2009
Concordia University                                                  Project Report                                                             Comp 471
CS & SE                                                                                                                                         Winter 2009

Table of Contents
     Table of Figures ......................................................................................................................................... 3
1.      Introduction ........................................................................................................................................... 4
2.      Methodology ......................................................................................................................................... 4
     2.1.       Team Approach ............................................................................................................................. 4
     2.2.       Implementation Details ................................................................................................................. 4
        Game Engine: ........................................................................................................................................ 4
        Physics Engine: ...................................................................................................................................... 5
        Modeling and Texturing: ....................................................................................................................... 5
        Visual Effects: ........................................................................................................................................ 7
        Collision Detection and Animation: ...................................................................................................... 8
        Camera: ................................................................................................................................................. 9
        Sound Effects: ....................................................................................................................................... 9
     2.3.       Elements uncompleted ................................................................................................................ 10
        Constructive Solid Geometry: ............................................................................................................. 10
        GUI and game play components: ........................................................................................................ 11
3.      Results ................................................................................................................................................. 11
4.      Discussion ........................................................................................................................................... 21
5.      User Manual ........................................................................................................................................ 22
     5.1.       Build instructions ........................................................................................................................ 22
     5.2.       Game Guide: ............................................................................................................................... 22
6.      Conclusion ........................................................................................................................................... 23
Appendix A .................................................................................................................................................. 24
     Individual contribution (design and implementation): .............................. Error! Bookmark not defined.




                                                                                                                                                  2|Page
Concordia University                                                   Project Report                                                               Comp 471
CS & SE                                                                                                                                            Winter 2009

Table of Figures
Figure 1 Ball with marble 3D texture. ........................................................................................................... 6
Figure 2 Excel and mat lab were utilized to develop to develop functions to generate the contours of the
pin procedurally. ........................................................................................................................................... 6
Figure 3 Since the model is procedural different parameters can be adjusted to develop more or less
detailed silhouette as needed for the balance of performance and model detail. ...................................... 7
Figure 4 Sample image of constructive solid geometry modeling the three finger holes .......................... 10
Figure 5: The game registering a gutter hit and accompanying the appropriate actions .......................... 12
Figure 6: reflections and proportional shadows on the games procedurally generated pins .................... 12
Figure 7: Translucency could easily be managed due to flexibility of the design....................................... 13
Figure 8: Example of end visual fidelity three colored lights change completely the ambience of the game
.................................................................................................................................................................... 14
Figure 9: “Bracing for impact” the game prepares to conduct collision detection .................................... 15
Figure 10: The game can handle both ball pin and inter pin collisions ...................................................... 15
Figure 11: A successful hit causes the pins to fall and take down any pins the falling trajectory. ............. 16
Figure 12: Walls and Ceiling though not designed to garner visual attention utilize a plethora like
efficient texture utilization. ........................................................................................................................ 17
Figure 13: Wire frame mode sample: there was tremendous effort put into optimization towards the
later stages, performance increase from roughly 10fps to a consistent 55fps+ ........................................ 18
Figure 14: Side by side: (R) Retraced Pre rendered image used as inspiration for visual cues (L) in game
image showing many if the same effects in real time. ............................................................................... 19
Figure 15: Image from one the middle lane preset camera ....................................................................... 19
Figure 16: Shadows and reflections are major highlights of the game they are utilized everywhere
including: bowling balls, pins, floors and arrows. ....................................................................................... 20




                                                                                                                                                     3|Page
Concordia University                         Project Report                                     Comp 471
CS & SE                                                                                        Winter 2009

   1. Introduction

       As stated the goal of the project was to develop a game highlighting the concepts taught in the
       classroom lectures. From the onset the team had high ambitions to develop eye catching
       attributes packaged in a game environment. The initial discussion centered on a skimmer based
       racer but gradually shifted to simpler setup where the emphasis would lay on complex graphics
       rather than game play mechanics.




   2. Methodology

        2.1.    Team Approach


               As with any software project, it is possible to utilize a vast array of existing libraries and
               solution to get the job done. Our team laid emphasis on getting things done ourselves
               rather than be dependent on external agents as a way to showcase our skills and
               enhance our own learning.

               For the project the following major elements were needed for a successful effort.

                   1) A modular game engine, efficient and extensible.

                   2) An accurate procedural model on the ball and pin with associated texturing.

                   3) Visual effects, namely shadows and reflections.

                   4) Functional collision detection and animation sequences.

        2.2.    Implementation Details


               Game Engine:
               The game engine was designed for efficiency, flexibility and extensibility using an object-
               oriented approach. Every object in the scene is implemented as a stand-alone object
               and it is added to the scene graph at runtime. This has allowed us to implement effects
               with great flexibility. For example, shadows and reflections are no more than an
               interface that can be applied to any object. Once the interface is implemented, the
               engine takes care of actually performing the rendering in the right order to obtain the
               desired effect.



                                                                                                 4|Page
Concordia University                        Project Report                                   Comp 471
CS & SE                                                                                     Winter 2009

               Physics Engine:
               The Physics Engine implemented allows flexible manipulation of objects in the scene in
               terms of animation, collision detection, and game play. An instance of a physics engine
               controls exactly one lane which includes 10 pins, bowling ball and an arrow. A reference
               of these objects is passed before the rendering the scene. The Physics engine contains
               functions that control these objects and how they interact with each other in the scene.
               A user can switch between the lanes at runtime by switching to control the desired
               physics engine. Therefore any update to the animation, collision detection, and game
               play is done only once but can be used in as many lanes as needed.

               Physics Engine:
               The Physics Engine implemented allows flexible manipulation of objects in the scene in
               terms of animation, collision detection, and game play. An instance of a physics engine
               controls exactly one lane which includes 10 pins, bowling ball and an arrow. A reference
               of these objects is passed before the rendering the scene. The Physics engine contains
               functions that control these objects and how they interact with each other in the scene.
               A user can switch between the lanes at runtime by switching to control the desired
               physics engine. Therefore any update to the animation, collision detection, and game
               play is done only once but can be used in as many lanes as needed.

               Modeling and Texturing:
               The modeling of the balls and pins started off as simple flat shaded spheres and
               cylinders. There was much discussion on the direction to take further some suggested
               that the model be built in external package and be imported into the game. This would
               be simple though it would not show much effort on our part or contribute to the
               learning process. A challenging goal was set to develop the pins and textures of bowling
               ball procedurally.

               A function for the contour of the pins was extracted by mapping curves on pin image in
               editing program feeding the coordinated into excel spread sheet program and utilizing
               the built in curve mapping functionality to derive a mathematical formulae to generate
               points on the curve . Matlab was also utilized to make optimizations.

               With these coordinate points a mesh could be generated by utilizing a Quad function
               provided by GLUT. This led to performance issues and further optimizations were made
               by utilizing Quad Strips. Additionally normals were also specified for the faces to mesh.

               The Bowling ball remained a sphere and the focus shifted to texturing. Here to the
               simple option of simple importing a texture was avoided in favor of more challenging
               task of generating it procedurally. We used Perlin noise to create the textures for two of
               the balls using two different techniques.

               The first texture was created using three Perlin noise functions blended together with
               different amplitudes and frequencies. This resulted in the lava texture, where the black

                                                                                             5|Page
Concordia University                        Project Report                                   Comp 471
CS & SE                                                                                     Winter 2009

               patches are blended with red to create a glowing effect, like a lava ball that is cooling
               down.

                                                     However, our goal from the beginning has been to
                                                     create a realistic marble texture. We realized that
                                                     a 2D texture would never give the desired result,
                                                     so we applied a different formula to create a 3D
                                                     texture with Perlin noise. While this gave us a very
                                                     good result, the fact that the texture coordinates
                                                     were automatically generated for the sphere, we
                                                     had to use GL_SPHERE_MAP to apply the texture.
                                                     The drawback of this is that the texture
                                                     appearance is relative to the position of the
                                                     camera in space, so we cannot actually animate
                                                     the sphere when it is rolling down the lane.

            Figure 1: Ball with marble 3D texture.   Outside loading of images was made possible
                                                     using SDL_Image.




Figure 2: Excel and mat lab were utilized to develop to develop functions to generate the contours of
                                         the pin procedurally.




                                                                                             6|Page
Concordia University                        Project Report                                   Comp 471
CS & SE                                                                                     Winter 2009




Figure 3: Since the model is procedural different parameters can be adjusted to develop more or less
           detailed silhouette as needed for the balance of performance and model detail.



               Visual Effects:


               Reflections were implemented using the standard approach of scaling the reflected
               object by -1 against the plane of reflection. The reflection is actually blended into the
               "mirror" based on the reflectivity of the surface (the alpha value - in our case the value
               245 was used for the bowling lanes to make the reflection realistic). The stencil buffer
               was used to contain the reflection in the desired plane and to speed up the rendering
               process.

               Shadows were implemented using a shadow matrix computed for every object. The
               shadow itself is an unshaded representation of the object that is blended into the
               surface on which the shadow is cast. Since the shadows are dependent on the position
               of the light source, we could also vary the intensity of the shadow based on the distance
               from the light to get a more realistic effect.

               A lot of effort was put into optimizing the rendering of all these effects. Some examples
               of such optimizations are the use of shared display lists to render every object in the


                                                                                             7|Page
Concordia University                        Project Report                                   Comp 471
CS & SE                                                                                     Winter 2009

               scene, using preprocessing for all types of texture generation and optimizing the
               number of rendering passes for every object on which effects are applied.



               Collision Detection and Animation:


               Collision detection is inherently a hard problem and algorithmic nature is exponential.

               Among the most popular approaches a bounding box implementation was initially
               considered. It would have been ideal but the process was unfamiliar to us and the time
               short. We estimated that distance mapping would be suitable in our case to know if and
               when the objects are close enough to register a collision. This was done and shifted
               focus focused on calculating the angle of collision. This was achieved by the arctan
               function provided in the C++ math library.

               With these parameters available to us the animation sequence for the pins was
               generated using interpolation functions this was the simplest alternative to importing
               animation data from an external source.

               Lastly the same approach was extended to manage the inter pin collisions and the code
               optimized to not affect performance.




                       The game is designed to simulate collisions with the appropriate angle




                                                                                             8|Page
Concordia University                         Project Report                                    Comp 471
CS & SE                                                                                       Winter 2009




               Camera:


               We wanted to provide the user with the ability to move around the scene with complete
               freedom. Therefore a camera was implemented which would allow the user 360
               degrees of freedom as well as the ability to travel on any axis. There was an obvious
               solution to this problem using the mouse to look and the keyboard to navigate. The
               angles of rotation would then be calculated using sin/cos functions and the scene would
               be appropriately rotated before it is drawn.



               Sound Effects:


               Basic sound effects were added to the simulation to slightly enhance the realism.
               Currently sound is played when the ball is rolling on the lane as well as during a collision
               with the pins. This was made possible by SDL_Mixer.




                                                                                               9|Page
Concordia University                       Project Report                                  Comp 471
CS & SE                                                                                   Winter 2009




        2.3.    Elements uncompleted


               As time progressed and the due date approached not all planned features made it to the
               final game. Here are few of the near misses.

               Constructive Solid Geometry:


               It was intended the bowling ball model could be further enhanced if the finger holes
               were correctly modeled procedurally, efforts were made to utilize a stencil mask and ray
               intersection algorithms to conduct CSG, unfortunately toward the end time ran out and
               the feature didn’t make it into the final version.




       Figure 4.2: Sample image of constructive solid geometry modeling the three finger holes




                                                                                          10 | P a g e
Concordia University                        Project Report                                Comp 471
CS & SE                                                                                  Winter 2009



               GUI and game play components:


               The game play components (score boards, game menu and AI) were the last pieces of
               the puzzle that were not implemented.

                   1) Efforts were made to develop a UI using the “glui” toolkit, though this was
                      successful efforts to port the glut system calls to SDL were not successful.
                   2) The effort of the project shifted from the notion of game to that of simulator
                      highlighting more visual fidelity and more realism as opposed to game play.

               Towards the latter half of the development cycle the team changed its focus from a
               game play design to achieving the maximum visual fidelity. The screen shots clearly
               indicate that team efforts played off in delivering a convincing visual atmosphere of
               bowling game.




   3. Results
   Measuring result in graphics is highly subjective. The best way to know is to show and tell, as the
   days progressed and more elements in the engine became functional it is readily apparent we were
   achieving what we intended to do. Even friends and companions who saw the work had high
   praises.

   We had the following goals to meet:

       1) Acceptable frame rate on university laboratory computers

       2) Error free functionality on the Mac, Linux and Windows platforms.

       3) Minimal visible visual artifacts hindering the end user experience.

       4) Keeping the architecture simple and extensible for future work.

   All these goals were met.




   Illustrations Follow:

                                                                                         11 | P a g e
Concordia University                       Project Report                                  Comp 471
CS & SE                                                                                   Winter 2009




Figure 5: The game registering a gutter hit and accompanying the appropriate actions




Figure 6: reflections and proportional shadows on the games procedurally generated pins




                                                                                          12 | P a g e
Concordia University                        Project Report                         Comp 471
CS & SE                                                                           Winter 2009




Figure 7: Translucency could easily be managed due to flexibility of the design




                                                                                  13 | P a g e
Concordia University                        Project Report                                 Comp 471
CS & SE                                                                                   Winter 2009




Figure 8: Example of end visual fidelity three colored lights change completely the ambience of the
game




                                                                                          14 | P a g e
Concordia University                        Project Report                         Comp 471
CS & SE                                                                           Winter 2009




Figure 9: “Bracing for impact” the game prepares to conduct collision detection




Figure 10: The game can handle both ball pin and inter pin collisions




                                                                                  15 | P a g e
Concordia University                          Project Report                                   Comp 471
CS & SE                                                                                       Winter 2009




Figure 11: A successful hit causes the pins to fall and take down any pins the falling trajectory.




                                                                                              16 | P a g e
Concordia University                         Project Report                                  Comp 471
CS & SE                                                                                     Winter 2009




Figure 12: Walls and Ceiling though not designed to garner visual attention utilize a plethora like
efficient texture utilization.




                                                                                             17 | P a g e
Concordia University                      Project Report                               Comp 471
CS & SE                                                                               Winter 2009




Figure 13: Wire frame mode sample: there was tremendous effort put into optimization towards the
later stages, performance increase from roughly 10fps to a consistent 55fps+




                                                                                      18 | P a g e
Concordia University                         Project Report                                  Comp 471
CS & SE                                                                                     Winter 2009




Figure 14: Side by side: (R) Retraced Pre rendered image used as inspiration for visual cues (L) in game
image showing many if the same effects in real time.




Figure 15: Image from one the middle lane preset camera



                                                                                            19 | P a g e
Concordia University                       Project Report                                 Comp 471
CS & SE                                                                                  Winter 2009




Figure 16: Shadows and reflections are major highlights of the game they are utilized everywhere
including: bowling balls, pins, floors and arrows.




                                                                                         20 | P a g e
4. Discussion

  Even at this stage the sky is the limit to where to take the project further, the architecture
  supports expansion in any way possible.



  All members enhanced and reinforced concepts learnt in class and increased their capacity to
  take on challenging Graphics related projects additionally lessons were learned in management
  and software processes essential to deliver quality code on time.



  We have no regrets over the decision we made in regards to development of individual
  components. If more time given more functionality would be present. Use of libraries
  worked in both ways for us, SDL allowed us to add cross platform features and sound though it
  also didn’t allow us to port the GUI component in game on time. Incidents like this are natural
  and not unexpected.



  In future work aspects listed in unimplemented features could be completed additionally since
  all components were built individually it would be worth to begin utilizing more robust external
  libraries in areas of physics and graphics engine.
Concordia University                           Project Report                                   Comp 471
CS & SE                                                                                        Winter 2009




   5. User Manual

        5.1.    Build instructions


               Building the project requires:

                        SDL (http://www.libsdl.org/)
                        SDL_Mixer(http://www.libsdl.org/projects/SDL_mixer)
                        SDL_Image (http://www.libsdl.org/projects/SDL_image)
                        Glut (http://www.xmission.com/~nate/glut.html)

               A tutorial on how to configure your system can be found at:
               http://gpwiki.org/index.php/SDL:Tutorials:Setup

               We will provide the solution files for Visual Studio as well as Eclipse and Xcode project
               files.

               A makefile will be provided for linux. It will be located in the Release folder. The
               expected targets clean and all will be provided.

        5.2.    Game Guide:



               Key          Description

               F1            Toggle Wireframe

               F2            Toggle lighting

               F10           Toggle Reflections

               F11           Toggle Shadows

                             Move the camera
                             forward/backward/left/right
               W,S,A,D       respectively

                             Move the camera up / down
               Space/Ctrl    respectively


                                                                                               22 | P a g e
Concordia University                        Project Report                                   Comp 471
CS & SE                                                                                     Winter 2009

               Keys 1-3     Switch between lanes

               Keys 4-6     Switch between cameras

                            Context Button. Use it to activate
               Enter        and launch the bowling ball

               Mouse
               Movement Use to look around the scene

               Mouse
               Scroll       Use to zoom in and our




   6. Conclusion

       The project on the whole presented a challenge, the course is different from other programming
       courses offered since there is a subjective parameter that’s hard to measure. The team took on
       many challenges to bring the deliverable to this stage and all are pleased with the effort and the
       end result.




                                                                                            23 | P a g e
Appendix A

Weitere ähnliche Inhalte

Was ist angesagt?

Batch 21(14,64,66)
Batch 21(14,64,66)Batch 21(14,64,66)
Batch 21(14,64,66)swethadln
 
Final project report of a game
Final project report of a gameFinal project report of a game
Final project report of a gameNadia Nahar
 
CSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android ApplicationCSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android ApplicationAhammad Karim
 
Online Railway Reservation System
Online Railway Reservation SystemOnline Railway Reservation System
Online Railway Reservation SystemPrince Kumar
 
Introduction to Computer Graphics
Introduction to Computer GraphicsIntroduction to Computer Graphics
Introduction to Computer GraphicsMegha Sharma
 
Taxi service UML
Taxi service UMLTaxi service UML
Taxi service UMLAyushi Shah
 
18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, Mysuru
18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, Mysuru18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, Mysuru
18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, MysuruNithin Kumar,VVCE, Mysuru
 
project presentation on mouse simulation using finger tip detection
project presentation on mouse simulation using finger tip detection project presentation on mouse simulation using finger tip detection
project presentation on mouse simulation using finger tip detection Sumit Varshney
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game EngineDiksha Bhargava
 
computer Graphics
computer Graphics computer Graphics
computer Graphics Rozi khan
 
User Interface Design in Software Engineering SE15
User Interface Design in Software Engineering SE15User Interface Design in Software Engineering SE15
User Interface Design in Software Engineering SE15koolkampus
 
Virtual Mouse using hand gesture recognition
Virtual Mouse using hand gesture recognitionVirtual Mouse using hand gesture recognition
Virtual Mouse using hand gesture recognitionMuktiKalsekar
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentationSulemanAliMalik
 
Android Based Application Project Report.
Android Based Application Project Report. Android Based Application Project Report.
Android Based Application Project Report. Abu Kaisar
 
Tour guidance srs (Software Requirements Specification)
Tour guidance  srs (Software Requirements Specification)Tour guidance  srs (Software Requirements Specification)
Tour guidance srs (Software Requirements Specification)Akalanaka Liyanage
 
Software Engineering Unit 1
Software Engineering Unit 1Software Engineering Unit 1
Software Engineering Unit 1Abhimanyu Mishra
 
Chapter 01 software engineering pressman
Chapter 01  software engineering pressmanChapter 01  software engineering pressman
Chapter 01 software engineering pressmanRohitGoyal183
 
Automatic number-plate-recognition
Automatic number-plate-recognitionAutomatic number-plate-recognition
Automatic number-plate-recognitionDevang Tailor
 

Was ist angesagt? (20)

bhargav_flowing-fountain
bhargav_flowing-fountainbhargav_flowing-fountain
bhargav_flowing-fountain
 
Batch 21(14,64,66)
Batch 21(14,64,66)Batch 21(14,64,66)
Batch 21(14,64,66)
 
Final project report of a game
Final project report of a gameFinal project report of a game
Final project report of a game
 
CSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android ApplicationCSE Final Year Project Presentation on Android Application
CSE Final Year Project Presentation on Android Application
 
Online Railway Reservation System
Online Railway Reservation SystemOnline Railway Reservation System
Online Railway Reservation System
 
Introduction to Computer Graphics
Introduction to Computer GraphicsIntroduction to Computer Graphics
Introduction to Computer Graphics
 
Taxi service UML
Taxi service UMLTaxi service UML
Taxi service UML
 
18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, Mysuru
18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, Mysuru18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, Mysuru
18CSMP68 VTU Mobile Application Develeopment Lab Manual by Nithin, VVCE, Mysuru
 
project presentation on mouse simulation using finger tip detection
project presentation on mouse simulation using finger tip detection project presentation on mouse simulation using finger tip detection
project presentation on mouse simulation using finger tip detection
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game Engine
 
computer Graphics
computer Graphics computer Graphics
computer Graphics
 
User Interface Design in Software Engineering SE15
User Interface Design in Software Engineering SE15User Interface Design in Software Engineering SE15
User Interface Design in Software Engineering SE15
 
Virtual Mouse using hand gesture recognition
Virtual Mouse using hand gesture recognitionVirtual Mouse using hand gesture recognition
Virtual Mouse using hand gesture recognition
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentation
 
Android Based Application Project Report.
Android Based Application Project Report. Android Based Application Project Report.
Android Based Application Project Report.
 
Tour guidance srs (Software Requirements Specification)
Tour guidance  srs (Software Requirements Specification)Tour guidance  srs (Software Requirements Specification)
Tour guidance srs (Software Requirements Specification)
 
Software Engineering Unit 1
Software Engineering Unit 1Software Engineering Unit 1
Software Engineering Unit 1
 
Chapter 01 software engineering pressman
Chapter 01  software engineering pressmanChapter 01  software engineering pressman
Chapter 01 software engineering pressman
 
Interaction Paradigms
Interaction ParadigmsInteraction Paradigms
Interaction Paradigms
 
Automatic number-plate-recognition
Automatic number-plate-recognitionAutomatic number-plate-recognition
Automatic number-plate-recognition
 

Ähnlich wie Computer Graphics 471 Project Report Final

Work Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel BelaskerWork Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel BelaskerAdel Belasker
 
GE4230 micromirror SUMMIT project 1
GE4230 micromirror SUMMIT project 1GE4230 micromirror SUMMIT project 1
GE4230 micromirror SUMMIT project 1Jon Zickermann
 
Enhancing readability of digital image using image processing - Full Report
Enhancing readability of digital image using image processing - Full ReportEnhancing readability of digital image using image processing - Full Report
Enhancing readability of digital image using image processing - Full ReportUpendra Sachan
 
architectureplaybook-readthedocs-io-en-latest.pdf
architectureplaybook-readthedocs-io-en-latest.pdfarchitectureplaybook-readthedocs-io-en-latest.pdf
architectureplaybook-readthedocs-io-en-latest.pdfmomirlan
 
IO_Report_Template (Readonly)
IO_Report_Template (Readonly)IO_Report_Template (Readonly)
IO_Report_Template (Readonly)guestf8327e
 
Bike sharing android application
Bike sharing android applicationBike sharing android application
Bike sharing android applicationSuraj Sawant
 
iPDC-v1.3.0 - A Complete Technical Report including iPDC, PMU Simulator, and ...
iPDC-v1.3.0 - A Complete Technical Report including iPDC, PMU Simulator, and ...iPDC-v1.3.0 - A Complete Technical Report including iPDC, PMU Simulator, and ...
iPDC-v1.3.0 - A Complete Technical Report including iPDC, PMU Simulator, and ...Nitesh Pandit
 
I Pdc V1.3.0 A Complete Technical Report Including I Pdc, Pmu Simulator, An...
I Pdc V1.3.0   A Complete Technical Report Including I Pdc, Pmu Simulator, An...I Pdc V1.3.0   A Complete Technical Report Including I Pdc, Pmu Simulator, An...
I Pdc V1.3.0 A Complete Technical Report Including I Pdc, Pmu Simulator, An...Nitesh Pandit
 
Design and implementation of a Virtual Reality application for Computational ...
Design and implementation of a Virtual Reality application for Computational ...Design and implementation of a Virtual Reality application for Computational ...
Design and implementation of a Virtual Reality application for Computational ...Lorenzo D'Eri
 
Ensuring Distributed Accountability in the Cloud
Ensuring Distributed Accountability in the CloudEnsuring Distributed Accountability in the Cloud
Ensuring Distributed Accountability in the CloudSuraj Mehta
 
Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314Owen Muzi
 
ML guided User Assistance for 3D CAD Surface Modeling: From Image to Customiz...
ML guided User Assistance for 3D CAD Surface Modeling: From Image to Customiz...ML guided User Assistance for 3D CAD Surface Modeling: From Image to Customiz...
ML guided User Assistance for 3D CAD Surface Modeling: From Image to Customiz...GEORGIOS KONSTANTINOS KOURTIS
 
Ryan Bierl Mae377 Project08 Final Report
Ryan Bierl Mae377 Project08 Final ReportRyan Bierl Mae377 Project08 Final Report
Ryan Bierl Mae377 Project08 Final Reportrrbierl
 
User Interface Design (University of Greenwich BIT Coursework) by Nay Linn Ko
User Interface Design (University of Greenwich BIT Coursework) by Nay Linn KoUser Interface Design (University of Greenwich BIT Coursework) by Nay Linn Ko
User Interface Design (University of Greenwich BIT Coursework) by Nay Linn KoNay Linn Ko
 
A Cloud Decision making Framework
A Cloud Decision making FrameworkA Cloud Decision making Framework
A Cloud Decision making FrameworkAndy Marshall
 

Ähnlich wie Computer Graphics 471 Project Report Final (20)

Work Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel BelaskerWork Measurement Application - Ghent Internship Report - Adel Belasker
Work Measurement Application - Ghent Internship Report - Adel Belasker
 
GE4230 micromirror SUMMIT project 1
GE4230 micromirror SUMMIT project 1GE4230 micromirror SUMMIT project 1
GE4230 micromirror SUMMIT project 1
 
Enhancing readability of digital image using image processing - Full Report
Enhancing readability of digital image using image processing - Full ReportEnhancing readability of digital image using image processing - Full Report
Enhancing readability of digital image using image processing - Full Report
 
Open Source adobe lightroom like
Open Source adobe lightroom likeOpen Source adobe lightroom like
Open Source adobe lightroom like
 
architectureplaybook-readthedocs-io-en-latest.pdf
architectureplaybook-readthedocs-io-en-latest.pdfarchitectureplaybook-readthedocs-io-en-latest.pdf
architectureplaybook-readthedocs-io-en-latest.pdf
 
Examensarbete
ExamensarbeteExamensarbete
Examensarbete
 
IO_Report_Template (Readonly)
IO_Report_Template (Readonly)IO_Report_Template (Readonly)
IO_Report_Template (Readonly)
 
Bike sharing android application
Bike sharing android applicationBike sharing android application
Bike sharing android application
 
iPDC-v1.3.0 - A Complete Technical Report including iPDC, PMU Simulator, and ...
iPDC-v1.3.0 - A Complete Technical Report including iPDC, PMU Simulator, and ...iPDC-v1.3.0 - A Complete Technical Report including iPDC, PMU Simulator, and ...
iPDC-v1.3.0 - A Complete Technical Report including iPDC, PMU Simulator, and ...
 
I Pdc V1.3.0 A Complete Technical Report Including I Pdc, Pmu Simulator, An...
I Pdc V1.3.0   A Complete Technical Report Including I Pdc, Pmu Simulator, An...I Pdc V1.3.0   A Complete Technical Report Including I Pdc, Pmu Simulator, An...
I Pdc V1.3.0 A Complete Technical Report Including I Pdc, Pmu Simulator, An...
 
Design and implementation of a Virtual Reality application for Computational ...
Design and implementation of a Virtual Reality application for Computational ...Design and implementation of a Virtual Reality application for Computational ...
Design and implementation of a Virtual Reality application for Computational ...
 
Ensuring Distributed Accountability in the Cloud
Ensuring Distributed Accountability in the CloudEnsuring Distributed Accountability in the Cloud
Ensuring Distributed Accountability in the Cloud
 
Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314
 
Tr1546
Tr1546Tr1546
Tr1546
 
ML guided User Assistance for 3D CAD Surface Modeling: From Image to Customiz...
ML guided User Assistance for 3D CAD Surface Modeling: From Image to Customiz...ML guided User Assistance for 3D CAD Surface Modeling: From Image to Customiz...
ML guided User Assistance for 3D CAD Surface Modeling: From Image to Customiz...
 
Ryan Bierl Mae377 Project08 Final Report
Ryan Bierl Mae377 Project08 Final ReportRyan Bierl Mae377 Project08 Final Report
Ryan Bierl Mae377 Project08 Final Report
 
iPDC Report Kedar
iPDC Report KedariPDC Report Kedar
iPDC Report Kedar
 
iPDC Report Nitesh
iPDC Report NiteshiPDC Report Nitesh
iPDC Report Nitesh
 
User Interface Design (University of Greenwich BIT Coursework) by Nay Linn Ko
User Interface Design (University of Greenwich BIT Coursework) by Nay Linn KoUser Interface Design (University of Greenwich BIT Coursework) by Nay Linn Ko
User Interface Design (University of Greenwich BIT Coursework) by Nay Linn Ko
 
A Cloud Decision making Framework
A Cloud Decision making FrameworkA Cloud Decision making Framework
A Cloud Decision making Framework
 

Kürzlich hochgeladen

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 

Kürzlich hochgeladen (20)

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 

Computer Graphics 471 Project Report Final

  • 1. Computer Graphics 471 Project Report In fulfillment of Comp 471 winter 2009- ver 1.2 4/10/2009 Team Members: Date Rev. Description Author(s) Contributor(s) 08/04/2009 0.5 First Draft The Team 10/04/2009 1.0 Document Review The Team 10/04/2009 1.1 Added reflection/shadow The Team Cleaned up layout. Added 10/04/2009 1.2 Build & User manual The Team Concordia University Montreal Winter 2009
  • 2. Concordia University Project Report Comp 471 CS & SE Winter 2009 Table of Contents Table of Figures ......................................................................................................................................... 3 1. Introduction ........................................................................................................................................... 4 2. Methodology ......................................................................................................................................... 4 2.1. Team Approach ............................................................................................................................. 4 2.2. Implementation Details ................................................................................................................. 4 Game Engine: ........................................................................................................................................ 4 Physics Engine: ...................................................................................................................................... 5 Modeling and Texturing: ....................................................................................................................... 5 Visual Effects: ........................................................................................................................................ 7 Collision Detection and Animation: ...................................................................................................... 8 Camera: ................................................................................................................................................. 9 Sound Effects: ....................................................................................................................................... 9 2.3. Elements uncompleted ................................................................................................................ 10 Constructive Solid Geometry: ............................................................................................................. 10 GUI and game play components: ........................................................................................................ 11 3. Results ................................................................................................................................................. 11 4. Discussion ........................................................................................................................................... 21 5. User Manual ........................................................................................................................................ 22 5.1. Build instructions ........................................................................................................................ 22 5.2. Game Guide: ............................................................................................................................... 22 6. Conclusion ........................................................................................................................................... 23 Appendix A .................................................................................................................................................. 24 Individual contribution (design and implementation): .............................. Error! Bookmark not defined. 2|Page
  • 3. Concordia University Project Report Comp 471 CS & SE Winter 2009 Table of Figures Figure 1 Ball with marble 3D texture. ........................................................................................................... 6 Figure 2 Excel and mat lab were utilized to develop to develop functions to generate the contours of the pin procedurally. ........................................................................................................................................... 6 Figure 3 Since the model is procedural different parameters can be adjusted to develop more or less detailed silhouette as needed for the balance of performance and model detail. ...................................... 7 Figure 4 Sample image of constructive solid geometry modeling the three finger holes .......................... 10 Figure 5: The game registering a gutter hit and accompanying the appropriate actions .......................... 12 Figure 6: reflections and proportional shadows on the games procedurally generated pins .................... 12 Figure 7: Translucency could easily be managed due to flexibility of the design....................................... 13 Figure 8: Example of end visual fidelity three colored lights change completely the ambience of the game .................................................................................................................................................................... 14 Figure 9: “Bracing for impact” the game prepares to conduct collision detection .................................... 15 Figure 10: The game can handle both ball pin and inter pin collisions ...................................................... 15 Figure 11: A successful hit causes the pins to fall and take down any pins the falling trajectory. ............. 16 Figure 12: Walls and Ceiling though not designed to garner visual attention utilize a plethora like efficient texture utilization. ........................................................................................................................ 17 Figure 13: Wire frame mode sample: there was tremendous effort put into optimization towards the later stages, performance increase from roughly 10fps to a consistent 55fps+ ........................................ 18 Figure 14: Side by side: (R) Retraced Pre rendered image used as inspiration for visual cues (L) in game image showing many if the same effects in real time. ............................................................................... 19 Figure 15: Image from one the middle lane preset camera ....................................................................... 19 Figure 16: Shadows and reflections are major highlights of the game they are utilized everywhere including: bowling balls, pins, floors and arrows. ....................................................................................... 20 3|Page
  • 4. Concordia University Project Report Comp 471 CS & SE Winter 2009 1. Introduction As stated the goal of the project was to develop a game highlighting the concepts taught in the classroom lectures. From the onset the team had high ambitions to develop eye catching attributes packaged in a game environment. The initial discussion centered on a skimmer based racer but gradually shifted to simpler setup where the emphasis would lay on complex graphics rather than game play mechanics. 2. Methodology 2.1. Team Approach As with any software project, it is possible to utilize a vast array of existing libraries and solution to get the job done. Our team laid emphasis on getting things done ourselves rather than be dependent on external agents as a way to showcase our skills and enhance our own learning. For the project the following major elements were needed for a successful effort. 1) A modular game engine, efficient and extensible. 2) An accurate procedural model on the ball and pin with associated texturing. 3) Visual effects, namely shadows and reflections. 4) Functional collision detection and animation sequences. 2.2. Implementation Details Game Engine: The game engine was designed for efficiency, flexibility and extensibility using an object- oriented approach. Every object in the scene is implemented as a stand-alone object and it is added to the scene graph at runtime. This has allowed us to implement effects with great flexibility. For example, shadows and reflections are no more than an interface that can be applied to any object. Once the interface is implemented, the engine takes care of actually performing the rendering in the right order to obtain the desired effect. 4|Page
  • 5. Concordia University Project Report Comp 471 CS & SE Winter 2009 Physics Engine: The Physics Engine implemented allows flexible manipulation of objects in the scene in terms of animation, collision detection, and game play. An instance of a physics engine controls exactly one lane which includes 10 pins, bowling ball and an arrow. A reference of these objects is passed before the rendering the scene. The Physics engine contains functions that control these objects and how they interact with each other in the scene. A user can switch between the lanes at runtime by switching to control the desired physics engine. Therefore any update to the animation, collision detection, and game play is done only once but can be used in as many lanes as needed. Physics Engine: The Physics Engine implemented allows flexible manipulation of objects in the scene in terms of animation, collision detection, and game play. An instance of a physics engine controls exactly one lane which includes 10 pins, bowling ball and an arrow. A reference of these objects is passed before the rendering the scene. The Physics engine contains functions that control these objects and how they interact with each other in the scene. A user can switch between the lanes at runtime by switching to control the desired physics engine. Therefore any update to the animation, collision detection, and game play is done only once but can be used in as many lanes as needed. Modeling and Texturing: The modeling of the balls and pins started off as simple flat shaded spheres and cylinders. There was much discussion on the direction to take further some suggested that the model be built in external package and be imported into the game. This would be simple though it would not show much effort on our part or contribute to the learning process. A challenging goal was set to develop the pins and textures of bowling ball procedurally. A function for the contour of the pins was extracted by mapping curves on pin image in editing program feeding the coordinated into excel spread sheet program and utilizing the built in curve mapping functionality to derive a mathematical formulae to generate points on the curve . Matlab was also utilized to make optimizations. With these coordinate points a mesh could be generated by utilizing a Quad function provided by GLUT. This led to performance issues and further optimizations were made by utilizing Quad Strips. Additionally normals were also specified for the faces to mesh. The Bowling ball remained a sphere and the focus shifted to texturing. Here to the simple option of simple importing a texture was avoided in favor of more challenging task of generating it procedurally. We used Perlin noise to create the textures for two of the balls using two different techniques. The first texture was created using three Perlin noise functions blended together with different amplitudes and frequencies. This resulted in the lava texture, where the black 5|Page
  • 6. Concordia University Project Report Comp 471 CS & SE Winter 2009 patches are blended with red to create a glowing effect, like a lava ball that is cooling down. However, our goal from the beginning has been to create a realistic marble texture. We realized that a 2D texture would never give the desired result, so we applied a different formula to create a 3D texture with Perlin noise. While this gave us a very good result, the fact that the texture coordinates were automatically generated for the sphere, we had to use GL_SPHERE_MAP to apply the texture. The drawback of this is that the texture appearance is relative to the position of the camera in space, so we cannot actually animate the sphere when it is rolling down the lane. Figure 1: Ball with marble 3D texture. Outside loading of images was made possible using SDL_Image. Figure 2: Excel and mat lab were utilized to develop to develop functions to generate the contours of the pin procedurally. 6|Page
  • 7. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 3: Since the model is procedural different parameters can be adjusted to develop more or less detailed silhouette as needed for the balance of performance and model detail. Visual Effects: Reflections were implemented using the standard approach of scaling the reflected object by -1 against the plane of reflection. The reflection is actually blended into the "mirror" based on the reflectivity of the surface (the alpha value - in our case the value 245 was used for the bowling lanes to make the reflection realistic). The stencil buffer was used to contain the reflection in the desired plane and to speed up the rendering process. Shadows were implemented using a shadow matrix computed for every object. The shadow itself is an unshaded representation of the object that is blended into the surface on which the shadow is cast. Since the shadows are dependent on the position of the light source, we could also vary the intensity of the shadow based on the distance from the light to get a more realistic effect. A lot of effort was put into optimizing the rendering of all these effects. Some examples of such optimizations are the use of shared display lists to render every object in the 7|Page
  • 8. Concordia University Project Report Comp 471 CS & SE Winter 2009 scene, using preprocessing for all types of texture generation and optimizing the number of rendering passes for every object on which effects are applied. Collision Detection and Animation: Collision detection is inherently a hard problem and algorithmic nature is exponential. Among the most popular approaches a bounding box implementation was initially considered. It would have been ideal but the process was unfamiliar to us and the time short. We estimated that distance mapping would be suitable in our case to know if and when the objects are close enough to register a collision. This was done and shifted focus focused on calculating the angle of collision. This was achieved by the arctan function provided in the C++ math library. With these parameters available to us the animation sequence for the pins was generated using interpolation functions this was the simplest alternative to importing animation data from an external source. Lastly the same approach was extended to manage the inter pin collisions and the code optimized to not affect performance. The game is designed to simulate collisions with the appropriate angle 8|Page
  • 9. Concordia University Project Report Comp 471 CS & SE Winter 2009 Camera: We wanted to provide the user with the ability to move around the scene with complete freedom. Therefore a camera was implemented which would allow the user 360 degrees of freedom as well as the ability to travel on any axis. There was an obvious solution to this problem using the mouse to look and the keyboard to navigate. The angles of rotation would then be calculated using sin/cos functions and the scene would be appropriately rotated before it is drawn. Sound Effects: Basic sound effects were added to the simulation to slightly enhance the realism. Currently sound is played when the ball is rolling on the lane as well as during a collision with the pins. This was made possible by SDL_Mixer. 9|Page
  • 10. Concordia University Project Report Comp 471 CS & SE Winter 2009 2.3. Elements uncompleted As time progressed and the due date approached not all planned features made it to the final game. Here are few of the near misses. Constructive Solid Geometry: It was intended the bowling ball model could be further enhanced if the finger holes were correctly modeled procedurally, efforts were made to utilize a stencil mask and ray intersection algorithms to conduct CSG, unfortunately toward the end time ran out and the feature didn’t make it into the final version. Figure 4.2: Sample image of constructive solid geometry modeling the three finger holes 10 | P a g e
  • 11. Concordia University Project Report Comp 471 CS & SE Winter 2009 GUI and game play components: The game play components (score boards, game menu and AI) were the last pieces of the puzzle that were not implemented. 1) Efforts were made to develop a UI using the “glui” toolkit, though this was successful efforts to port the glut system calls to SDL were not successful. 2) The effort of the project shifted from the notion of game to that of simulator highlighting more visual fidelity and more realism as opposed to game play. Towards the latter half of the development cycle the team changed its focus from a game play design to achieving the maximum visual fidelity. The screen shots clearly indicate that team efforts played off in delivering a convincing visual atmosphere of bowling game. 3. Results Measuring result in graphics is highly subjective. The best way to know is to show and tell, as the days progressed and more elements in the engine became functional it is readily apparent we were achieving what we intended to do. Even friends and companions who saw the work had high praises. We had the following goals to meet: 1) Acceptable frame rate on university laboratory computers 2) Error free functionality on the Mac, Linux and Windows platforms. 3) Minimal visible visual artifacts hindering the end user experience. 4) Keeping the architecture simple and extensible for future work. All these goals were met. Illustrations Follow: 11 | P a g e
  • 12. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 5: The game registering a gutter hit and accompanying the appropriate actions Figure 6: reflections and proportional shadows on the games procedurally generated pins 12 | P a g e
  • 13. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 7: Translucency could easily be managed due to flexibility of the design 13 | P a g e
  • 14. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 8: Example of end visual fidelity three colored lights change completely the ambience of the game 14 | P a g e
  • 15. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 9: “Bracing for impact” the game prepares to conduct collision detection Figure 10: The game can handle both ball pin and inter pin collisions 15 | P a g e
  • 16. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 11: A successful hit causes the pins to fall and take down any pins the falling trajectory. 16 | P a g e
  • 17. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 12: Walls and Ceiling though not designed to garner visual attention utilize a plethora like efficient texture utilization. 17 | P a g e
  • 18. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 13: Wire frame mode sample: there was tremendous effort put into optimization towards the later stages, performance increase from roughly 10fps to a consistent 55fps+ 18 | P a g e
  • 19. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 14: Side by side: (R) Retraced Pre rendered image used as inspiration for visual cues (L) in game image showing many if the same effects in real time. Figure 15: Image from one the middle lane preset camera 19 | P a g e
  • 20. Concordia University Project Report Comp 471 CS & SE Winter 2009 Figure 16: Shadows and reflections are major highlights of the game they are utilized everywhere including: bowling balls, pins, floors and arrows. 20 | P a g e
  • 21. 4. Discussion Even at this stage the sky is the limit to where to take the project further, the architecture supports expansion in any way possible. All members enhanced and reinforced concepts learnt in class and increased their capacity to take on challenging Graphics related projects additionally lessons were learned in management and software processes essential to deliver quality code on time. We have no regrets over the decision we made in regards to development of individual components. If more time given more functionality would be present. Use of libraries worked in both ways for us, SDL allowed us to add cross platform features and sound though it also didn’t allow us to port the GUI component in game on time. Incidents like this are natural and not unexpected. In future work aspects listed in unimplemented features could be completed additionally since all components were built individually it would be worth to begin utilizing more robust external libraries in areas of physics and graphics engine.
  • 22. Concordia University Project Report Comp 471 CS & SE Winter 2009 5. User Manual 5.1. Build instructions Building the project requires:  SDL (http://www.libsdl.org/)  SDL_Mixer(http://www.libsdl.org/projects/SDL_mixer)  SDL_Image (http://www.libsdl.org/projects/SDL_image)  Glut (http://www.xmission.com/~nate/glut.html) A tutorial on how to configure your system can be found at: http://gpwiki.org/index.php/SDL:Tutorials:Setup We will provide the solution files for Visual Studio as well as Eclipse and Xcode project files. A makefile will be provided for linux. It will be located in the Release folder. The expected targets clean and all will be provided. 5.2. Game Guide: Key Description F1 Toggle Wireframe F2 Toggle lighting F10 Toggle Reflections F11 Toggle Shadows Move the camera forward/backward/left/right W,S,A,D respectively Move the camera up / down Space/Ctrl respectively 22 | P a g e
  • 23. Concordia University Project Report Comp 471 CS & SE Winter 2009 Keys 1-3 Switch between lanes Keys 4-6 Switch between cameras Context Button. Use it to activate Enter and launch the bowling ball Mouse Movement Use to look around the scene Mouse Scroll Use to zoom in and our 6. Conclusion The project on the whole presented a challenge, the course is different from other programming courses offered since there is a subjective parameter that’s hard to measure. The team took on many challenges to bring the deliverable to this stage and all are pleased with the effort and the end result. 23 | P a g e