Applications of COMPUTER GRAPHICS AND VIRTUAL REALITY IN GAMING

  • 1,414 views
Uploaded on

This slide is about Applications of Computer Graphics and Virtual reality in Gaming …

This slide is about Applications of Computer Graphics and Virtual reality in Gaming

Tejas Ghalsasi ->6483
Aman Tiwari ->6331
Kapil Khond ->6493
Rohit Sabnis ->6513
Amit Goregaonkar ->6487
Rohan Kotian ->6494

It is jointly Developed by the above students from Fr.Conceicao Rodrigues college of Engineering Bandra,Mumbai

The content covered is:
Scope of Gaming in Real World Market
Computer Graphics in Games
Popular Languages
Famous Games in C++
Famous Games in python
Why is java not used?
Computation Speed
Analyzing Real concepts
Rendering
Rendering Realism
3D projection
Ray tracing
Different lighting effects
Types of shading
3D Model
How to represent triangles
TRANSFORMATION OF AN OBJECT
2D Transformation& Types
VRGI
3D Games
Shooting in Games
Grenade Spamming
An Interaction Device Virtual Simulated Rifle (VSR)
ALIASING ARTIFACTS AND ANTI-ALIASING TECHNIQUES
Supersampling
Haptic Technology
Gaming Using VR

More in: Education , Technology , Design
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,414
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
20
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Comrades Take over the stage in the following sequence.
  • TG Ends here
  • Data Structure – specify CSE course number

