
Pixar in a Box – Khan Academy - beneater
http://pixarinabox.org
======
britcruise
Hey HN! My name is Brit Cruise and I'm the lead content developer on the Khan
Academy side of this equation (working alongside Tony DeRose from Pixar...plus
a village of others), if you have any specific questions about this project
I'll be happy to answer as best I can.

~~~
drewblaisdell
Not a comment about this specifically, but I'm a big fan of your other courses
on Khan Academy. They changed the way I think about the world. I can't
overstate how grateful I am that you created them.

Everyone should check out these lessons:

Journey into cryptography: [https://www.khanacademy.org/computing/computer-
science/crypt...](https://www.khanacademy.org/computing/computer-
science/cryptography)

Journey into information theory:
[https://www.khanacademy.org/computing/computer-
science/infor...](https://www.khanacademy.org/computing/computer-
science/informationtheory)

~~~
merpnderp
I can't believe you just posted this. I had a 5 hour drive this morning and
listened to nearly all the cryptography lectures during it.

~~~
lighttower
Hey. Is there a way to extract the audio so I can listen to it from my phone?
The links above point to flash content that I can't access on mobile

~~~
charlesroper
This service is neat: [http://huffduff-video.snarfed.org/](http://huffduff-
video.snarfed.org/)

It extracts the audio then "huff-duffs" it; i.e., puts it into an RSS feed you
can consume with your podcatcher of choice. Check it out, it's great.

------
gdubs
I brought a computer graphics textbook into my high-school math class and
asked my teacher if he could help me figure it out. His response was that I
needed to pay attention to the current lesson plan, and would need to get
through trig, then calculus before we could approach the book.

What's amazing about this video series is that they have actually captured the
elements that _can_ be taught to kids of various ages and skill levels. Man
how I wish there were a resource like this when I was younger.

~~~
dman
You are younger than you will be two years from now.

~~~
hueving
Not relevant to what happened to him in high school.

------
jameshart
Love this. So important to show kids that there really are applications for
the stuff they are learning in math classes, and computer graphics are such a
direct way to see that connection. As a kid, I think the main reasons I cared
about things like equations of motion or trigonometric functions were because
I was using them to do stuff like animate bouncing balls.

------
pcote
I think the name "Pixar in a Box" sounds like a neat play on words on the term
"Particle in a Box" from quantum mechanics. Sometimes, it's called an
"infinite potential well".

So the title appears to come from the suggestion that there'a a well of
infinite potential in terms of creative usages of math in computer animation.
Or at least that's what I read into it.

------
ginko
It's interesting that the Rendering chapter only covers ray tracing, while
most classic Pixar movies were actually mainly rendered using the Reyes
algorithm, which is a form of rasterization.

~~~
ska
Isn't Reyes essentially a speed hack [1]? As so, is it particularly relevant
to learn about today in introductory material?

[1] by which i mean, inferior estimation of BSDF on/in model, but much much
faster.

~~~
tomvbussel
The REYES algorithm is an algorithm that can very quickly produce batches of
shading points (with the required information to shade them such as the
viewing direction). It's not really a hack and you can still use path tracing
(with BSDFs) to correctly shade these points. In fact this is what Pixar did
for Monster's University; they used the REYES algorithm to determine shading
points visible from the camera and then shaded those using BSDFs and path
tracing. The problem with this is that you basically have to store the scene
twice: once for rasterization and once for ray tracing.

~~~
ska
Isn't that complimentary to what I said though? You could presumably get the
same result by just path tracing the whole thing, so all you've gained is
speed at the cost memory. I didn't mean speed hack in a pejorative way.

I understand why you might want to do this in practice, but it still doesn't
seem to be that important to teach as an introduction.

~~~
tbabb
The difference between Reyes and path tracing is this:

\- Reyes batches camera-visible geometry into grids of micropolygons and
microvoxels. These micro-elements are then shaded using any method you please
(which, in the case of Pixar movies since Monsters University, has been
raytraced physically based illumination). The micropolygons are projected to
the image plane and stochastically sampled, much more akin to traditional
rasterization. There is no raytracing for camera-visible geometry, and all
projections must be linear.

This style of doing things was to exploit locality in screen space. It assumes
that the image can be broken into "buckets", and the information outside the
bucket can be destroyed when the bucket is finished. This used to be true when
RenderMan was first designed, but now that everybody is raytracing their
illumination, it is less of a useful optimization.

