Hacker News new | past | comments | ask | show | jobs | submit login
Pixar in a Box – Khan Academy (pixarinabox.org)
753 points by beneater on Aug 27, 2015 | hide | past | favorite | 65 comments



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.


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...

Journey into information theory: https://www.khanacademy.org/computing/computer-science/infor...


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.


I'm a developer at Khan Academy (currently working on the upcoming Android app), and it's cool to see that there's real interest in that kind of use case! In our hackathon a few weeks ago I wrote an audio-only Khan Academy app that lets you listen to any video or the text-to-speech of any article and is controlled completely through voice commands. Unfortunately it's not quite at a point where other people can use it, but maybe I'll take the time to actually productionize it. :-)

Here's the code if you're curious:

https://github.com/alangpierce/Audicademy

And there's a feature-incomplete web version that lets you navigate to any video and play it (requires a recent version of Chrome):

https://audicademy.appspot.com


Audio only is a big thing for me. Commuting to work is a key learning time, and mostly audio is the only workable option.


That's great, thanks for posting it. And I love Khan academy, thanks for the great work. My son is 3 and I'm chomping at the bit to introduce him to Khan academy.


Interesting I've been doing podcasts during my drives but never thought about Khan Academy. You can get away with not seeing anything they put on the screen or draw on a whiteboard? Have you had success with just listening to all the courses?


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


This service is neat: 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.


