MoI discussion forum
MoI discussion forum

Full Version: Cloth simulation

Show messages:  1-4  5-24  25-44  45-64  65-73

From: bemfarmer
9 Feb 2014   [#5]
So I'm guessing, calculate a lot of points, at some density, ?
Turn the points into curves, like a fishing net with square holes?
Apply Network command?
From: Michael Gibson
10 Feb 2014   [#6] In reply to [#1]
Really cool Max, looks like you're having a lot of fun!

Re: interface - not sure what tips to give on that yet without knowing more details - is the movement of the ball something that's happening in the simulation code as well or is that responding to mouse movements?

I guess first thing that comes to mind with what you're showing there is something to control the grid density of the cloth?

- Michael
From: bemfarmer
10 Feb 2014   [#7]
I did a little reading, based upon google search of "verlet integration cloth simulation," and found lots of good sites with excellent information.

Select collision object(s), i.e. the sphere.
Cloth width.
Cloth height.
Grid density, or vertex distance.
Vertex "marble" distance, to prevent self intersection.
Attachment points, if any, i.e. 2 corners.

http://graphics.stanford.edu/~mdfisher/cloth.html

Another site explained collision.

- Brian
From: Max Smirnov (SMIRNOV)
10 Feb 2014   [#8]
Hi guys!

DannyT
>>Is that even possible in MoI?
Yes, it's possible. And it works even faster than I thought before.

bemfarmer
>>How much JavaScript code would that take?
I used three.js javascript library. It's so big! I need to clean all unused functions.
At the moment the code size is about 2000 lines. :)

>>So I'm guessing, calculate a lot of points, at some density, ?
I think 40x40 points will be enouth.

Michael Gibson
>>is the movement of the ball something that's happening in the simulation code as well or is that responding to mouse movements?
In the first video the ball movement was predefined. But it's possible to control it manually.


bemfarmer
In fact it's very easy. Really. Very simple mathematics.
>>Turn the points into curves, like a fishing net with square holes?Apply Network command?
Exactly! :)
From: bigseb
10 Feb 2014   [#9]
Not sure if this is helpful but Blender can also do a cloth simulation thing...

http://www.youtube.com/watch?v=2zd1AI198I8
From: Rich_Art
10 Feb 2014   [#10] In reply to [#8]
That is really cool...

Peace,
Rich_Art. ;-)
From: TpwUK
10 Feb 2014   [#11] In reply to [#9]
Hi Sebastian, that's just it, there are plenty of poly modelling apps that do cloth sims, but this is first I have seen of it in NURBS, so unless anyone knows different, this is going to be unique to MoI.

Martin Spencer-Ford
From: bemfarmer
10 Feb 2014   [#12]
Will the user be able to select a "bending stiffness" for the cloth?

Will there be a "Hair" mode ? :-)

- Brian
From: Max Smirnov (SMIRNOV)
10 Feb 2014   [#13] In reply to [#12]
Hi Brian
>>Will the user be able to select a "bending stiffness" for the cloth?
Afraid not. At least not in the first release.
From: Mauro (M-DYNAMICS)
10 Feb 2014   [#14] In reply to [#11]
TpwUK
<<Hi Sebastian, that's just it, there are plenty of poly modelling apps that do cloth sims, but this is first I have seen of it in NURBS, so unless anyone knows different, this is going to be unique to MoI.>>

Agree with you Martin
I understand also Sebastian's point of wiew:he belong to other branch of MOI's users:molders,cnc,3dprinters..for them this stuff could be not necessary

anyway Max that's amazing !! I also saw- Moi3d camera- on your youtube...we have to expect this too??...all for free..?? :) :)
From: wastzzz
10 Feb 2014   [#15]
Can't wait to try it out. Thanks for your contribute! About interface.. Uhm, guess you could type in the name (group) of the colliding objects, that would make it easy
From: Tommy (THOMASHELZLE)
11 Feb 2014   [#16]
Brilliant! :-)
From: Max Smirnov (SMIRNOV)
11 Feb 2014   [#17]
Hello!
Today I've started to making the interface.


I don't know when I'll finish it. I'm very busy at work.
Maybe this weekend.. Maybe later.
From: BurrMan
11 Feb 2014   [#18] In reply to [#17]
Insane Max....... Cant wait to try it!
From: Denis (SPACELAND)
11 Feb 2014   [#19]
Simply amazing, great work.
From: Mike K4ICY (MAJIKMIKE)
12 Feb 2014   [#20]
Holy mother of pearl!

Oh... there are going to be possibilities. ;-)




So! Will there be a 'pause' or 'reverse' of some sort? Would you be able to affect it by a chosen object; like the sphere being moved into it?
And yes, rigidity or tensile viscosity would be a nice touch too, but never mind me, I've been amazed at your result and can't wait to play with the final script.
From: ed (EDDYF)
12 Feb 2014   [#21] In reply to [#20]
I had similar thoughts Mike.

How do you freeze the "cloth" where you want it? Can you single-step through the "animation" and save the desired shape?

Can you output obj files of each step (frame) of the animation? Programs like Element 3D will accept obj sequences and render.

Can you affect the weight or damping of the cloth? That is, can you vary how many wrinkles are produced?

Can you deform anything other than a flat surface? That is, could two spheres collide and leave a dent?

Have you considered a variation of the script to produce ocean water?

This is fantastic work. I'm anxious to try it.

Ed
From: Tommy (THOMASHELZLE)
12 Feb 2014   [#22]
Now that looks like a lot of fun!
Should allow for some nice "relaxing" of surfaces.

Yeah, some control over stretchyness could be helpful and a single-step-mode too to catch the perfect frame...

MoI is starting to really grow up with all the cool scripts you guys are doing!
I never even realized what's possible...

Cheers,

Tom
From: bemfarmer
12 Feb 2014   [#23]
How about reversing the process?
Think of the Sphere as a sculpting tool, the cloth as a portion of a 3D surface.
So the Sphere would make dimples or rounded grooves in the surface.

- Brian
From: Max Smirnov (SMIRNOV)
12 Feb 2014   [#24]
Hi!
Here is my quick answers :)

Mike
>>Would you be able to affect it by a chosen object; like the sphere being moved into it?
Maybe in next version, but not now.

>>And yes, rigidity or tensile viscosity would be a nice touch too
It's impossible with the current engine. I will rewrite it later.

ed
>>Can you output obj files of each step (frame) of the animation?
I don't know. Need to check MoI export tools.

>>Can you affect the weight or damping of the cloth? That is, can you vary how many wrinkles are produced?
Yes. Yes. Already done.

>>Can you deform anything other than a flat surface? That is, could two spheres collide and leave a dent?
Surfaces only.

Tommy
>>Yeah, some control over stretchyness could be helpful..
Done.

>>..and a single-step-mode too to catch the perfect frame...
I'm writing it now.

bemfarmer
>>How about reversing the process?
All frames will be saved. You can rewind the record.

>>Think of the Sphere as a sculpting tool, the cloth as a portion of a 3D surface.
Maybe later.

Show messages:  1-4  5-24  25-44  45-64  65-73