Transcript

  • 1. Tejas Ghalsasi ->6483 Aman Tiwari ->6331 Kapil Khond ->6493 Rohit Sabnis ->6513 Amit Goregaonkar ->6487 Rohan Kotian ->6494
  • 2. Before NOW!
  • 3.  The video game industry is the economic sector involved with the development, marketing and sale of video and computer games to millions of people worldwide.  There are over 11 countries with revenues of over $1 billion related to this industry.  The so “non-existent” gaming industry sky-rocketed from just a $1.5 billion in the year 1982 to a whopping $ 54,506,258,511 in the year 2008.  Sources: http://www.neogaf.com/forum/showthread.php?t=356585  As the demand for new developments goes on increasing each year new techniques of Graphics processing are scrutinized and applied where ever possible  With evolution of languages and consoles the developers faced immense demands and the demands were met using scripting languages like python and HD technology.  Further with the rise of Haptics and Virtual Gaming , A new dimension is opened up In the industry.
  • 4. Assassin's Creed: Black Ops: published by Activision Developers: Ubisoft
  • 5. GTA5: Rockstar games. ***** NFS-HOT PURSUIT: EA
  • 6.  http://www.simplyhired.com/salaries-k-ea- sports-jobs.html  The average salary for ea sports jobs is $39,000(Rs.24,18,000).
  • 7.  The above slides Clearly demonstrate the ever growing demand of games in the market  Now let us Analyze the need for CG in games.
  • 8.  Computer Games need to be fast ◦ at least 60 image per second (the monitor refresh rate) You need an efficient programming language C++◦ You cannot use Java, Visual Basic, C# for critical routines. ◦ Note: A mixture of languages can be used but right now the performance critical parts are dominated by C++ in the industry  Why C++ over the other programming languages? The most popular game development language is C++ because it is object oriented and complies to binary (native language of the target platform)
  • 9.  Blizzard: StarCraft  StarCraft: Brood War  Diablo I  Diablo II: Lord of Destruction  Warcraft III  World of Warcraft.  Starfleet Command.  Microsoft And EA Sports based games are heavily programmed in c++.
  • 10. PYTHON  Python is heavily used for prototyping i.e. testing and tuning an app/algorithm before rewriting it in a faster language.  You can write C/C++ functions and call them from Python and have them do the heavy work such as loading images , clearing buffer etc.  For instance, the Panda3D engine (http://www.panda3d.org/) allows you to write games (in 3D) in Python, and then port parts to C++ as needed  It is an object oriented language, but doesn't force you to define tons of classes.  Python is cross platform! It'll work on Linux, Windows, Mac, and most other OS's. I don't know of any major OS's that can't use Python, but that doesn't mean such a thing doesn't exist.  Python is free and very available. Many linux distros come with some form of Python preinstalled. Python is free to download and free to develop for.
  • 11.  Civilisation 4  BattleField 2  Disney's Pirates of the Caribbean Online based on the movie using panda3d.  Traitors Gate 2 is a puzzle/adventure game that uses Python scripts for game logic.  Frets On Fire is a famous Hero-like game written in pygame  SolarWolf an excellent action arcade game written with pygame
  • 12.  Java is extensively used for mobile games.  The most popular Smartphone O.S. is also familiar to java’s gaming methodology.  Because of Java’s slower Run time with respect to native languages ,high speed graphic processing is not possible.  Hence JAVA is not a favored option for most of the Game Development companies out there for PC game development.
  • 13.  Efficient Programming Language is not enough ◦ We need an efficient architecture ◦ Regular Intel CPU is too slow Its analogous to SRT playing with a kids bat.
  • 14. How can we make computation faster?  Idea: Parallel Computing ◦ In the last years most speed gains come from massive parallel computation ◦ Graphics hardware is a cheap parallel “supercomputer” that can work with your PC  Study computer architecture and parallel computing which includes:-  Build fast hardware ie faster GPUs  Implement fast algorithms by complexity analysis.  Fast implementation is not always intuitive and requires detailed system level knowledge.
  • 15.  Study of Mechanics(Sem 1) and Engineering Drawing(Sem 2) helps in study of computer graphics(Sem 5).  Analysis of real objects , motions and movements helps in creating similar Graphical counterparts Here is an LIVELY EXAMPLE:
  • 16. Reality
  • 17. Virtual Reality
  • 18. Reality
  • 19. Virtual Reality
  • 20.  Rendering is the process of generating an image from a model, by means of computer programs. The model is a description of three dimensional objects in a strictly defined language or data structure. It would contain geometry, viewpoint, texture, lighting, and shading information.  'Rendering' is also used to describe the process of calculating effects in a video editing file to produce final video output.
  • 21. Morning Evening
  • 22. 3D projection  3D projection is a method of mapping three dimensional points to a two dimensional plane. As most current methods for displaying graphical data are based on planar two dimensional media, the use of this type of projection is widespread, especially in computer graphics, engineering and drafting. Ray tracing  Ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane.
  • 23. Polygonal model rendered in wire-frame (no visibility). With visibility Shaded rendering. Note how the faces of the cube and cone have different shades depending on their orientation relative to the light source.
  • 24.  Shading In computer graphics, shading refers to the process of altering the color of an object/surface/polygon in the 3D scene, based on its angle to lights and its distance from lights to create a photorealistic effect. Shading is performed during the rendering process by a program called a shader.
  • 25. Cours d’option Majeure 2 images from http://www.maxim-capra.com Anisotropic highlights Isotropic highlights Fresnel effect Dispersion Caustics
  • 26.  Flat Shading  Smooth Shading Gouraud shading Phong shading
  • 27. From a concept (or a real object) to a geometric model representable on a computer. Arbitrary objects can be triangulated.
  • 28.  LS=list of vertices  LS = {P0, P1, P2, P3}  F1 = (LS [0], LS [1], LS [2])  F2 = (LS [0], LS [2], LS [3])  F3 = (LS [3], LS [1], LS [0])  F4 = (LS [3], LS [2], LS [1])  Fi = Facet i  Object = {F1, F2, F3, F4}
  • 29. TRANSFORMATION OF AN OBJECT
  • 30. The process of manipulation or changing an object with respect to given values called Transformation.
  • 31. 1) Geometric = When the co-ordinate system is fixed and we have to transform given object with respect to fixed co-ordinate system is called as geometric 2) Co-ordinate = Whenever object is fixed and transformation has to be obtained by changing views of an object with help of co-ordinate axis is called as Co-ordinate.
  • 32. Types Of Transformation 1)Translation 2)Scaling 3)Rotation 4)Shear
  • 33. The process of shifting of an object from one point to other point (one location to another location) along a straight line using translation vector Tx or Ty along x or y axis respectively.
  • 34.  Translation 38 )','('tom o ve),( yxPyxP y x dyy dxx ' ' ),(' , ' ' ', yx y x ddTPP d d T y x P y x P P(x, y) P’(x’, y’) x y dx dy
  • 35. Using the homogeneous coordinate representation in some frame p=[ x y z 1]T p’=[x’ y’ z’ 1]T d=[dx dy dz 0]T Hence p’ = p + d or x’=x+dx y’=y+dy z’=z+dz note that this expression is in four dimensions and expresses that point = vector + point
  • 36. Scaling is change in the size of an object It can be done as up scaling and down scaling In this case we perform multiplication of co-ordinate with scaling factor. x`=x*Sx Y`=Y*Sy [x` y`] = [x y] * [ Sx 0] [ 0 Sy]
  • 37.  Scaling axisthealongbyand axisthealongbyScale ys xs y x ysy xsx y x ' ' PssSP y x s s y x yx y x ),(' 0 0 ' ' x y P0(x0, y0) P1(x1, y1) y1 1 2 y0 y1 y0 1 2 x1 1 2 x0 1 2 x1 x0
  • 38. S = S(sx, sy, sz) = 1000 000 000 000 z y x s s s x’=sxx y’=syy z’=szz p’=Sp Expand or contract along each axis (fixed point of origin)
  • 39.  The matrix expression for the scaling transformation of a position P = (x, y, z) relative to coordinate origin can be written as:
  • 40.  Rotation o rigina b o ut thea nglea nthro ughR o ta te cossin' sincos' yxy yxx PRP y x y x )(' cossin sincos ' ' P(x, y) P’(x’, y’) x y
  • 41.  Consider rotation about the origin by degrees ◦ radius stays the same, angle increases by x’=x cos –y sin y’ = x sin + y cos x = r cos y = r sin x = r cos ( y = r sin (
  • 42.  Same argument as for rotation about z axis ◦ For rotation about x axis, x is unchanged ◦ For rotation about y axis, y is unchanged R = Rx( ) = R = Ry( ) = 1000 0cossin0 0sin-cos0 0001 1000 0cos0sin- 0010 0sin0cos
  • 43.  Rotation about z axis in three dimensions leaves all points with the same z ◦ Equivalent to rotation in two dimensions in planes of constant z ◦ or in homogeneous coordinates p’=Rz( )p x’=x cos –y sin y’ = x sin + y cos z’ =z
  • 44. R = Rz( ) = 1000 0100 00cossin 00sincos
  • 45. corresponds to negative scale factors originalsx = -1 sy = 1 sx = -1 sy = -1 sx = 1 sy = -1
  • 46.  reflection at -1 0 y axis 0 1  reflection at 1 0 x axis 0 -1  reflection at -1 0 origin 0 -1
  • 47. reflection at 0 1 y =x axis 1 0
  • 48.  reflection at -1 0 0 y axis 0 1 0 0 0 1  reflection at 1 0 0 x axis 0 -1 0  0 0 1  reflection abt -1 0 0 origin 0 -1 0 0 0 1
  • 49.  reflection at 0 1 0 y=x axis 1 0 0 0 0 1  reflection at 0 -1 0 y=-x axis -1 0 0  0 0 1
  • 50.  Helpful to add one more basic transformation  Equivalent to pulling faces in opposite directions
  • 51. VRGI is a software that allows:  players to play commercial 3D first-person- view shooting games in an immersive environment.  We also present a new interaction device the Virtual Simulated Rifle (VSR) that is used to play the games in the Virtual Environment. ◦ The VSR replaces the mouse, keyboard and joystick found in a common desktop for playing a 3D game.
  • 52.  Today’s adventure games are becoming more realistic and more computationally expensive.  3D desktop games are attractive ◦ Artificial Intelligence ◦ multi-texturing ◦ physics ◦ lighting effects ◦ 3D sound ◦ etc  To achieve such realistic environments we need: ◦ high-end rendering engines with powerful GPUs ◦ high-end sound cards ◦ and power-thirsty processors  How to play these games? ◦ keyboard and a mouse ◦ other devices such as joysticks ◦ steering wheels and pedals ◦ Some of these interface devices provide feedback via small vibrotactile devices embedded in them
  • 53. Peter Wonka, ASU 101 58  Your character shoots (along a straight line) What is hit?  Super Simple Algorithm construct a straight line l for each object o for each triangle t in o.TriangleArray temp_dist / temp_loc  Intersect( t, l ) if (hit_distance < smallest_distance) hit_dist / hit_location = temp_dist / temp_loc rectionShootingDiositionCharacterP
  • 54. Peter Wonka, ASU 10159  Problem: Algorithm is inefficient ◦ If the scene has 1M triangles we wait for a very long time  Solution: Use hierarchical data structures ◦ Octree (quad tree is 2d version) : One node having eight child nodes ◦ Kd-tree : is a space-partitioning data structure for organizing points in a k-dimensional space ◦ BSP-tree: recursively subdividing a space into convex sets by hyper planes  We need knowledge about algorithms and (spatial) data structures
  • 55.  Grenade spamming or 'nade spamming involves throwing multiple grenades into an area. Grenade spamming can have two distinct sub-genres.  The first occurs when a single player will repeatedly acquire grenades (usually with the assistance of hotkeys) and throw them without moving.  The second version involves a player or group of players all throwing large numbers of grenades into an area.  Grenade spamming has the effect of real-life artillery barrages, suppressing an area of the map and killing any characters caught within the spammed zone.  When multiple players spam the same area, it is near-impossible for the opposing players to avoid having their avatars wounded or killed, and this effectively denies that area to enemies.  In addition to throwing fragmentation or explosive grenades, players can also spam smoke grenades, which obscures or completely eliminates vision and often lags the server.  With help of vibrotactile feedback & an immersive environment in virtual reality, grenade spamming in gaming can be implemented in a more realistic way.  A similar algorithm used for shooting is also used for grenade spamming except the fact that object thrown follows a projectile path unlike shooting which follows a straight path
  • 56. Phidgets Interface Kit for input and output signals Phidgets Servo controller for feedback Polhemus 3D tracker for orientation (2 axis)
  • 57. Operations Supported – Fire (with feedback) – Jump – Crouch – Zoom in/out – Rotate view Left/Right – Rotate view Up/Down – Move forward
  • 58. What is Aliasing? • False frequencies created by poor sampling of an input signal. Sampling Rate Input signal Sampled signal
  • 59.  Jagged effect in rasterised graphics: Vector representation of a circle Jagged edges due to aliasing during the rasterisation process
  • 60.  Poor representation of fine detail: Image representing a chessboard in 3D Closeup of most distant squares
  • 61. Avoiding Aliasing?  The aliasing problem can be avoided when sampling by applying Nyquist’s Theorem.  Sampling should be done at TWICE the rate of the maximum frequency present in the original signal.  Applied to the signal seen earlier…
  • 62. • Use of Nyquist’s theorem produces a mathematically identical output signal. Input signal Sampling Rate (2x input frequency) Sampled signal
  • 63. • Pre-filtering • Super sampling
  • 64.  Consider a diagonal line represented as a raster graphic…
  • 65.  The simplest way to rasterise would be to fill only those pixels with >50% coverage.
  • 66.  This is not a particularly good representation of the original line.  Aliasing artefacts create a jagged, ‘stepped’ appearance.  The aliasing also makes lines appear to have different intensities depending on their angle.
  • 67.  A better method would be to determine the strength of the colour used to fill each individual pixel according to the percentage covered by the line. 90% 15% 65% 50%
  • 68.  This technique (known as pre-filtering) creates a much smoother appearance. Circle with aliasing Pre-filtering applied
  • 69.  These filtering methods have so far been applied just once per pixel in the rasterised image.  This is referred to as “1x” anti-aliasing.  Greater accuracy and more graphically impressive results can be obtained by a technique known as supersampling.
  • 70.  Supersampling performs calculations on a virtual image ‘n’ times the resolution of the desired output.  This produces several pixels for each pixel in the final output.  Filtering is applied to each of these virtual pixels and the resultant average value is used to shade the corresponding pixel in the output image.
  • 71.  Supersampling anti-aliasing is usually referred to in terms of the n value used: n = 1 (1x anti-aliasing) n = 2 (2x anti-aliasing) n = 4 (4x anti-aliasing) n = 8 (8x anti-aliasing)
  • 72.  Supersampling is expensive computationally, but many high-end video cards provide on- board functionality to speed the process up.  Modern video games strive for smooth, realistic edges and make extensive use of anti-aliasing techniques.  Many games provide the user with options to select the level of supersampling used (2x, 4x, 8x) to balance the desired graphics level with the computing power available.
  • 73. •Haptics , is the technology of adding the sensation of touch and feeling to the virtual world. •Derived from greek word „haptikos‟ meaning “ABLE TO COME INTO CONTACT WITH” •When virtual objects are touched using haptic technology, they seem real and tangible. •Haptic senses links to the the brain‟s sensing position and movement of the body by means of sensory nerves within the muscles and joints.
  • 74. PRINCIPLE OF HAPTIC INTERFACE: Interaction occurs at an interaction tool that mechanically couples two controlled dynamical systems : a) haptic interface with a computer b) human user with a central nervous system CHARACTERISTICS: Low back-drive inertia and friction Balanced range,resolution and bandwidth of position sensing and force reflection,minimal constraints on motion Symmetric inertia,friction,stiffness and resonant frequency properties.
  • 75. 1) PHANTOM  providing a 3D touch to virtual objects  when the user moves his finger, he can really feel the shape and size of the virtual 3D object that has been already programmed  virtual 3 dimensional space in which the phantom operates is called haptic scene
  • 76.  The CyberGrasp system fits over the user's entire hand like an exoskeleton and adds resistive force feedback to each finger  Allows 4 dof for each finger  Located on the back of the hand  Measure finger angular flexion
  • 77.  The gaming industry has develop graphics and sound technology that can be incorporated as VR.  Several Virtual Reality head mounted displays(HMD)were released for gaming during the early-mid 1990s.  These included the iGlasses developed by Virtual I-O, the Cybermaxx developed by Victormaxx and the VFX-1 developed by Forte Technologies.
  • 78. There is also a new high field of view (FOV) VR headset system in development designed specifically for gaming called the Oculus Rift.The headset provides approximately a 110 degree field of view, absolute head orientation tracking, USB interface and a 1200x800 resolution with the final consumer version aimed at 1920x1080. Some of the future games that will support the Oculus Rift includes Doom 4, Strike Suit Zero, Team Fortress 2, Miner Wars 2081, Minecraft and many more.
  • 79.  There has also been recent new development in omnidirectional treadmills such as Virtuix Omni or Cyberith Virtualizer, which can simulate the motion of walking in a stationary environment. These devices do not take up the entire room nor do they have ropes or any other bulky accessories unlike the its predecessors A cave automatic virtual environment (better known by the recursive acronym CAVE) is an immersive virtual reality environment where projectors are directed to three, four, five or six of the walls of a room-sized cube.