My side project TubeSock (http://stinkbot.com/index.html) can do this for you. Just open the preferences and set it to download as MP3 or AAC.


There are lots of websites that will extract mp3s from youtube videos which you'll find if you just google "youtube to mp3". There are also browser extensions which do this. Here's one:

http://www.video2mp3.net/extension.php


If its android you can try this http://www.snaptube.in/

I use it for everything including X rated content from adult sites


youtube-dl can do that.


These videos were the main reason I grokked Diffie-Hellman during my grad CS course in crypto last year. Those are very good resources!


I love Khan Academy, I used it extensively to practice calculus and I think also discrete mathematics back in college.

I just watched the videos of the first few sections of this math course and they're all very nice and I feel I really understand how to draw parabolas now, but the section I just watched ends with a proof.

I'm not convinced by the proof at all, it goes very fast through the basics and is very quick to point out the different relations between the ratios and the points. Now I know I've never been very quick with proofs, and I know the whole idea of Khan Academy is that you can pause and replay whenever you like, but I feel just a video isn't enough to explain even a simple geometric proof like this. Did you test this on any students? Could they reproduce the proof?

(p.s.: many events cause a bar to appear on the top of the page that pushes the entire page down, that's very not-done in web ux and causes disorientation and frustration with the user especially if the site is slow to respond (which the site is for me))


The proof starts with two of the "string-art" lines, a line L1 (line Q'R' in the video) with parameter s and a line L2 (line QR in the video) with parameter t, and computes the intersection point P of these two lines. Keeping line L2 fixed, one gets a series of intersection points P as one varies the parameter s. One then notices that the point of intersection of line L2 and the parabola (the "touching point") is the limit of these intersection points P as s tends toward the value t. The proof finishes by showing that this limit point is just what it was hypothesised to be, namely the point along line L2 that divides it in the same proportions as its endpoints divide the control lines.

I agree that some students will not recognise the crux of the proof, but will simply see something ends up being equal to something else in some identity without understanding how that relates to what was being proved.

Euclid's Elements (an ancient Greek textbook on Geometry) is a good model in this regard. He first states what he is to prove. He then starts from the assumptions and finishes with what he was to prove. Each step in between is justified.


These are great points. You'll notice that video is actually a "bonus" step which isn't required to complete the final exercise in that lesson. We are still experimenting with how to go about "bonus" steps. In other lessons you'll see they are done in a multi-step article style. Such as in Animation: https://www.khanacademy.org/partner-content/pixar/animate/pa...

We also do this for the bonus step in Character Modeling (my favorite lesson!)

Our plan is to continue collecting more feedback on these different styles and find out what works best.


There is an undergrad (I think it's an undergrad) course on Ray Tracing for Global Illumination here https://www.youtube.com/playlist?list=PLslgisHe5tBPckSYyKoU3...

I've written an RSL tutorial that has been online for past 15 years (it's currently offline, I'll put it up again) and I've had people from all over the world from different studios (big and small) thank me.. it seems RSL doesn't have much resources online and considering this is tied to Pixar - do you have plans for RSL?


The CG by UC Berkeley on EdX is a great starting point. One of the exercises involves building a simple ray tracer. A slightly more advanced source on ray tracing is http://www.scratchapixel.com/. Of course the best way to learn about ray tracing is by reading Physically Based Rendering: From Theory to Implementation by Pharr and Humphreys.

Pixar has ditched RSL in favor of BSDFs written in C++, so there is no real reason for learning RSL anymore. Open Shading Language (OSL) is a new shading language which is getting more and more use in the industry, but it's completely different by design.


Yes, you're right about RSL. What I've meant is that it is (was) a good learning tool. Maybe something like shadertoy today with an appropriate course would be apt?

PBRT is a great resource too. I don't know if they opted out of literate programming? I can't stand that for some reason. I've leafed through PBRT though. I've learned (back in the day, hah) from Shirley's Ray Tracing book and bibles that Andrew Glassner wrote (Principles of Digital Image Synthesis) which I still consider awesome resource.


Yeah it was a great learning tool. pbrt is a good learning tool, but sadly it already implements most of the basics. Courses at Cornell and ETH Zürich used a small rendering framework called Nori [1], which is a pretty good learning tool. Shadertoy is nice, but perhaps a bit annoying to work in (as it involves a lot of tricks). I guess the best way to learn is to write your own ray tracer, but that takes a lot of time.

The current edition of Physically Based Rendering still uses literate programming, but most of the maths are separated from the code, so you can skip over most of the code. Even if you can't stand I can really recommend reading it, as it's a great book. Shirley's Realistic Ray Tracing is still very useful these days, but obviously it's lacking the state of the art. If you really want to avoid any code you should read Veach's PhD thesis [2] and then some papers on BSDFs [3], shapes [4] and ray tracing acceleration [5].

[1] http://wjakob.github.io/nori/

[2] http://graphics.stanford.edu/papers/veach_thesis/

[3] http://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.html

[4] http://www.graphics.cornell.edu/pubs/1997/MT97.html

[5] http://www.nvidia.com/object/nvidia_research_pub_012.html


This is such an awesome resource!!!! {Edit: I say this as a writer and not as a 3D animator / designer. I apologize for sounding very fan-boy about it, but I do really appreciate this.}


I've been lucky to see Tony DeRose, Alvy Ray Smith, and a few others give presentations in small, intimate settings at my local University.

Is there some way we could please SUBSCRIBE to notifications that wonderful speakers like these are coming to our area?

Okay, yes, I know this isn't your job, but please... you might be able to help me! :)


Looks pretty interesting. Was the domain for the content a Khan Academy decision, or was that just personal prerogative?


The initial idea for this content came from Pixar (Tony DeRose had given talks in the past showing connections between math and the movies - see here a video he did with numberphile a while back: https://www.youtube.com/watch?v=2NzTAaYgk4Q). The goal was to turn that sort of thing into a series of interactive lessons.


Are you going to add this content to your iOS app? Also my friend is looking forward to that Android app!!


The non-interactive content should mostly work in the iPad app. iPhone is trickier.

This is a tough area for us in general, unfortunately.


I'm trying out different videos and I can't find ANY instructional content in them - I mean in terms of technical information, something applied that you can learn and use. It feels like watching a TED talk and not a Khan academy lecture!


I just watched the first two sequences of videos and so far they have shown how to compute midpoints of lines and how to compute the coordinates of points on parabolic arcs given three arbitrary control points, including how to prove the identities involved. They then explain how this is used in practice to generate the shape of a blade of grass. Is this not the kind of technical information you were expecting to find?


I guess it would be great if there was some sort of application that let you apply these techniques and actually see the results.

Otherwise, it's like reading the theory section of documentation without getting to use the program.


All of our lessons give you interactive tools to create and experiment with in various ways. For example this one is fun: https://www.khanacademy.org/partner-content/pixar/modeling-c...


Yeah, I take my criticism back.

I didn't go through the whole thing initially. Excellent examples.

Thanks for your hard work. It is indeed an amazing series.


Some text indicating the target audience and any prerequisite knowledge would be great.


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.


That reflects a high school math teacher view.

To understand basic 3D computer graphics, you need some linear algebra, matrices, some analytic geometry, and some trigonometry, but not much calculus. Once you learn what a 4x4 matrix multiply can do, you have most of the key ideas. You need that to use OpenGL effectively. Actually, you only need about 10% of each of those areas of math, but you do need that 10%. "Graphics Gems" has some good background.

(Physics engines, though... I used to work on that, and struggled through two-volume books on nonlinear differential equations.)


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


Not relevant to what happened to him in high school.


Your teacher was a fucking idiot. What was his name, and what city does he live in?


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.


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.


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.


Pixar movies from Finding Dory onward will be exclusively raytracing, FWIW.


You sound pretty authoritative here, so I'll ask a semi-topical question: are the creative teams the ones driving this kind of development? "We need better fidelity/IQ because I would like this film to look more impressive that previous ones." Or is it more along the lines of Pixar demonstrating industry leadership?


It's both. Each new movie will generate new technical challenges, and the tech side of the studio will be prompted to rise to the new creative demands. Finding Dory, for example, is a natural choice for using path tracing because of all the refractive surfaces-- In a movie that's set in the ocean, it's pretty important to have water that looks realistic and natural (and frankly, using older technology might be more difficult to work with in the end). Finding Nemo-era technology would not really cut it these days. It makes sense that Pixar should put in a lot of effort to get this right.

On top of that, it's important to stay on the cutting edge, both in terms of keeping RenderMan a competitive product, and in terms of keeping the internal challenges interesting and fresh-- which is necessary for attracting top talent and preventing the company from getting into a rut or a routine.


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.


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.


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.


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.


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.


I guess I didn't fully understand your post then, I thought you meant that the Reyes algorithm is an "inferior estimation" and that it might be beneficial to add it to a renderer, but neither is the case. But it isn't an inferior estimation (just a different way of computing things) and you don't want to use the Reyes algorithm in practice as scenes either barely fit in memory or they don't fit in memory at all (and in that case you want your memory usage to be as efficient as possible to avoid reading from the disk as much as possible).


Am I missing something?

In "regular" Reyes (and I may just have this wrong - I was unaware that the hybrid technique you describe was common) I though you were a) locally approximating surfaces and b) applying local shaders. These shaders are typically inferior estimates of the BSDF at that location compared to other techniques, but can be very memory efficient.

In the hybrid approach you describe, you avoid at least (b) above by doing the shaders by path tracing, say, but localized to where your rasterizer has discovered. So you aren't benefiting in anything but speed, so this seem more an implementation detail than anything fundamental.

So I don't see how dropping this sort of detail from any introductory course is anything but sensible. There should probably be a discussion of space/speed/distributional issues in general, but at a higher level.

Again, I'm not questioning why anyone would want to implement it, just why anyone would find it odd to leave out from an introductory course.


I think it is important to know what the trade offs are in terms of speed, cost, quality. Lots of children's TV programs look like they are rendered with Unity or worse. Most likely on a single machine in real time.


REYES is now one of in newer PRMans for quite some time.


REYES (Render Everything You've Ever Seen) has been the basis of PRMan since the start. Recently PRMan has shifted away from this approach and towards more ray tracing. see the following for descriptions of REYES: http://renderman.pixar.com/view/reyes-renderman-under-the-ho... or the 1987 paper by Cook, Carpenter and Catmul http://graphics.pixar.com/library/Reyes/paper.pdf


Indeed, and it's now one of several rendering methods in PRMan - newer one is RIS: http://renderman.pixar.com/resources/current/RenderMan/risOv...

Sidenote, you could have always done raytracing in PRMan, even with REYES. You just bring your own trace(). BMRT was often used as a trace() engine, until they came up with Entropy and Pixar sued them out of existence (NVidia bought them).


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.


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. :)


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.


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/


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.


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.


Khan Academy got me through calc III and diff Eq


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.


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


FYI the image formatting is off on mobile chrome. http://imgur.com/0dyvQJP




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: