14 - The secret of cloth simulation

  Рет қаралды 9,589

Ten Minute Physics

Ten Minute Physics

Күн бұрын

For the source html code and all other tutorials see matthias-research.github.io/p...
In this tutorial I reveal the secret of cloth simulation. I use it to write a very fast and stable cloth demo that simulates 6400 triangles at more than 30 fps on a cell phone in javascript.

Пікірлер: 30
@MarcoGiordanoTD
@MarcoGiordanoTD 2 жыл бұрын
Thank you so much for all the effort you are putting into each of these tutorial. it is absolutely great!
@kunqian7069
@kunqian7069 2 жыл бұрын
Very nice tutorial. Looking forward to tutorials on dynamic topology change (tear, fracture)
@Typhh
@Typhh 2 жыл бұрын
the channel that just keeps on giving
@DrTheRich
@DrTheRich 2 жыл бұрын
I'm curious how to add other important features to this, (self)collision, wind forces and turbulence, air drag etc. And how to connect it dynamically to other physics objects. I guess we'll see this in the future
@TenMinutePhysics
@TenMinutePhysics 2 жыл бұрын
I plan the next tutorial to be about cloth self-collision handling
@samuelyigzaw
@samuelyigzaw 2 жыл бұрын
Great series! I'm wondering if there's a way to implement soft bodies, cloths, strings, and particles (e.g. for fluids), in a way that allows for easy transformations from one type to another. Essentially, treating soft bodies, cloths, and strings as nothing more than meshes of particles that can be deformed and torn apart to create other soft bodies, cloths, and strings, but all cloth and string behavior is emergent from the same physics as the soft bodies, plus the fact that they're thinner or completely flat. This would really be great to build a game where players are able to modify the world in any way they would like in order to build anything.
@TenMinutePhysics
@TenMinutePhysics 2 жыл бұрын
Sure, your imagination is the limit. Just try it!
@harold425
@harold425 2 жыл бұрын
I would love to see a video talking about your small step XPBD paper. Especially how to handle collection detection. Great job on this channel by the way!
@mytino
@mytino 2 жыл бұрын
The "Small Steps in Physics Simulation " paper? Would love to see this as well. I'm left with several questions after reading it. If you've read it and want to discuss, please tell me :)
@harold425
@harold425 2 жыл бұрын
@@mytino I read this paper as well yes. I found it pretty clear, to the point where I was able to implement it into my cloth sim. The only piece I'm missing is how to handle collision detection efficiently with this method. Running it for every sub step kills the performances. If I do it only once in a while I get some flickering. If you have specific section of the paper where you have questions, please leave a message here. I would be happy to help if I can ;)
@JoshyLats
@JoshyLats 2 жыл бұрын
Awesome ! Thanks a lot!
@mytino
@mytino 2 жыл бұрын
Great video! What do you mean by "weak in flat state" at 2:55? That it's harder to keep it straight against gravity for example? Is this weak vs strong issue present in the 2D case as well?
@TenMinutePhysics
@TenMinutePhysics 2 жыл бұрын
Thx. I will talk about in a future tutorial. Weak means the force is weak to restore the angle when the triangles are in the same plane - stretched out. This is because the force of the diagonal is in the same plane too. The forces of an angular constraint are perpendicular to the common plane.
@munshomenhamun2271
@munshomenhamun2271 2 жыл бұрын
Really nice work :), Matthias. I am a researcher and doing an explicit tracking survey. I wonder if you can share your implementation of grid-free tracking method? I would be pleased to have it for a comparison :).
@TenMinutePhysics
@TenMinutePhysics 2 жыл бұрын
Sorry, we haven't open sourced that code. But we did a SIGGRAPH course and survey on explicit surface tackling already.
@mytino
@mytino 2 жыл бұрын
Is there any place we can ask you questions about PBD in general? Would love some kind of Q&A page where devs can ask about various PBD aspects! Would be very valuable! I've been diving deep into PBD in my sparetime, reading papers and implementing. Having a lot of fun, but got many questions, for example regarding unification of constraints, e.g. constraint order, local vs global relaxation, what constraints to pre-stabilize etc., and very curious about the incredible method in your "Small Steps in Physics Simulation " paper!
@TenMinutePhysics
@TenMinutePhysics 2 жыл бұрын
I just created a discord server here discord.gg/A8ANf82r
@mytino
@mytino 2 жыл бұрын
@@TenMinutePhysics Perfect!
@megakukis
@megakukis 2 жыл бұрын
@@TenMinutePhysics looks like invite has expired, can i have a new link?
@EvertonSchneiderS
@EvertonSchneiderS 2 жыл бұрын
Amazing explanation. Thanks. Do you think that shrink and grow the constraints connections along time could work in your implementation? In blender the cloth solver is very old, there's an option there called "Shrink" to control the cloth size via simulation with vertex groups also... I'm following your youtube channel and I see you implementing some things into blender... I'm very curious about it(specially softbody)... are you working in Sofbody implementations in blender?
@megakukis
@megakukis 2 жыл бұрын
you can easily modify rest lengths of the distance constraints every frame in the way you need (like scale them or lerp between two values)
@TenMinutePhysics
@TenMinutePhysics 2 жыл бұрын
One thing that works very well is to shrink the rest lengths of the distance constraints to make cloth more tightly fitting. I haven't written any simulation code in Blender yet.
@boldoberan
@boldoberan 2 жыл бұрын
Do I see similarities to Two Minute Papers here?
@TenMinutePhysics
@TenMinutePhysics 2 жыл бұрын
The presented quite a few papers from us :-)
@LukaszWiklendt
@LukaszWiklendt 2 жыл бұрын
3:54 is confusing, is {1, 2, 4} meant to go to 2 and {1, 3, 0} to -1?
@randoshmuckarias1296
@randoshmuckarias1296 2 жыл бұрын
I believe -1 means the end of a list
@elonkou5682
@elonkou5682 Жыл бұрын
I think you are right.
@okifunearl8511
@okifunearl8511 2 жыл бұрын
is {1,2,4} supposed to have edge neighbor id '4' instead of '2' at 4:08? I'm a little bit confused...
@happyhorse7886
@happyhorse7886 Жыл бұрын
the index of the neighbor list is the global edge number, edge 0 = -1, e1 = -1, e2 = 4, e3 = -1, e4 = 2 ...., but I agree it is very confusing
@novidtoshow
@novidtoshow Жыл бұрын
I am always amazed how much you can simulate in so little code! That said, your cloth simulator would probably not pass the cloth drape test, commonly used in the industry. Different fabrics can be characterised by draping the cloth over a circular disc and countinquantifynig the folding pattern that's created. Particularly, fabrics that stretch on the bias will be hard for your model to properly simulate, I think. (img80002883.weyesimg.com/uploads/www.gesterinstruments.com/images/15795049351797.jpg?imageView2/2/w/1920/q/100).
06 - The simplest way to simulate a triple pendulum
9:54
Ten Minute Physics
Рет қаралды 14 М.
11 - Finding collisions among thousands of objects blazing fast
11:04
Ten Minute Physics
Рет қаралды 22 М.
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 13 МЛН
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 68 МЛН
9 Years of Progress In Cloth Simulation! 🧶
7:38
Two Minute Papers
Рет қаралды 107 М.
Coding Challenge #20: 3D Cloth with toxiclibs
30:40
The Coding Train
Рет қаралды 93 М.
09 Getting ready to simulate the world with XPBD
15:38
Ten Minute Physics
Рет қаралды 20 М.
03 - Writing a billiard simulation in 10 minutes
11:34
Ten Minute Physics
Рет қаралды 11 М.
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 251 М.
17 - How to write an Eulerian fluid simulator with 200 lines of code.
12:05
Ten Minute Physics
Рет қаралды 290 М.
15  - Self-collisions, solving the hardest problem in animation
7:31
Ten Minute Physics
Рет қаралды 12 М.
16  - Simulation on the GPU
12:52
Ten Minute Physics
Рет қаралды 19 М.
12 - 100x speedup for soft body simulations
8:11
Ten Minute Physics
Рет қаралды 8 М.
A problem so hard even Google relies on Random Chance
12:06
Breaking Taps
Рет қаралды 1,1 МЛН
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 13 МЛН