Lighting
Goal
We first get familiar with the code, then we implement basic lighting calculations.
Assignment
Use the repository from last time and follow the instructions in the slides:
means that the code is already in the repository and you just need to look at it.
means you can copy-paste the code and it should work.
means that you need to create a new file
indicates that you need to do more than just copy-paste the code.
In any case you need to understand what you are doing.
Material
- Slides:
- Web links:
Tasks (for the “Shaded cube” demo)
In the following, some tasks are listed that need to be implemented in order to better understand the implemented code.
Simple
(small and easy code changes)
- Change the position of the light sources
- Change the camera and observe the highlights on the cube
- Change the color of the light sources
- Add checkboxes to turn lighting on and off
Complex
(needs new functions)
- Add more light sources to the scene.
- Animate the light sources so that they move around the cube.
- Add some control to change the color of the light sources.
Questions
- TBD