Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ======== Final Exam Review ========
- Thursday Practical Exam 20%
- Exercises
- Textures, light, particle flow
- Theory Exam 10%
- Conceptual questions
- 1. Structure of OpenGL - Display function, idle function, keyboard and mouse function, main function
- 2. Linear transformation - Point 3D, vector, rotatio, translate, scale) from glm library
- 3. Intro to 3d graphics - Rendering: It's a mapping between 3d to 2d
- "What is rendering?"
- Rendering means converting the 3d world to the 2nd world
- -
- Rendering pipeline - Rendering pipeline takes 3d points and outputs 2d points
- Pipelines have shaders
- There are two required shaders: Vertex shader and fragment shader
- - An example of an arbitrary shader: Geometry shader. These are optional.
- - Shader is a program. "Who is compiling the Shader?": Shaders are compiled by the graphic card driver.
- Target processesor is the GPU
- 4. Developing a 3d Application
- - Setup Pipeline
- - Setup Geometries
- - Setup Transformations
- - Push the "render" button: glDrawArrays()
- "Anything glDraw will push the pipeline in a different way"
- 5. Texture Mapping (There are no questions about texture mapping in the theory exam)
- - You have a texture image and you have a geometry
- - You want to apply part of the image into the geometry
- - Origin is in the upper left corner
- "When you want to load a texture, these are the parameters"
- To apply texture:
- 1. Load texture into VRAM
- 2. Set texture parameters
- 3. Set the active texture
- 4. Apply texture to geometry (This happens in the fragment shader)
- (glGenTexture, glSetParam, glEnable)
- 6. Game Engine Intro
- - Structure
- - SceneGraph
- - SceneNode
- - Transformation
- - Mesh
- - children
- - render() function which renders the SceneNode
- 7. Light (Phong Model)
- - Phong model
- 1. Ambient light
- - "Ambient light is the light applied to the scene but you cannot see the light source"
- 2. Diffuse light
- - Positional light (Light source) or Directional light (Sun)
- - The difference between positional and directional light is the angle.
- 3. Specular Light
- - The glaze on objects
- Color of the object depends on:
- - Color of light source
- - Material of the object
- (How does this material respond to the light?)
- Material on its own has different properties.
- - Roughness/Matte or Shininess
- - Color
- "If I apply a red light to a green material it will be black"
- Multiply the material by the light source to get the perceived color
- Increasing theta gets less brightness (Larger angle = less intense light)
- Intensity * cos(theta)
- PerceivedColor = Color * cos(theta)
- 7 and 1/2. How to calculate normals
- You are given a plane and you want to calculate the normals
- - Divide the plane(quad) into two triangles
- - If you are given any geometry, break it down into triangles
- - Each vertex has the same normal
- Triangle:
- c
- / \
- a---b
- calculate the vector
- u = c - a
- v = b - a
- n = v cross u
- Normal is a vector that is perpendicular to a plane
- 8. Particle Flow
- "What are the properties of particle flow"
- - Geometry
- - Spawn Time
- - Path
- - Spawn Source
- - Number of Particles
- - Texture
- - Age
- Shaders:
- Vertex shader is given xyz and applies transform, rotation, scale, then outputs xyz
- Fragment shader is given (x,y), applies (rgb) to (x,y)
- Project is due Sunday, December 9th
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement