Programmingtechniques  for First   PersonShooters in DirectX 9IntroductionGetting               Programming techniques for...
IntroductionProgrammingtechniques  for First   PersonShooters in DirectX 9      This presentation is an abstract of my fina...
IntroductionProgrammingtechniques  for First   PersonShooters in DirectX 9      This presentation is an abstract of my fina...
IntroductionProgrammingtechniques  for First   PersonShooters in DirectX 9      This presentation is an abstract of my fina...
IntroductionProgrammingtechniques  for First   PersonShooters in DirectX 9      This presentation is an abstract of my fina...
IntroductionProgrammingtechniques  for First   PersonShooters in DirectX 9      This presentation is an abstract of my fina...
Programming    In an attempt to know in depth the performance of the current FPS games,techniques  for First    level, mes...
Programming    In an attempt to know in depth the performance of the current FPS games,techniques  for First    level, mes...
Programming    In an attempt to know in depth the performance of the current FPS games,techniques  for First    level, mes...
Programming    In an attempt to know in depth the performance of the current FPS games,techniques  for First    level, mes...
Programming    In an attempt to know in depth the performance of the current FPS games,techniques  for First    level, mes...
Getting startedProgrammingtechniques      Doom 3 was programmed in OpenGL, so a rendering process in DirectX  for First   ...
Getting startedProgrammingtechniques      Doom 3 was programmed in OpenGL, so a rendering process in DirectX  for First   ...
Getting startedProgrammingtechniques      Doom 3 was programmed in OpenGL, so a rendering process in DirectX  for First   ...
Programmingtechniques  for First   Person               md5 meshes include the weapons carried by the player, so a first pe...
Programmingtechniques  for First   Person               md5 meshes include the weapons carried by the player, so a first pe...
Programmingtechniques  for First   Person               md5 meshes include the weapons carried by the player, so a first pe...
Programmingtechniques  for First   PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc p...
Programmingtechniques  for First   PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc p...
Programmingtechniques  for First   PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc p...
Programmingtechniques  for First   PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc p...
Programmingtechniques  for First   PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc p...
Programmingtechniques  for First   Person      If a realistic behaviour is wanted, a logical coordination of the animation...
Programmingtechniques  for First   Person      If a realistic behaviour is wanted, a logical coordination of the animation...
Programmingtechniques  for First   Person      If a realistic behaviour is wanted, a logical coordination of the animation...
Programmingtechniques  for First   Person      If a realistic behaviour is wanted, a logical coordination of the animation...
Programmingtechniques  for First   PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc p...
.map format and visibility testProgrammingtechniques  for First   PersonShooters in     The Doom 3 level viewer developed ...
.map format and visibility testProgrammingtechniques  for First   PersonShooters in     The Doom 3 level viewer developed ...
.map format and visibility testProgrammingtechniques  for First   PersonShooters in     The Doom 3 level viewer developed ...
.map format and visibility testProgrammingtechniques  for First   PersonShooters in     The Doom 3 level viewer developed ...
.map format and visibility testProgrammingtechniques  for First   PersonShooters in     The Doom 3 level viewer developed ...
.map format and visibility testProgrammingtechniques  for First   PersonShooters in     The Doom 3 level viewer developed ...
Developing an efficient visibility testProgrammingtechniques                Once all the level geometry is loaded, and in or...
Developing an efficient visibility testProgrammingtechniques                Once all the level geometry is loaded, and in or...
Developing an efficient visibility testProgrammingtechniques                Once all the level geometry is loaded, and in or...
Programmingtechniques  for First   PersonShooters in               Those IAP (seen from above) have different sizes and not...
Programmingtechniques  for First   PersonShooters in               Those IAP (seen from above) have different sizes and not...
Programmingtechniques  for First   PersonShooters in               Those IAP (seen from above) have different sizes and not...
Programming    The concept is very simple:techniques  for First        Render to a small buffer the meshes being tested (or...
Programming    The concept is very simple:techniques  for First        Render to a small buffer the meshes being tested (or...
Programming    The concept is very simple:techniques  for First        Render to a small buffer the meshes being tested (or...
Programming    The concept is very simple:techniques  for First        Render to a small buffer the meshes being tested (or...
Programming    The concept is very simple:techniques  for First        Render to a small buffer the meshes being tested (or...
Programming    The concept is very simple:techniques  for First        Render to a small buffer the meshes being tested (or...
Programming    The concept is very simple:techniques  for First        Render to a small buffer the meshes being tested (or...
Programming    The concept is very simple:techniques  for First        Render to a small buffer the meshes being tested (or...
Programming    This way, starting from the area in which lies the camera, all the visible IAPstechniques  for First    for...
Programming    This way, starting from the area in which lies the camera, all the visible IAPstechniques  for First    for...
Programming    This way, starting from the area in which lies the camera, all the visible IAPstechniques  for First    for...
Programming    This way, starting from the area in which lies the camera, all the visible IAPstechniques  for First    for...
Programmingtechniques  for First   PersonShooters in DirectX 9Introduction   Each time an IAP turns out to be visible, its...
Programmingtechniques  for First   PersonShooters in DirectX 9Introduction   Each time an IAP turns out to be visible, its...
Programmingtechniques  for First   Person      Now its time to test the visibility of each mesh in the visible areas. The ...
Programmingtechniques  for First   Person      Now its time to test the visibility of each mesh in the visible areas. The ...
Programmingtechniques  for First   Person      Now its time to test the visibility of each mesh in the visible areas. The ...
Programmingtechniques     Each time a mesh passes the test, is added to a vector of meshes. Once the  for First   Person  ...
Programmingtechniques     Each time a mesh passes the test, is added to a vector of meshes. Once the  for First   Person  ...
Programmingtechniques     Each time a mesh passes the test, is added to a vector of meshes. Once the  for First   Person  ...
Programming    A way to fix this is to add a small error bound, to mark as visible thosetechniques  for First    meshes whi...
Programming    A way to fix this is to add a small error bound, to mark as visible thosetechniques  for First    meshes whi...
Programming    Another improvement was introduced by considering the camera as atechniques  for First    tridimensional ob...
Programming    Another improvement was introduced by considering the camera as atechniques  for First    tridimensional ob...
Programming    Another improvement was introduced by considering the camera as atechniques  for First    tridimensional ob...
func plat meshesProgrammingtechniques      Some meshes in the Doom 3 level viewer in OpenGL clearly did not appear.  for F...
func plat meshesProgrammingtechniques      Some meshes in the Doom 3 level viewer in OpenGL clearly did not appear.  for F...
func plat meshesProgrammingtechniques      Some meshes in the Doom 3 level viewer in OpenGL clearly did not appear.  for F...
A bit on materialsProgrammingtechniques  for First   PersonShooters in DirectX 9                Doom 3 displays a wide var...
A bit on materialsProgrammingtechniques  for First   PersonShooters in DirectX 9                Doom 3 displays a wide var...
A bit on materialsProgrammingtechniques  for First   PersonShooters in DirectX 9                Doom 3 displays a wide var...
A bit on materialsProgrammingtechniques  for First   PersonShooters in DirectX 9                Doom 3 displays a wide var...
A bit on materialsProgrammingtechniques  for First   PersonShooters in DirectX 9                The next image shows on th...
A bit on materialsProgrammingtechniques  for First   PersonShooters in DirectX 9                The next image shows on th...
Parallax mapping with multiple point lightsProgrammingtechniques  for First   PersonShooters in DirectX 9                P...
Parallax mapping with multiple point lightsProgrammingtechniques  for First   PersonShooters in DirectX 9                P...
Parallax mapping with multiple point lightsProgrammingtechniques  for First   PersonShooters in DirectX 9                P...
Programmingtechniques  for First   PersonShooters in    The following image shows the parallax mapping effect, with a maxim...
Programmingtechniques  for First   PersonShooters in    The following image shows the parallax mapping effect, with a maxim...
Programmingtechniques  for First   Person                                                 BibliographyShooters in DirectX ...
Programmingtechniques  for First   PersonShooters in DirectX 9IntroductionGettingstarted               Global material key...
Upcoming SlideShare
Loading in …5
×

Programming techniques for First Person Shooters in DirectX 9

2,330 views

Published on

This presentation is an abstract of my final project in Computer Engineering,
presented in September of 2006.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,330
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Programming techniques for First Person Shooters in DirectX 9

  1. 1. Programmingtechniques for First PersonShooters in DirectX 9IntroductionGetting Programming techniques for First Person Shooters instarted DirectX 9.mapformat andvisibilitytestfunc platmeshes Alejandro Cosin AyerbeA bit onmaterialsParallaxmappingwithmultiple August 2012point lightsBibliography
  2. 2. IntroductionProgrammingtechniques for First PersonShooters in DirectX 9 This presentation is an abstract of my final project in Computer Engineering, presented in September of 2006. There were several goals in this project, theIntroduction main ones are the following:Gettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  3. 3. IntroductionProgrammingtechniques for First PersonShooters in DirectX 9 This presentation is an abstract of my final project in Computer Engineering, presented in September of 2006. There were several goals in this project, theIntroduction main ones are the following:Gettingstarted.map Understand how first person shooter video games work: level meshformat andvisibility management, BSP trees, inter-area portals, visibility tests, static simpletest and complex meshes, mesh rendering, skeletal animation, lightfunc platmeshes positioning, materials....A bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  4. 4. IntroductionProgrammingtechniques for First PersonShooters in DirectX 9 This presentation is an abstract of my final project in Computer Engineering, presented in September of 2006. There were several goals in this project, theIntroduction main ones are the following:Gettingstarted.map Understand how first person shooter video games work: level meshformat andvisibility management, BSP trees, inter-area portals, visibility tests, static simpletest and complex meshes, mesh rendering, skeletal animation, lightfunc platmeshes positioning, materials....A bit on Develop programming techniques centered in performance (particularlymaterials for visibility tests).Parallaxmappingwithmultiplepoint lightsBibliography
  5. 5. IntroductionProgrammingtechniques for First PersonShooters in DirectX 9 This presentation is an abstract of my final project in Computer Engineering, presented in September of 2006. There were several goals in this project, theIntroduction main ones are the following:Gettingstarted.map Understand how first person shooter video games work: level meshformat andvisibility management, BSP trees, inter-area portals, visibility tests, static simpletest and complex meshes, mesh rendering, skeletal animation, lightfunc platmeshes positioning, materials....A bit on Develop programming techniques centered in performance (particularlymaterials for visibility tests).Parallaxmappingwith Learn differences between the graphics programming APIs OpenGL andmultiplepoint lights DirectX.Bibliography
  6. 6. IntroductionProgrammingtechniques for First PersonShooters in DirectX 9 This presentation is an abstract of my final project in Computer Engineering, presented in September of 2006. There were several goals in this project, theIntroduction main ones are the following:Gettingstarted.map Understand how first person shooter video games work: level meshformat andvisibility management, BSP trees, inter-area portals, visibility tests, static simpletest and complex meshes, mesh rendering, skeletal animation, lightfunc platmeshes positioning, materials....A bit on Develop programming techniques centered in performance (particularlymaterials for visibility tests).Parallaxmappingwith Learn differences between the graphics programming APIs OpenGL andmultiplepoint lights DirectX.Bibliography Perform per-pixel lighting effects like specular and parallax mapping.
  7. 7. Programming In an attempt to know in depth the performance of the current FPS games,techniques for First level, mesh and geometric model loaders were looked for. PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  8. 8. Programming In an attempt to know in depth the performance of the current FPS games,techniques for First level, mesh and geometric model loaders were looked for. PersonShooters in DirectX 9 In general in the game industry, the formats are proprietary, so usually there is no access to this type of information.IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  9. 9. Programming In an attempt to know in depth the performance of the current FPS games,techniques for First level, mesh and geometric model loaders were looked for. PersonShooters in DirectX 9 In general in the game industry, the formats are proprietary, so usually there is no access to this type of information.IntroductionGettingstarted Luckily, a Doom3 level viewer and a Doom 3 model viewer and skeletal.map animation player were found in Internet. Both of them were programmed informat andvisibility OpenGL, so there was no problem to use the data structures generated bytest them, but the rendering process in DirectX had to be programmed.func platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  10. 10. Programming In an attempt to know in depth the performance of the current FPS games,techniques for First level, mesh and geometric model loaders were looked for. PersonShooters in DirectX 9 In general in the game industry, the formats are proprietary, so usually there is no access to this type of information.IntroductionGettingstarted Luckily, a Doom3 level viewer and a Doom 3 model viewer and skeletal.map animation player were found in Internet. Both of them were programmed informat andvisibility OpenGL, so there was no problem to use the data structures generated bytest them, but the rendering process in DirectX had to be programmed.func platmeshesA bit on The level viewer works with .map format, was developed by Miguel Angelmaterials Pastor, aka Garrofi. His old homepage is all that can be found today. If youParallaxmapping want the source code of the level viewer, contact me atwith aca_1983_@hotmail.com and i will send it to you, as there are no active linksmultiplepoint lights for download. The mesh viewer and animator player works with .md5 formatBibliography (md5mesh for meshes and md5anim for animations), and can be downloaded here.
  11. 11. Programming In an attempt to know in depth the performance of the current FPS games,techniques for First level, mesh and geometric model loaders were looked for. PersonShooters in DirectX 9 In general in the game industry, the formats are proprietary, so usually there is no access to this type of information.IntroductionGettingstarted Luckily, a Doom3 level viewer and a Doom 3 model viewer and skeletal.map animation player were found in Internet. Both of them were programmed informat andvisibility OpenGL, so there was no problem to use the data structures generated bytest them, but the rendering process in DirectX had to be programmed.func platmeshesA bit on The level viewer works with .map format, was developed by Miguel Angelmaterials Pastor, aka Garrofi. His old homepage is all that can be found today. If youParallaxmapping want the source code of the level viewer, contact me atwith aca_1983_@hotmail.com and i will send it to you, as there are no active linksmultiplepoint lights for download. The mesh viewer and animator player works with .md5 formatBibliography (md5mesh for meshes and md5anim for animations), and can be downloaded here. Information about .map file format and .md5 file format can be read here and here respectively.
  12. 12. Getting startedProgrammingtechniques Doom 3 was programmed in OpenGL, so a rendering process in DirectX for First Person required some changes, like texture coordinates, which are different in eachShooters in DirectX 9 API, or the coordinate systems used.IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  13. 13. Getting startedProgrammingtechniques Doom 3 was programmed in OpenGL, so a rendering process in DirectX for First Person required some changes, like texture coordinates, which are different in eachShooters in DirectX 9 API, or the coordinate systems used.Introduction Starting from an empty demo from the DirectX 9 SDK, the meshes of theGetting models where correctly rendered through index buffers and texturized.started.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  14. 14. Getting startedProgrammingtechniques Doom 3 was programmed in OpenGL, so a rendering process in DirectX for First Person required some changes, like texture coordinates, which are different in eachShooters in DirectX 9 API, or the coordinate systems used.Introduction Starting from an empty demo from the DirectX 9 SDK, the meshes of theGetting models where correctly rendered through index buffers and texturized.started.mapformat and These meshes are very optimized, for example, weapon meshes exclude thosevisibilitytest polygons from the mesh that never are viewed:func platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  15. 15. Programmingtechniques for First Person md5 meshes include the weapons carried by the player, so a first personShooters in DirectX 9 shooter needs to render correctly those meshes when the camera moves. The problem was to make these meshes rotate correctly:IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  16. 16. Programmingtechniques for First Person md5 meshes include the weapons carried by the player, so a first personShooters in DirectX 9 shooter needs to render correctly those meshes when the camera moves. The problem was to make these meshes rotate correctly:IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  17. 17. Programmingtechniques for First Person md5 meshes include the weapons carried by the player, so a first personShooters in DirectX 9 shooter needs to render correctly those meshes when the camera moves. The problem was to make these meshes rotate correctly:IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lights The solution was to decompose the view matrix in its scaling, rotation andBibliography translation factors when rendering each frame. The rotation factor, given by a quaternion, was then used to rotate correctly the weapon mesh and therefore give the appearance that the weapon follows the camera.
  18. 18. Programmingtechniques for First PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  19. 19. Programmingtechniques for First PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshes Also a head up display was made, enabling alpha blending and disabling depthA bit on testing in order to keep the HUD visible even if the camera walks through amaterials mesh. The number textures were taken from the Doom 3 textures, while someParallaxmapping simple symbols were made with Photoshop:withmultiplepoint lightsBibliography
  20. 20. Programmingtechniques for First PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshes Also a head up display was made, enabling alpha blending and disabling depthA bit on testing in order to keep the HUD visible even if the camera walks through amaterials mesh. The number textures were taken from the Doom 3 textures, while someParallaxmapping simple symbols were made with Photoshop:withmultiplepoint lightsBibliography
  21. 21. Programmingtechniques for First PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  22. 22. Programmingtechniques for First PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallax In FPS games, weapons have some typical animations associated: firing,mapping reloading, idle, raise, lower... For the case of the shotgun in Doom 3, thewithmultiple animations available are the following:point lights empty.md5anim, fire1.md5anim, fire2.md5anim, fire3.md5anim,Bibliography idle.md5anim, lower.md5anim, raise.md5anim, reload_end.md5anim, reload_loop.md5anim, reload_loop2.md5anim, reload_loop3.md5anim, and reload_start.md5anim.
  23. 23. Programmingtechniques for First Person If a realistic behaviour is wanted, a logical coordination of the animations isShooters in DirectX 9 needed, so for the case of the shotgun, the first step is to play the raise animation, and when it ends, play the idle animation until player presses theIntroduction reload or fire buttons, playing the corresponding animations and usingGetting randomness if more than one animation is available for the current action, andstarted taking into account the ammo..mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  24. 24. Programmingtechniques for First Person If a realistic behaviour is wanted, a logical coordination of the animations isShooters in DirectX 9 needed, so for the case of the shotgun, the first step is to play the raise animation, and when it ends, play the idle animation until player presses theIntroduction reload or fire buttons, playing the corresponding animations and usingGetting randomness if more than one animation is available for the current action, andstarted taking into account the ammo..mapformat andvisibilitytest The fire effect in the barrel of the weapon is achieved using a texture like thefunc plat following:meshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  25. 25. Programmingtechniques for First Person If a realistic behaviour is wanted, a logical coordination of the animations isShooters in DirectX 9 needed, so for the case of the shotgun, the first step is to play the raise animation, and when it ends, play the idle animation until player presses theIntroduction reload or fire buttons, playing the corresponding animations and usingGetting randomness if more than one animation is available for the current action, andstarted taking into account the ammo..mapformat andvisibilitytest The fire effect in the barrel of the weapon is achieved using a texture like thefunc plat following:meshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  26. 26. Programmingtechniques for First Person If a realistic behaviour is wanted, a logical coordination of the animations isShooters in DirectX 9 needed, so for the case of the shotgun, the first step is to play the raise animation, and when it ends, play the idle animation until player presses theIntroduction reload or fire buttons, playing the corresponding animations and usingGetting randomness if more than one animation is available for the current action, andstarted taking into account the ammo..mapformat andvisibilitytest The fire effect in the barrel of the weapon is achieved using a texture like thefunc plat following:meshesA bit onmaterialsParallaxmappingwithmultiplepoint lights This texture consists in a series of sprites that must be shown correctly,Bibliography averaging the number of frames of the fire animation and showing the appropriate portion of sprite in the correct interval. The sprites are displayed in a plane mesh available in every weapon:
  27. 27. Programmingtechniques for First PersonShooters in DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  28. 28. .map format and visibility testProgrammingtechniques for First PersonShooters in The Doom 3 level viewer developed by Miguel Angel Pastor in OpenGL loads DirectX 9 most of the objects and entities of the level. Consists of more than 12000 lines of source code, and generates a data structure somewhat complex, as theIntroduction amount and diversity of data is high.Gettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  29. 29. .map format and visibility testProgrammingtechniques for First PersonShooters in The Doom 3 level viewer developed by Miguel Angel Pastor in OpenGL loads DirectX 9 most of the objects and entities of the level. Consists of more than 12000 lines of source code, and generates a data structure somewhat complex, as theIntroduction amount and diversity of data is high.Gettingstarted.map Doom 3 levels consist in four file formats:format andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  30. 30. .map format and visibility testProgrammingtechniques for First PersonShooters in The Doom 3 level viewer developed by Miguel Angel Pastor in OpenGL loads DirectX 9 most of the objects and entities of the level. Consists of more than 12000 lines of source code, and generates a data structure somewhat complex, as theIntroduction amount and diversity of data is high.Gettingstarted.map Doom 3 levels consist in four file formats:format andvisibility The MAP file, an ASCII text file with all the static geometry and entities,test such as lights, patches (Bezier surfaces), brushes (simple geometricfunc platmeshes meshes) and the location of complex meshes whose geometry is loadedA bit on from files in a more general format (LWO for example).materialsParallaxmappingwithmultiplepoint lightsBibliography
  31. 31. .map format and visibility testProgrammingtechniques for First PersonShooters in The Doom 3 level viewer developed by Miguel Angel Pastor in OpenGL loads DirectX 9 most of the objects and entities of the level. Consists of more than 12000 lines of source code, and generates a data structure somewhat complex, as theIntroduction amount and diversity of data is high.Gettingstarted.map Doom 3 levels consist in four file formats:format andvisibility The MAP file, an ASCII text file with all the static geometry and entities,test such as lights, patches (Bezier surfaces), brushes (simple geometricfunc platmeshes meshes) and the location of complex meshes whose geometry is loadedA bit on from files in a more general format (LWO for example).materialsParallax The CM file, which stores the collision model data.mappingwithmultiplepoint lightsBibliography
  32. 32. .map format and visibility testProgrammingtechniques for First PersonShooters in The Doom 3 level viewer developed by Miguel Angel Pastor in OpenGL loads DirectX 9 most of the objects and entities of the level. Consists of more than 12000 lines of source code, and generates a data structure somewhat complex, as theIntroduction amount and diversity of data is high.Gettingstarted.map Doom 3 levels consist in four file formats:format andvisibility The MAP file, an ASCII text file with all the static geometry and entities,test such as lights, patches (Bezier surfaces), brushes (simple geometricfunc platmeshes meshes) and the location of complex meshes whose geometry is loadedA bit on from files in a more general format (LWO for example).materialsParallax The CM file, which stores the collision model data.mappingwith The PROC file, with all the preprocessed geometry in the map, portalmultiplepoint lights information (Doom 3 operates with BSP-trees) and pre-calculatedBibliography shadow volumes (for static lights in static geometry).
  33. 33. .map format and visibility testProgrammingtechniques for First PersonShooters in The Doom 3 level viewer developed by Miguel Angel Pastor in OpenGL loads DirectX 9 most of the objects and entities of the level. Consists of more than 12000 lines of source code, and generates a data structure somewhat complex, as theIntroduction amount and diversity of data is high.Gettingstarted.map Doom 3 levels consist in four file formats:format andvisibility The MAP file, an ASCII text file with all the static geometry and entities,test such as lights, patches (Bezier surfaces), brushes (simple geometricfunc platmeshes meshes) and the location of complex meshes whose geometry is loadedA bit on from files in a more general format (LWO for example).materialsParallax The CM file, which stores the collision model data.mappingwith The PROC file, with all the preprocessed geometry in the map, portalmultiplepoint lights information (Doom 3 operates with BSP-trees) and pre-calculatedBibliography shadow volumes (for static lights in static geometry). The AAS files, used by the AI to move the monsters in the scenario.
  34. 34. Developing an efficient visibility testProgrammingtechniques Once all the level geometry is loaded, and in order to optimize performance, a for First criteria must be followed to know what meshes must be rendered (among PersonShooters in those visible for the camera, i.e., inside the view frustum), and what must not. DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  35. 35. Developing an efficient visibility testProgrammingtechniques Once all the level geometry is loaded, and in order to optimize performance, a for First criteria must be followed to know what meshes must be rendered (among PersonShooters in those visible for the camera, i.e., inside the view frustum), and what must not. DirectX 9 Doom 3 levels use the BSP-tree system which divides a space into convexIntroduction sets. Each convex set is called in this case an area, and two areas areGettingstarted connected through an IAP or Inter Area Portal. An example of the IAPs.map present in a Doom 3 level can be seen below:format andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  36. 36. Developing an efficient visibility testProgrammingtechniques Once all the level geometry is loaded, and in order to optimize performance, a for First criteria must be followed to know what meshes must be rendered (among PersonShooters in those visible for the camera, i.e., inside the view frustum), and what must not. DirectX 9 Doom 3 levels use the BSP-tree system which divides a space into convexIntroduction sets. Each convex set is called in this case an area, and two areas areGettingstarted connected through an IAP or Inter Area Portal. An example of the IAPs.map present in a Doom 3 level can be seen below:format andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  37. 37. Programmingtechniques for First PersonShooters in Those IAP (seen from above) have different sizes and not always consist of DirectX 9 four vertices. Thinking of IAPs as if they were windows, candidate meshes to be rendered will be those in the areas whose IAPs can be seen from theIntroduction camera position and orientation. Also, BSP-trees allow to determine easilyGetting which area a given point belongs to, so finding the area in which the camera isstarted located is simple..mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  38. 38. Programmingtechniques for First PersonShooters in Those IAP (seen from above) have different sizes and not always consist of DirectX 9 four vertices. Thinking of IAPs as if they were windows, candidate meshes to be rendered will be those in the areas whose IAPs can be seen from theIntroduction camera position and orientation. Also, BSP-trees allow to determine easilyGetting which area a given point belongs to, so finding the area in which the camera isstarted located is simple..mapformat andvisibilitytest The faster the method, the better the performance, because the visibility testfunc plat must be done every frame before the rendering process. There are severalmeshes ways to test what surfaces are visible in a scenario based on BSP-trees,A bit onmaterials currently there are several efficient methods, but new ways can be thought of?Parallaxmappingwithmultiplepoint lightsBibliography
  39. 39. Programmingtechniques for First PersonShooters in Those IAP (seen from above) have different sizes and not always consist of DirectX 9 four vertices. Thinking of IAPs as if they were windows, candidate meshes to be rendered will be those in the areas whose IAPs can be seen from theIntroduction camera position and orientation. Also, BSP-trees allow to determine easilyGetting which area a given point belongs to, so finding the area in which the camera isstarted located is simple..mapformat andvisibilitytest The faster the method, the better the performance, because the visibility testfunc plat must be done every frame before the rendering process. There are severalmeshes ways to test what surfaces are visible in a scenario based on BSP-trees,A bit onmaterials currently there are several efficient methods, but new ways can be thought of?Parallaxmappingwith The main task is to determine which IAPs of the current area are visible frommultiplepoint lights the position and orientation of the camera, the meshes in those areas are theBibliography candidate meshes to be rendered. The hardware technique occlusion culling can be used (a detailed explanation can be found here), in oder to know what IAPs are visible.
  40. 40. Programming The concept is very simple:techniques for First Render to a small buffer the meshes being tested (or a bunding box for PersonShooters in performance). DirectX 9IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  41. 41. Programming The concept is very simple:techniques for First Render to a small buffer the meshes being tested (or a bunding box for PersonShooters in performance). DirectX 9 For each mesh:IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  42. 42. Programming The concept is very simple:techniques for First Render to a small buffer the meshes being tested (or a bunding box for PersonShooters in performance). DirectX 9 For each mesh: Start the query.IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  43. 43. Programming The concept is very simple:techniques for First Render to a small buffer the meshes being tested (or a bunding box for PersonShooters in performance). DirectX 9 For each mesh: Start the query.Introduction Render again the mesh to the small buffer (or bounding box).Gettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  44. 44. Programming The concept is very simple:techniques for First Render to a small buffer the meshes being tested (or a bunding box for PersonShooters in performance). DirectX 9 For each mesh: Start the query.Introduction Render again the mesh to the small buffer (or bounding box). Finish the queryGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  45. 45. Programming The concept is very simple:techniques for First Render to a small buffer the meshes being tested (or a bunding box for PersonShooters in performance). DirectX 9 For each mesh: Start the query.Introduction Render again the mesh to the small buffer (or bounding box). Finish the queryGettingstarted Retrieve information from the test: if the number of visible pixels is greater.map than cero, the mesh is visible from the camera position and orientation.format andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  46. 46. Programming The concept is very simple:techniques for First Render to a small buffer the meshes being tested (or a bunding box for PersonShooters in performance). DirectX 9 For each mesh: Start the query.Introduction Render again the mesh to the small buffer (or bounding box). Finish the queryGettingstarted Retrieve information from the test: if the number of visible pixels is greater.map than cero, the mesh is visible from the camera position and orientation.format andvisibilitytest The following is an example of the method. On the left several IAPs can befunc plat seen in green color. On the right, the content of the small buffer aftermeshes performing the visibility test to one of the IAPs in the left:A bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  47. 47. Programming The concept is very simple:techniques for First Render to a small buffer the meshes being tested (or a bunding box for PersonShooters in performance). DirectX 9 For each mesh: Start the query.Introduction Render again the mesh to the small buffer (or bounding box). Finish the queryGettingstarted Retrieve information from the test: if the number of visible pixels is greater.map than cero, the mesh is visible from the camera position and orientation.format andvisibilitytest The following is an example of the method. On the left several IAPs can befunc plat seen in green color. On the right, the content of the small buffer aftermeshes performing the visibility test to one of the IAPs in the left:A bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  48. 48. Programming This way, starting from the area in which lies the camera, all the visible IAPstechniques for First for that area can be known. But the IAPs from other areas are visible from PersonShooters in the current area sometimes, so the test must be refined, a way to improve the DirectX 9 test is described below.Introduction For each visible IAP of the current area, tested with the occlusion culling testGettingstarted (which will be called culled IAP), do the following:.map Consider all the IAPs in the area accessed through the current culled IAP,format andvisibility which will be called secondary IAPs.testfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  49. 49. Programming This way, starting from the area in which lies the camera, all the visible IAPstechniques for First for that area can be known. But the IAPs from other areas are visible from PersonShooters in the current area sometimes, so the test must be refined, a way to improve the DirectX 9 test is described below.Introduction For each visible IAP of the current area, tested with the occlusion culling testGettingstarted (which will be called culled IAP), do the following:.map Consider all the IAPs in the area accessed through the current culled IAP,format andvisibility which will be called secondary IAPs.test Trace straight lines from the corners and center of each secondary IAP tofunc platmeshes the camera, and check if any of the lines intersect with the culled IAP.A bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  50. 50. Programming This way, starting from the area in which lies the camera, all the visible IAPstechniques for First for that area can be known. But the IAPs from other areas are visible from PersonShooters in the current area sometimes, so the test must be refined, a way to improve the DirectX 9 test is described below.Introduction For each visible IAP of the current area, tested with the occlusion culling testGettingstarted (which will be called culled IAP), do the following:.map Consider all the IAPs in the area accessed through the current culled IAP,format andvisibility which will be called secondary IAPs.test Trace straight lines from the corners and center of each secondary IAP tofunc platmeshes the camera, and check if any of the lines intersect with the culled IAP.A bit on If there is at least a line verifying the condition, then that secondary IAPmaterials is visible through the current culled IAP. The next image shows a scheme:Parallaxmappingwithmultiplepoint lightsBibliography
  51. 51. Programming This way, starting from the area in which lies the camera, all the visible IAPstechniques for First for that area can be known. But the IAPs from other areas are visible from PersonShooters in the current area sometimes, so the test must be refined, a way to improve the DirectX 9 test is described below.Introduction For each visible IAP of the current area, tested with the occlusion culling testGettingstarted (which will be called culled IAP), do the following:.map Consider all the IAPs in the area accessed through the current culled IAP,format andvisibility which will be called secondary IAPs.test Trace straight lines from the corners and center of each secondary IAP tofunc platmeshes the camera, and check if any of the lines intersect with the culled IAP.A bit on If there is at least a line verifying the condition, then that secondary IAPmaterials is visible through the current culled IAP. The next image shows a scheme:Parallaxmappingwithmultiplepoint lightsBibliography
  52. 52. Programmingtechniques for First PersonShooters in DirectX 9Introduction Each time an IAP turns out to be visible, its IAP path is saved, as thisGetting process iterates with tertiary and more distant IAPs. When making astarted tertiary IAP test, for example, the straight lines from the corners and.mapformat and center of the IAP must intersect with its corresponding secondary andvisibilitytest culled IAPs.func platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  53. 53. Programmingtechniques for First PersonShooters in DirectX 9Introduction Each time an IAP turns out to be visible, its IAP path is saved, as thisGetting process iterates with tertiary and more distant IAPs. When making astarted tertiary IAP test, for example, the straight lines from the corners and.mapformat and center of the IAP must intersect with its corresponding secondary andvisibilitytest culled IAPs.func platmeshes The test goes on with quaternary and more distant IAPs (whenever thereA bit onmaterials are remaining tests). At the end, there is a list of areas which are visibleParallax from the current camera position and orientation, so the meshes presentmappingwith in those areas are the candidates to be rendered.multiplepoint lightsBibliography
  54. 54. Programmingtechniques for First Person Now its time to test the visibility of each mesh in the visible areas. The test isShooters in DirectX 9 slightly different, as meshes are tridimensional objects: for a given area and a given mesh in that area, straight lines from each corner and the center of theIntroduction bounding box of the mesh are traced to the camera.Gettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  55. 55. Programmingtechniques for First Person Now its time to test the visibility of each mesh in the visible areas. The test isShooters in DirectX 9 slightly different, as meshes are tridimensional objects: for a given area and a given mesh in that area, straight lines from each corner and the center of theIntroduction bounding box of the mesh are traced to the camera.Gettingstarted If any of these lines intersect with all the IAPs of the corresponding IAP path.mapformat and for the area in which the mesh lies, then that mesh is visible.visibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  56. 56. Programmingtechniques for First Person Now its time to test the visibility of each mesh in the visible areas. The test isShooters in DirectX 9 slightly different, as meshes are tridimensional objects: for a given area and a given mesh in that area, straight lines from each corner and the center of theIntroduction bounding box of the mesh are traced to the camera.Gettingstarted If any of these lines intersect with all the IAPs of the corresponding IAP path.mapformat and for the area in which the mesh lies, then that mesh is visible.visibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  57. 57. Programmingtechniques Each time a mesh passes the test, is added to a vector of meshes. Once the for First Person test ends, the vector is sorted by the depth of the z coordinate of theShooters in DirectX 9 bounding box.IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  58. 58. Programmingtechniques Each time a mesh passes the test, is added to a vector of meshes. Once the for First Person test ends, the vector is sorted by the depth of the z coordinate of theShooters in DirectX 9 bounding box.Introduction This method can be improved: below, on the left, an IAP can be seen in darkGetting brown. Depending on the form of the bounding boxes of the meshes beingstarted tested, the visibility test can fail, as can be seen in the image on the right..mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  59. 59. Programmingtechniques Each time a mesh passes the test, is added to a vector of meshes. Once the for First Person test ends, the vector is sorted by the depth of the z coordinate of theShooters in DirectX 9 bounding box.Introduction This method can be improved: below, on the left, an IAP can be seen in darkGetting brown. Depending on the form of the bounding boxes of the meshes beingstarted tested, the visibility test can fail, as can be seen in the image on the right..mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  60. 60. Programming A way to fix this is to add a small error bound, to mark as visible thosetechniques for First meshes which don’t pass the test for a little. Now the same mesh of the PersonShooters in previous image becomes visible. Small spheres corresponding with the corners DirectX 9 and the center point are rendered, giving an idea of the geometry of this type of simple meshes:IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  61. 61. Programming A way to fix this is to add a small error bound, to mark as visible thosetechniques for First meshes which don’t pass the test for a little. Now the same mesh of the PersonShooters in previous image becomes visible. Small spheres corresponding with the corners DirectX 9 and the center point are rendered, giving an idea of the geometry of this type of simple meshes:IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  62. 62. Programming Another improvement was introduced by considering the camera as atechniques for First tridimensional object: the camera position is a single point, but the camera PersonShooters in itself constitutes an area, so the test lines were aimed to the corners and DirectX 9 center point of the camera.IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  63. 63. Programming Another improvement was introduced by considering the camera as atechniques for First tridimensional object: the camera position is a single point, but the camera PersonShooters in itself constitutes an area, so the test lines were aimed to the corners and DirectX 9 center point of the camera.Introduction This way, when the central point of the camera is in front of a wall, the visibleGettingstarted meshes farther than the wall pass the visibility test..mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  64. 64. Programming Another improvement was introduced by considering the camera as atechniques for First tridimensional object: the camera position is a single point, but the camera PersonShooters in itself constitutes an area, so the test lines were aimed to the corners and DirectX 9 center point of the camera.Introduction This way, when the central point of the camera is in front of a wall, the visibleGettingstarted meshes farther than the wall pass the visibility test..mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  65. 65. func plat meshesProgrammingtechniques Some meshes in the Doom 3 level viewer in OpenGL clearly did not appear. for First Person Some are complex meshes which must be loaded through an external file inShooters in DirectX 9 .LWO or .ASE format, and others are the platforms and mobile meshes: elevators, doors...IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  66. 66. func plat meshesProgrammingtechniques Some meshes in the Doom 3 level viewer in OpenGL clearly did not appear. for First Person Some are complex meshes which must be loaded through an external file inShooters in DirectX 9 .LWO or .ASE format, and others are the platforms and mobile meshes: elevators, doors...IntroductionGetting These meshes don’t belong to a particular area, so a test to find out whichstarted areas belong had to be done, and in the visibility test, test each of these.map surfaces only once. The results for non-specific-area meshes were satisfactory:format andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  67. 67. func plat meshesProgrammingtechniques Some meshes in the Doom 3 level viewer in OpenGL clearly did not appear. for First Person Some are complex meshes which must be loaded through an external file inShooters in DirectX 9 .LWO or .ASE format, and others are the platforms and mobile meshes: elevators, doors...IntroductionGetting These meshes don’t belong to a particular area, so a test to find out whichstarted areas belong had to be done, and in the visibility test, test each of these.map surfaces only once. The results for non-specific-area meshes were satisfactory:format andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  68. 68. A bit on materialsProgrammingtechniques for First PersonShooters in DirectX 9 Doom 3 displays a wide variety of materials, defined by the .mtr files. Each of this materials is built with specific keywords, which are detailed here and here.IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  69. 69. A bit on materialsProgrammingtechniques for First PersonShooters in DirectX 9 Doom 3 displays a wide variety of materials, defined by the .mtr files. Each of this materials is built with specific keywords, which are detailed here and here.IntroductionGettingstarted In order to perform some per-pixel effects, height, normal and specular maps.map are needed for each mesh, besides the traditional diffuse map. Doom 3format andvisibility incorporates this textures, specified for each mesh in its definition.testfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  70. 70. A bit on materialsProgrammingtechniques for First PersonShooters in DirectX 9 Doom 3 displays a wide variety of materials, defined by the .mtr files. Each of this materials is built with specific keywords, which are detailed here and here.IntroductionGettingstarted In order to perform some per-pixel effects, height, normal and specular maps.map are needed for each mesh, besides the traditional diffuse map. Doom 3format andvisibility incorporates this textures, specified for each mesh in its definition.testfunc platmeshes By parsing all the .mtr files (Doom 3 uses more than 2600 differentA bit on materials), the correct textures can be assigned to each mesh, although onlymaterials simple per-pixel effects were made, like specular and parallax mapping orParallax per-pixel lighting (due to lack of time).mappingwithmultiplepoint lightsBibliography
  71. 71. A bit on materialsProgrammingtechniques for First PersonShooters in DirectX 9 Doom 3 displays a wide variety of materials, defined by the .mtr files. Each of this materials is built with specific keywords, which are detailed here and here.IntroductionGettingstarted In order to perform some per-pixel effects, height, normal and specular maps.map are needed for each mesh, besides the traditional diffuse map. Doom 3format andvisibility incorporates this textures, specified for each mesh in its definition.testfunc platmeshes By parsing all the .mtr files (Doom 3 uses more than 2600 differentA bit on materials), the correct textures can be assigned to each mesh, although onlymaterials simple per-pixel effects were made, like specular and parallax mapping orParallax per-pixel lighting (due to lack of time).mappingwithmultiplepoint lights Textures were loaded from a Zip file, an article in Gamedev explains how to doBibliography this (can be read here).
  72. 72. A bit on materialsProgrammingtechniques for First PersonShooters in DirectX 9 The next image shows on the left some meshes. The same meshes, with standard per-pixel lighting, are shown on the right (point lights are describedIntroduction as entities of type light in the file .map, with color and radius assigned):Gettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  73. 73. A bit on materialsProgrammingtechniques for First PersonShooters in DirectX 9 The next image shows on the left some meshes. The same meshes, with standard per-pixel lighting, are shown on the right (point lights are describedIntroduction as entities of type light in the file .map, with color and radius assigned):Gettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  74. 74. Parallax mapping with multiple point lightsProgrammingtechniques for First PersonShooters in DirectX 9 Parallax mapping produces a great effect of realism, and its computational cost is not exorbitant. The effect developed is based on the Parallax mappingIntroduction demo from this web, which had in the past didactic material on DirectXGettingstarted (email me at aca_1983_@hotmail.com and i will send this demo to you)..mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  75. 75. Parallax mapping with multiple point lightsProgrammingtechniques for First PersonShooters in DirectX 9 Parallax mapping produces a great effect of realism, and its computational cost is not exorbitant. The effect developed is based on the Parallax mappingIntroduction demo from this web, which had in the past didactic material on DirectXGettingstarted (email me at aca_1983_@hotmail.com and i will send this demo to you)..mapformat andvisibility This application was programmed in 2006, when the most extended Shadertest Model was the 2.0. This Shader Model had a limit of 96 registers and 64func platmeshes instructions, so the limit for the effect was three passes (for three differentA bit on point lights).materialsParallaxmappingwithmultiplepoint lightsBibliography
  76. 76. Parallax mapping with multiple point lightsProgrammingtechniques for First PersonShooters in DirectX 9 Parallax mapping produces a great effect of realism, and its computational cost is not exorbitant. The effect developed is based on the Parallax mappingIntroduction demo from this web, which had in the past didactic material on DirectXGettingstarted (email me at aca_1983_@hotmail.com and i will send this demo to you)..mapformat andvisibility This application was programmed in 2006, when the most extended Shadertest Model was the 2.0. This Shader Model had a limit of 96 registers and 64func platmeshes instructions, so the limit for the effect was three passes (for three differentA bit on point lights).materialsParallaxmapping If more than three point lights light a mesh, is neccessary to activate blendingwith (which means a drop in performance) and repeat the effect until all themultiplepoint lights contributions on all the lights have been calculated.Bibliography
  77. 77. Programmingtechniques for First PersonShooters in The following image shows the parallax mapping effect, with a maximum of DirectX 9 three point lights for each mesh on the left, and for more than three point lights in the right:IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  78. 78. Programmingtechniques for First PersonShooters in The following image shows the parallax mapping effect, with a maximum of DirectX 9 three point lights for each mesh on the left, and for more than three point lights in the right:IntroductionGettingstarted.mapformat andvisibilitytestfunc platmeshesA bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography
  79. 79. Programmingtechniques for First Person BibliographyShooters in DirectX 9 Ultimate Game Programming Allen Sherrod. http://www.ultimategameprogramming.com, September 2006.IntroductionGetting GameDev.net Developer Community.started http://www.gamedev.net, September 2006..mapformat andvisibility Md5 mesh viewer in OpenGL David Henry.test http://tfc.duke.free.fr, September 2006.func platmeshes Occlusion Culling Using DirectX 9 Dustin Franklin.A bit onmaterials http://www.gamedev.net, September 2006.Parallaxmapping MAP file format.withmultiple http://www.modwiki.net, September 2006.point lightsBibliography MD5 file format. http://www.modwiki.net, September 2006. Loading a Texture From a Zip File in DirectX 9 Greg Stewart. http://www.gamedev.net, September 2006.
  80. 80. Programmingtechniques for First PersonShooters in DirectX 9IntroductionGettingstarted Global material keywords..mapformat and http://www.modwiki.net, September 2006.visibilitytest Game Tutorials.func platmeshes http://www.gametutorials.com, September 2006.A bit onmaterialsParallaxmappingwithmultiplepoint lightsBibliography

×