Physics Simulation Just Crossed A Line
Two Minute Papers
0:00 Let’s throw two properly dressed armadillos down into this container.
0:05 Yowch!
0:05 Did you see that?
0:07 Oh goodness.
0:09 I hope they have good health insurance, because that looked painful.
0:12 Then, a barbarian ship slides down the stairs.
0:15 This guy is made of 487 thousand tetrahedra.
0:21 Insane.
0:22 So how on earth is it possible to compute all this?
0:26 Well, this is a physics program that can compute how
0:30 your cloth moves if you do crazy handstands like this.
0:33 If only he knew that we are about to put him into pajamas.
0:38 Then we are going to throw these tablecloths down
0:42 and see these beautiful complex self-collisions and stacking behavior.
0:48 This is a crazy test for these programs
0:51 because it creates tons of self-collisions,
0:54 but wait…this one keeps every layer distinct and realistic.
0:59 Absolutely amazing.
1:00 And this is not AI, this is pure human brilliance.
1:05 But…how?
1:06 Well, I’ll tell you the secret of this program in this video.
1:10 That would be great, because this can do incredible things.
1:14 Just look at this scene where two fabric strips
1:17 are pulled in opposite directions to form a tight knot!
1:21 The tension is incredible, and the way the fabric wrinkles and compresses
1:27 without passing through itself is simply beautiful to watch.
1:31 It handles these complex frictional contacts so gracefully,
1:35 ensuring that the knot tightens naturally just like in real life.
1:40 Now hold on to your papers Fellow Scholars,
1:43 because this is not only realistic, but it is fast!
1:47 So, how fast?
1:48 This curtain simulation involves 6 million degrees of freedom.
1:53 Degrees of freedom refers to the number
1:55 of variables the computer has to solve for.
1:59 Imagine solving a math problem with 6 million unknowns!
2:03 Usually, this would take an eternity,
2:06 but this method simulates one frame in just 6.6 seconds.
2:12 Mind blown!
2:13 So how much faster is this than previous techniques?
2:16 Well, up to 66 times faster than C-IPC,
2:21 this amazing previous technique that we talked about 455 videos ago.
2:26 That’s an exact number.
2:28 Then, it is 11x faster than PD-Coulomb, another CPU-based friction method.
2:34 And get this- it runs on your processor.
2:39 Now, you might be thinking: "But Károly, this runs on the processor.
2:43 Isn't the CPU the slow turtle compared to the graphics card,
2:47 the GPU for these massive parallel tasks?”.
2:50 Excellent question.
2:51 Well, this algorithm is so clever that it actually runs 2.6
2:57 times faster than a state-of-the-art technique that runs on the GPU.
3:02 That’s like a minivan beating a Formula 1
3:06 car just because the minivan knew a shortcut!
3:10 Okay, so how is all this wizardry possible?
3:13 How are they doing this?
3:15 GPUs are meant to be 100s of times faster than CPUs.
3:20 Yet, the CPU wins here.
3:22 How is that even possible?
3:24 Dear Fellow Scholars, this is Two Minute Papers with Dr.
3:28 Károly Zsolnai-Fehér.
3:29 To understand this, imagine you are
3:31 trying to solve a 10,000-piece jigsaw puzzle.
3:35 The GPU approach is like hiring 10,000 ants to solve it.
3:39 Sounds good, right?
3:40 Each ant holds exactly one piece.
3:43 They are super fast and all work at the exact same time, in parallel.
3:49 Well…this sounds perfect!
3:50 But wait, because they are just ants, they can't see the big picture.
3:57 They have to constantly shout at their neighbors, “Hey, does this fit?
4:01 And what about this one?" over and over again.
4:04 This shouting match is what scientists call iterations,
4:07 and for complex cloth that stretches across the whole screen,
4:12 the ants have to shout millions of times to get
4:15 the edges of the puzzle to agree with the center.
4:19 It works, but man, it takes a lot of yelling.
4:22 It’s a bit like your corporate email thread
4:25 where you accidentally press reply-all to 10,000 people.
4:29 But here, everyone does that.
4:32 Good times!
4:33 Okay, so that’s not the way.
4:35 This new paper proposes a different strategy.
4:38 Step number one: fire the ants.
4:40 Get out of here!
4:42 Instead, let's hire 32 puzzle grandmasters- these represent your CPU cores.
4:48 The algorithm takes the giant puzzle and cuts it into 32 large,
4:53 separate chunks- this is called Domain Decomposition.
4:57 Now, each grandmaster takes one chunk into a quiet
5:01 room and solves it perfectly in a split second.
5:05 So that means that these are not pajamas.
5:08 These colorful pieces of clothing are the chunks for the domain decomposition.
5:13 They look like a patchwork quilt
5:15 made by a very mathematically inclined grandmother.
5:19 Well done grandma!
5:21 The problem has been cut up into many smaller problems,
5:24 each of which can be solved very quickly.
5:27 But the problem is of course, that they have to connect.
5:32 How do we reassemble them?
5:34 Well, since these are grandmasters, these people mean serious business.
5:39 This means they don't guess.
5:41 Nope.
5:42 Instead, they first agree on the shared edges,
5:45 and then instantly solve the rest of their puzzle pieces.
5:48 So, once the grandmasters finish their parts,
5:51 they meet and simply click the 32 big finished sections together.
5:56 Because they solved the hard internal parts perfectly on the first try,
6:01 they don't need to have a shouting match.
6:03 They just stitch the boundaries together and go home early.
6:07 This is genius.
6:08 Why?
6:09 Because it plays into the CPU's strength.
6:13 You see, the GPU has an army of ants strategy.
6:17 But instead, the CPU can do smart, heavy lifting on fewer tasks.
6:22 That is exactly what we are doing here!
6:26 Amazing.
6:26 Okay, so here is how brilliantly they put this into mathematics.
6:31 I’ll explain it in a simple way.
6:33 But ,you have to promise that you won’t close the video.
6:37 You gotta stay until the end!
6:39 Promise?
6:40 Promise.
6:40 Okay.
6:41 This is the original equation from the paper,
6:44 but we are a child friendly show so I’ll truncate it to this one.
6:48 You see, normally you have to solve
6:51 for every single piece of the puzzle at once.
6:54 The 10,000 ants.
6:55 That’s a matrix with millions of rows.
6:58 Solving these takes insanely long.
7:01 But this equation says.
7:02 You know what, let’s split the variables into two teams.
7:06 This symbol here, Lambda, is the glue.
7:09 It represents the forces holding the different chunks together.
7:13 And this one, XC, represents the corner
7:16 pieces—the few crucial spots where the domains touch.
7:20 These terms here basically say: "Ignore the million puzzle pieces,
7:24 we already know they are perfect.
7:27 Let's only solve for the glue and the corners”.
7:31 This is what the grandmasters do.
7:33 And that is where the brilliance is.
7:35 I absolutely love this.
7:37 So beautiful!
7:39 Mathematically, this reduces a massive, impossible problem into a tiny,
7:44 easy one that solves the interactions between the domains.
7:48 It effectively turns the shouting match of millions of ants into a polite,
7:54 quick handshake between 32 grandmasters.
7:57 The math actually makes things simpler!
7:59 This is beyond amazing.
8:01 This is the magic of the papers.
8:05 This is what makes everything 66 times faster
8:08 than a previous technique that was already amazing.
8:11 What a time to be alive!
8:13 And it honestly breaks my heart that almost nobody knows about this work.
8:18 This brilliant paper is sitting there, solving problems 66 times faster,
8:23 and the world is just scrolling past it.
8:26 And this is why I devoted my life to learning
8:30 and talking about these papers to you Fellow Scholars.
8:33 There are so many hidden gems out there that no one knows or talks about!
8:38 You know why?
8:39 Because apart from very few cases,
8:42 Youtube doesn’t recommend this kind of content.
8:44 So you can’t make easy money off of it.
8:47 That’s it.
8:48 That’s the reason.
8:49 But papers are amazing!
8:51 John Carmack also picked up a bit of a paper habit, very proud of him.
8:56 Way to go John!
8:57 So save the snails, save the beavers, subscribe to Two Minute Papers!