Main content
Pixar in a Box
Course: Pixar in a Box > Unit 15
Lesson 2: Mathematics of rendering- Start here!
- 1. Ray tracing intuition
- 2D rendering intuition
- 2. Parametric form of a ray
- Parametric ray intuition
- 3. Calculate intersection point
- Solve for t
- 4. Using the line equation
- Ray intersection with line
- 5. 3D ray tracing part 1
- Ray intersection with plane
- 6. 3D ray tracing part 2
- Triangle intersection in 3D
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
Start here!
Overview of this lesson
Ready to dive into some math?
In this lesson we are going to explore the most fundamental calculation a ray tracer performs: ray object intersection.
Since objects in our scenes are modeled using millions of tiny triangles, each intersection is betweena ray and a triangle.
In this lesson we'll start with the a simpler version of this problem, the intersection of a ray and a line in 2D:
Finally we'll extend these ideas from two dimensions to work in three dimensions. By the end of this lesson we'll need to solve a pretty meaty system of equations with 4 unknowns:
Sound like fun? By the end of this lesson you can say you have a basic understanding of ray tracing along with a mathematical view of the underlying geometry which makes it all work. How cool is that?
What do I need to know before starting?
- You should be familiar with the slope-intercept form of a line. Click here to review a video or click here to do an exercise.
- We'll also be using the parametric form which requires you understand weighted averages of two points. We covered weighted averages of two points in the Environment Modeling lesson.
- Finally we'll need weighted averages of three points which we covered in the Character Modeling lesson.
- You should also have experience solving systems of equations.
Okay, you're ready to go!
Want to join the conversation?
- How exactly to the pixels turn into a picture/drawing?(6 votes)
- Because our eyes don't have unlimited resolution, our brain will merge the pixels together into a picture. If you look closely at a computer screen, you will see that it is made out of dots which are the pixels(21 votes)
- I have a question about the rendering equation. I haven't officially learned about integrals yet, but I've only seen integrals with nothing on the top or bottom, or with something on both the top and bottom. What does it mean when there is only something on the bottom. Also, for each direction, there is a separate point and a separate direction to that point. Yet there is only one variable for that point (
yi
in the source I used) and one variable for the direction (wi
in the source I used). If you looped through "all" the possible directions, then you could calculate each of those vectors, but how does it work in the integral since there is only one of each?(5 votes)- The something on the bottom refers to which variable to use for that integral. You always go from inside to outside.(2 votes)
- is there a subject for pixar in a box that doesnt require 103857395938th grade math?(2 votes)
- This kind of so-called high level math isn't actually hard; schools just teach math slowly. Any first-grader with a good grasp of arithmetic can learn Algebra I on their own if they try hard enough. Khan Academy happens to be an excellent place to do this.(6 votes)
- m,kay what is it i have a bit of a dyscalculia problem(4 votes)
- I haven't officially learned about integrals yet, but I've only seen integrals with nothing on the top or bottom, or with something on both the top and bottom. What does it mean when there is only something on the bottom. Also, for each direction, there is a separate point and a separate direction to that point. Yet there is only one variable for that point (yi in the source I used) and one variable for the direction (wi in the source I used). If you looped through "all" the possible directions, then you could calculate each of those vectors, but how does it work in the integral since there is only one of each?(2 votes)
- I haven't officially learned about integrals yet, but I've only seen integrals with nothing on the top or bottom, or with something on both the top and bottom. What does it mean when there is only something on the bottom. Also, for each direction, there is a separate point and a separate direction to that point. Yet there is only one variable for that point (yi in the source I used) and one variable for the direction (wi in the source I used). If you looped through "all" the possible directions, then you could calculate each of those vectors, but how does it work in the integral since there is only one of each?(0 votes)
- how close together is each pixel(0 votes)
- They are Particularly just mushed right next to each other to look more realistic and not cracked out.(0 votes)
- HBSGJGHJHJHBSBBBBDHSJJ BDJJHSSHHDBHHSH HSHDGDHHHHHJHDJKSSSHDJJJJJJJJJJJJJJJJJJJJJJJJHDJSKKKKKKKKKKKKKKKKKKKKKKKKNFHSDHVCHVCHDGSBEWHDWGSEDGHWSDVWVSDVGWSGADVXGWSVAGSDGHDTGHYJUGFYHDYHGGDGGCDlkjuhyfghjdkjdtuigfkcfgjutikfdighytyhuyhtirjdnhcyfgdjucxksjcduhfsikxozljfvughyfjivkmjbnvkclx,zxkmcjnvfhjdukxmcjvfghdksxl,mcjugikolsdfigjutifrdoslkifjughfido0psxzoikfjugtif8rd98ut7rif9doei8uty8itgr9iyh9og0phgurfFHYGHHY(0 votes)