Advertisement
Auios

Untitled

Dec 4th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. ======== Final Exam Review ========
  2.  
  3. Thursday Practical Exam 20%
  4. Exercises
  5. Textures, light, particle flow
  6.  
  7. Theory Exam 10%
  8. Conceptual questions
  9. 1. Structure of OpenGL - Display function, idle function, keyboard and mouse function, main function
  10. 2. Linear transformation - Point 3D, vector, rotatio, translate, scale) from glm library
  11. 3. Intro to 3d graphics - Rendering: It's a mapping between 3d to 2d
  12. "What is rendering?"
  13. Rendering means converting the 3d world to the 2nd world
  14. -
  15. Rendering pipeline - Rendering pipeline takes 3d points and outputs 2d points
  16. Pipelines have shaders
  17. There are two required shaders: Vertex shader and fragment shader
  18. - An example of an arbitrary shader: Geometry shader. These are optional.
  19. - Shader is a program. "Who is compiling the Shader?": Shaders are compiled by the graphic card driver.
  20. Target processesor is the GPU
  21.  
  22. 4. Developing a 3d Application
  23. - Setup Pipeline
  24. - Setup Geometries
  25. - Setup Transformations
  26. - Push the "render" button: glDrawArrays()
  27. "Anything glDraw will push the pipeline in a different way"
  28.  
  29. 5. Texture Mapping (There are no questions about texture mapping in the theory exam)
  30. - You have a texture image and you have a geometry
  31. - You want to apply part of the image into the geometry
  32. - Origin is in the upper left corner
  33. "When you want to load a texture, these are the parameters"
  34. To apply texture:
  35. 1. Load texture into VRAM
  36. 2. Set texture parameters
  37. 3. Set the active texture
  38. 4. Apply texture to geometry (This happens in the fragment shader)
  39. (glGenTexture, glSetParam, glEnable)
  40.  
  41. 6. Game Engine Intro
  42. - Structure
  43. - SceneGraph
  44. - SceneNode
  45. - Transformation
  46. - Mesh
  47. - children
  48. - render() function which renders the SceneNode
  49.  
  50. 7. Light (Phong Model)
  51. - Phong model
  52. 1. Ambient light
  53. - "Ambient light is the light applied to the scene but you cannot see the light source"
  54. 2. Diffuse light
  55. - Positional light (Light source) or Directional light (Sun)
  56. - The difference between positional and directional light is the angle.
  57. 3. Specular Light
  58. - The glaze on objects
  59.  
  60. Color of the object depends on:
  61. - Color of light source
  62. - Material of the object
  63. (How does this material respond to the light?)
  64. Material on its own has different properties.
  65. - Roughness/Matte or Shininess
  66. - Color
  67. "If I apply a red light to a green material it will be black"
  68. Multiply the material by the light source to get the perceived color
  69. Increasing theta gets less brightness (Larger angle = less intense light)
  70. Intensity * cos(theta)
  71. PerceivedColor = Color * cos(theta)
  72.  
  73. 7 and 1/2. How to calculate normals
  74. You are given a plane and you want to calculate the normals
  75. - Divide the plane(quad) into two triangles
  76. - If you are given any geometry, break it down into triangles
  77. - Each vertex has the same normal
  78. Triangle:
  79. c
  80. / \
  81. a---b
  82. calculate the vector
  83. u = c - a
  84. v = b - a
  85.  
  86. n = v cross u
  87. Normal is a vector that is perpendicular to a plane
  88.  
  89. 8. Particle Flow
  90. "What are the properties of particle flow"
  91. - Geometry
  92. - Spawn Time
  93. - Path
  94. - Spawn Source
  95. - Number of Particles
  96. - Texture
  97. - Age
  98.  
  99. Shaders:
  100.  
  101. Vertex shader is given xyz and applies transform, rotation, scale, then outputs xyz
  102. Fragment shader is given (x,y), applies (rgb) to (x,y)
  103.  
  104. Project is due Sunday, December 9th
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement