Project 4: Illuminate (Algo)
You can find the handout for this project here. Please skim the handout before your Algo Section!
You may look through the questions below before your section, but we will work through each question together, so make sure to attend section and participate to get full credit!
Please read the project handout before going to algo section and working on these questions!
Raytracing Pipeline
As a group, come up with four or more aspects of the fully fledged raytracing pipeline that were omitted in Intersect, but are required for Illuminate. Discuss how you can use your code from Intersect to implement these components.
There is not necessarily a correct answer! We are looking for a qualitative explanation of your approach. Share your ideas with the TA before moving on.
Reflection Equation
Given an incoming light direction
Assuming both
If you get stuck, try drawing out a diagram on the whiteboard with your group! How might you break down
?
Texture Coordinates
In Illuminate, you will be texture-mapping images onto your implicit shapes. One step of this process is taking a given intersection point, with known UV coordinates, and figuring out which pixel of the image we should use.
However, two different coordinate systems are in play here:
- Image coordinates have their origin at the top left of a
width x height
pixel grid. These are used for images like our Brush canvas, our Intersect output, and, most relevantly, images we use as textures. - Texture (UV) coordinates have their origin at the bottom left of a unit square. These are used on the surfaces of our objects, as inputs to the equations you will write below.
Make sure you are comfortable with the diagram below, then work through the next two questions, where you will define a mapping from UV coordinates to image coordinates.
A Single Texture
Suppose we have an image of size
What is the pixel index
Repeated Textures
Suppose that we'd now like to repeat the texture
Now, what is the pixel index
Shadow Generation
To test if some intersection point
Suppose point
Does your answer change if we are restricted to the primitives we use in this course? Discuss with your group.
Submission
Algo Sections are graded on attendance and participation, so make sure the TAs know you're there!