Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SER332 Lecture 20

SER332 Lecture 20

Introduction to Graphics and Game Development
Lab 06 (Lighting)
(201804)

Javier Gonzalez-Sanchez

April 05, 2018
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs SER332 Introduction to Graphics and Game Development Lecture 20:

    Lab 6 (Lighting) Javier Gonzalez-Sanchez [email protected] PERALTA 230U Office Hours: By appointment
  2. Javier Gonzalez-Sanchez | SER332 | Spring 2018 | 2 jgs

    Step 1 § If you have not, download and run this source code: https://github.com/javiergs/SER332/blob/master/Lecture18/main.cpp
  3. Javier Gonzalez-Sanchez | SER332 | Spring 2018 | 3 jgs

    Step 2 § Modify cylinders to be as shown here Create 3 cylinders § Add a new method to create cones as shown here. A cone is like a cylinder with a dot at the top instead of a circle. Create 3 cones
  4. Javier Gonzalez-Sanchez | SER332 | Spring 2018 | 4 jgs

    Step 3 § Add a new method to create domes Create 3 cones
  5. Javier Gonzalez-Sanchez | SER332 | Spring 2018 | 5 jgs

    Step 4 • If you have not, download and run this source code: • https://github.com/javiergs/SER332/blob/master/Lecture19/light.cpp
  6. Javier Gonzalez-Sanchez | SER332 | Spring 2018 | 6 jgs

    Step 5 § Follow the previous example and add a directional source of light, i.e., include normal calculation (normal per vertex) § Make the source of light rotate around Z-axis (rotation with a radius of 500 is shown below)
  7. Javier Gonzalez-Sanchez | SER332 | Spring 2018 | 7 jgs

    Step 6 § Put at the center at least a cylinder, a cone, and a dome (as the orange image below) § Make at least a cylinder, a cone and a dome rotate around the previous ones. They can follow the same orbit (in red) or diverse concentric orbits. § Keep the light rotating as described before in part 5 (orbit in white).
  8. jgs SER332 Introduction to Graphics Javier Gonzalez-Sanchez [email protected] Spring 2018

    Disclaimer. These slides can only be used as study material for the class SER332 at ASU. They cannot be distributed or used for another purpose.