This also means that shading happens at discrete times. Usually everything is
shaded at the shutter-open instant, so specular highlights will be smeared in
an unphysical way, because their motion is not properly correlated with the
geometry motion.

I should also point out that Renderman keeps an internal radiosity cache in
Reyes mode, which is basically just stored colors of illuminated geometry.
This cache is queried by raytracing when computing indirect illumination, and
a cache of the whole scene is kept for each bounce. Pixar only uses one or two
bounces in Reyes mode due to the heavy memory cost. Note that view-dependent
indirect illumination is not possible with this scheme-- Second bounces (and
deeper) are always diffuse only. (It is possible to avoid this, but it tends
to be slow because Reyes makes all kinds of generally-untrue assumptions about
its ability to batch shading which fall apart in second+ bounce shading).

\- Path tracing fires rays for camera-visible geometry. In most path tracers,
including RenderMan RIS, each ray hit generates a new shading exec. This means
that time-jittering for camera motion blur also trivially produces time-
jittered shading, so (among other things) moving specular highlights will be
correct, and view-dependent indirect illumination is possible. Because of this
live-shading aspect there is no radiosity cache, and so much deeper levels of
indirect illumination bounces can be used (compare 8 bounces to Reyes' typical
2, for example).

Also, because camera-visible geometry is raytraced, it is possible to do
interesting things like nonlinear projections.

~~~
a_e_k
All good points. I'd also add:

* Discarding data when finishing a bucket means that you have to produce final-quality pixels before moving on. Path tracing allows the renderer to produce an initial, crude pass over the pixels and then refine from there. This leads to quicker initial feedback and makes interactivity possible.

* Object instancing is much more practical with ray tracing.

* Before hybrid REYES/ray tracing, you'd have to bake out shadow maps and other passes before you could get to the beauty render. Even with ray tracing you might still be baking point clouds for GI. With path tracing you can do it all with one render pass.

------
ChicagoBoy11
Wonderful initiative -- wish this was around when I was in school.

Any projects in the works to tie this into Khan Academy's CS offerings? I work
at a school which is about to pilot a programming class with 3d animation, but
I found the content which you guys have put up to be far more engaging. If
there were an accompanying suite where students could code and render an
entire scene (especially if some Pixar assets were included!) it would
absolutely be incredible and a great resource, and I certainly wouldn't
hesitate one second to transition our course into it.

~~~
pamelafox
I'm Pamela, the programming teacher for KA. We're thinking about adding highly
guided coding challenges to the PIAB content in the future, to entice students
to go deeper into programming. Alternately, we could add advanced coding
challenges that have a higher prereq. We haven't quite figured out the
approach yet (and that applies generally to introducing programming to other
areas of KA). Feel free to email compsci-feedback@khanacademy.org with your
thoughts. :)

------
anjc
It's odd that people in the comments seem to think this is for kids. It surely
isn't intended to be for children, right?

Great lessons.

~~~
tomvbussel
I think this is aimed at middle/high school students. It probably can be
interesting for adults, but I'd really recommend picking up a book such as
Fundamentals of Computer Graphics by Shirley and Marschner [1].

[1]
[https://www.cs.cornell.edu/~srm/fcg3/](https://www.cs.cornell.edu/~srm/fcg3/)

~~~
anjc
Yeah it seems to be aimed at teens, but this is so far beyond most excellent
high school students. They're dropping in terms and concepts which you don't
touch on until the final years in an undergrad, with a focus on graphics.

------
JabavuAdams
Nice! I was just thinking about using CG as an enticement to teach linear
algebra. Basically, turn the curriculum upside down: here's how you rotate an
object ... a point is a vector .... here's a matrix ...

That's how I learned it.

------
anderspitman
Khan Academy got me through calc III and diff Eq

------
ausjke
Love Khanacademy, I wish I can bookmark course like this for later viewing,
could not figure out how to do that yet. I'm a coach there but like to
bookmark course for myself once a while.

~~~
prezjordan
Start watching some content and it'll appear on your homepage next time you
visit :)

------
danielrw7
FYI the image formatting is off on mobile chrome.
[http://imgur.com/0dyvQJP](http://imgur.com/0dyvQJP)

