
Pixar's senior scientist explains how math makes the movies and games we love - ColinWright
https://www.theverge.com/2013/3/7/4074956/pixar-senior-scientist-derose-explains-how-math-makes-movies-games
======
corysama
Not only was the hair in Brave modeled with math, all of the vegetation was
procedurally generated by Íñigo Quílez of
[http://shadertoy.com](http://shadertoy.com) fame.

[http://www.cgw.com/Publications/CGW/2012/Volume-35-Issue-4-J...](http://www.cgw.com/Publications/CGW/2012/Volume-35-Issue-4-June-
July-2012/The-Royal-Treatment.aspx)

~~~
meuk
Inigo Quilez also has an awesome site with very accessible articles:
iquilezles.org (I think the articles section is the most interesting part).

------
electricslpnsld
Here is their publication on hair simulation if y'all are interested:
[http://graphics.pixar.com/library/CurlyHairB/paper.pdf](http://graphics.pixar.com/library/CurlyHairB/paper.pdf)

There is some wild stuff in their library!

------
oggyhead
The article states the guy says when you have n objects you have n^2 possible
collisions, if you're assuming just one on one interaction and an object
cannot collide with itself shouldn't it be n*(n-1)? Am I missing something
here?

~~~
mxwsn
Since collisions between two objects are symmetric (object one colliding with
object two is the same event as object two colliding with object one) there
are n(n-1)/2 possible collisions. The guy's probably short handing this as
O(n^2), which is the important relationship as he's motivating the example by
the need to handle collisions between large numbers of particles in hair, and
modeling hair with as large a number of separate elements as possible is
probably the key to realistic simulation.

~~~
mishurov
It's definitely a shorthand since a typical solution for collision detection
is a space partitioning recursive data structure which reduces collision tests
to O(n log n)

~~~
ColinWright
That point is actually covered in the article:

 _Merida 's hair is made of 100,000 individual elements. "If you know any
combinatorics, you know that if you have n objects, you have n² possible
collisions," he says, or 10 billion. How can you render so many collisions
quickly enough to be usable? You have to create a new spatial data structure
that culls extraneous collisions without being too lossy._

So he's saying that naively with _n_ objects there are _n²_ possible
collisions, but they have to do clever things - such as you suggest, or even
cleverer - to reduce that. Already there. In the article.

But the GGP's point is that there aren't _n²_ possible collisions, there are
only _n(n-1) /2_ if you allow for the symmetries. But is still grows
quadratically, and that's the point being made. Quadratic is too fast.

------
KKKKkkkk1
Is Pixar hiring computational mathematicians at the moment?

~~~
electricslpnsld
Looks like it!

Software Engineer, Simulation: [https://pixar.wd5.myworkdayjobs.com/en-
US/Pixar_External_Car...](https://pixar.wd5.myworkdayjobs.com/en-
US/Pixar_External_Career_Site/job/Emeryville/Engineer--Software_R-01608-1)

Research Scientist: [https://pixar.wd5.myworkdayjobs.com/en-
US/Pixar_External_Car...](https://pixar.wd5.myworkdayjobs.com/en-
US/Pixar_External_Career_Site/job/Emeryville/Research-Scientist_R-01512-1)

------
wgyn
This reminded me of a really fun article from an AMS publication a few years
back about harmonic functions and animation in Ratatouille:
[http://www.ams.org/publicoutreach/feature-column/fcarc-
harmo...](http://www.ams.org/publicoutreach/feature-column/fcarc-harmonic).
Turns out it was the same guy, Tony DeRose!

------
jcl
From 2013, which might be why the most recent movie referenced is Brave.

If you're interested in a slightly more concrete example of the math going
into Pixar movies, here's a Numberphile interview with Tony DeRose from around
the same time:

[https://news.ycombinator.com/item?id=8610626](https://news.ycombinator.com/item?id=8610626)

------
fatjokes
> "Somewhere out there, a brilliant kid and their friends are working in their
> garage" using and improving on tools like Blender, DeRose tells the
> assembled children and adults at MoMath. "They will be the next Pixar."

Nope. I love Pixar because of the stories and storytelling. First ten minutes
of Up? Inside Out? As long as they looked slightly better than ass I bet I'd
still love them.

