 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I've been still working on cloths, but only today I got decent results which
I could post.
I rewrote everything, and I'm again using forward Euler, as my attempts with
backward Euler were very frustrating. However, I implemented a
variable-timestep scheme, which adapts the timestep in function of the
amount of stress in the cloth. If there are very strong forces, then a
smaller step is taken. I still have to tweak this a little bit.
Another important change was the use of the mesh2 object, instead of the
ordinary mesh object. Thanks to this the parsing and render time is reduced,
and also I was able to implement uv mapping to the mesh.
I had several problems with the appearance of many completely black
triangles, and it took me a while to discover that radiosity eliminated that
problem. However, it now takes ages to produce the animation.
I turned off air resistance because I had some bizarre problems with it, but
I'll work on it very soon.
Well, I hope you like it and I'll be very happy to receive any comment or
suggestion,
Fernando.
Post a reply to this message
Attachments:
Download 'newcloth21.m1v.mpg' (366 KB)
|
 |
|  |
|  |
|
 |
From: Tony[B]
Subject: Re: Sorry, I'm still obsessed with cloths (MPEG1)
Date: 9 Feb 2002 12:51:23
Message: <3c65619b@news.povray.org>
|
|
 |
|  |
|  |
|
 |
It would be even more interesting if you dropped the cloth from higher up,
and it was already slightly crumpled before hitting the sphere. It's kinda
awkward when you see a flat cloth just hanging in the air like that. Anyway,
very nice work. Have you and Apache communicated? I think it would be best
to combine your efforts than to go your own separate ways...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thanks Tony,
Yes, I was able to chat once with Apache by ICQ, but I had to reinstall
Windows again and I lost his ICQ number. Apache: can you give me your ICQ
number, please?
I'm glad you liked it. Please remember that this is just an experiment which
turned out to be decent enough to post it!
Thanks for your comments,
Fernando.
"Tony[B]" <ben### [at] catholic org> wrote in message
news:3c65619b@news.povray.org...
> It would be even more interesting if you dropped the cloth from higher up,
> and it was already slightly crumpled before hitting the sphere. It's kinda
> awkward when you see a flat cloth just hanging in the air like that.
Anyway,
> very nice work. Have you and Apache communicated? I think it would be best
> to combine your efforts than to go your own separate ways...
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Tim Nikias
Subject: Re: Sorry, I'm still obsessed with cloths (MPEG1)
Date: 9 Feb 2002 19:05:05
Message: <3C65B922.537B0D6D@gmx.de>
|
|
 |
|  |
|  |
|
 |
Looks really good!
Some things I that popped into my mind:
your problem with those black triangles may be
due to the lightsource positioned behind the triangle
(even it is not, I don't know if it could pop up during
tracing when POV thinks that the surface normal
of the triangle points the other direction, don't know,
only something that popped up). Perhaps try
double_illuminate on the cloth (as long as it really
is very thin).
Do you have cloth-cloth collision yet?
And how does your programm work: write
hundreds of files for POV-Ray to render,
or what?
I'm really curious!
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Simen Kvaal
Subject: Re: Sorry, I'm still obsessed with cloths (MPEG1)
Date: 9 Feb 2002 19:27:51
Message: <3c65be87@news.povray.org>
|
|
 |
|  |
|  |
|
 |
This looks better and better! :)
Have you considered using a second, third or fourth order Runge-Kutta
integration scheme? It is much more stable than Euler-integration (which is
intrisically unstable) and only requires a little more programming. Once
done, it's certainly worth the while...
http://mathworld.wolfram.com/Runge-KuttaMethod.html
Regards,
Simen Kvaal.
"Fernando González del Cueto" <fcu### [at] yahoo com> wrote in message
news:3c655363@news.povray.org...
> I've been still working on cloths, but only today I got decent results
which
> I could post.
>
> I rewrote everything, and I'm again using forward Euler, as my attempts
with
> backward Euler were very frustrating. However, I implemented a
> variable-timestep scheme, which adapts the timestep in function of the
> amount of stress in the cloth. If there are very strong forces, then a
> smaller step is taken. I still have to tweak this a little bit.
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hallo Tim,
I think I found the problem with the stupid black triangles!!! I just found
out that I had a typo in the code with an 'm' instead of a 'k' so no wonder
I was getting wrong effects. The funny thing is that I "checked" the code
several times and I never saw that big mistake. I had already tried
double-illumination, but the black triangles still were there.
I still have not implemented cloth-cloth collision. That's definitely in the
to-do list.
Yes, my program (coded in C) writes a text file for each frame, where there
are the coordinates of each "node" as I call them (or "atoms" as Apache
calls them) the normal vectors for each node, and the face indices for each
triangle in the mesh2 object. As I said some time ago, I found this method
very good to parallelize the total effort: my brother's computer creates
this text files, and my computer renders the frames. (Well, when he lets me
use his computer!)
Then my POV script reads these files sequentially (with the built-in
animation features of POV) and generates the sequence of images.
I'm glad you liked it and "danke" for your comments,
Fernando.
"Tim Nikias" <tim### [at] gmx de> wrote in message
news:3C65B922.537B0D6D@gmx.de...
> Looks really good!
>
> Some things I that popped into my mind:
>
> your problem with those black triangles may be
> due to the lightsource positioned behind the triangle
> (even it is not, I don't know if it could pop up during
> tracing when POV thinks that the surface normal
> of the triangle points the other direction, don't know,
> only something that popped up). Perhaps try
> double_illuminate on the cloth (as long as it really
> is very thin).
>
> Do you have cloth-cloth collision yet?
> And how does your programm work: write
> hundreds of files for POV-Ray to render,
> or what?
>
> I'm really curious!
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi Simen,
I have considered the idea, but I haven't been able to implement it. The
function to be integrated has lots of variables and I still have not found
an easy way to add it. Nevertheless, I'm not happy with Forward Euler so I
definitely will be trying to implement other more stable methods.
A few weeks ago I tried with Backward Euler, which is an implicit method,
(which in theory has excellent stability properties) but had terrible
results.
I'll let you know if I succeed in this stuff.
Thanks for your suggestions!
Fernando.
"Simen Kvaal" <sim### [at] remove_me student matnat uio no> wrote in message
news:3c65be87@news.povray.org...
> This looks better and better! :)
>
> Have you considered using a second, third or fourth order Runge-Kutta
> integration scheme? It is much more stable than Euler-integration (which
is
> intrisically unstable) and only requires a little more programming. Once
> done, it's certainly worth the while...
>
> http://mathworld.wolfram.com/Runge-KuttaMethod.html
>
> Regards,
> Simen Kvaal.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>
> I turned off air resistance because I had some bizarre problems with it, but
> I'll work on it very soon.
When you drop a real cloth you would expect the cloth to not just stay
flat and drop. All sorts of non-linear behavour should occur.
Or are your problems of a different sort?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
My ICQ crashed!
It seems that ICQ doesn't like terminal services and stuff like that.
At this moment, I'm running Miro$oft's MSN Messenger:
Tatlicisi-at-hotmail-dot-com
My e-mail address: apacheserver2000-at-yahoo-dot-com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"andrel linnenbank" <a.c### [at] amc uva nl> wrote in message
news:3C66EF3E.9419D143@amc.uva.nl...
> >
> > I turned off air resistance because I had some bizarre problems with it,
but
> > I'll work on it very soon.
>
> When you drop a real cloth you would expect the cloth to not just stay
> flat and drop. All sorts of non-linear behavour should occur.
> Or are your problems of a different sort?
Yes, I agree with you. However, my simulation is a very simplified model
from reality :) I strive to improve that realism, but my lack of knowledge
in physics is a big obstacle. It would be very nice to know more about fluid
dynamics...
Thanks for your comments,
Fernando.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I subscribed to sc.physics.computational.fluid-dynamics, but I cannot see
any of the posts.
And about that non-linear behaviour of falling fabrics, I think that those
behaviours are caused by air resistance.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Simen Kvaal
Subject: Re: Sorry, I'm still obsessed with cloths (MPEG1)
Date: 11 Feb 2002 18:29:34
Message: <3c6853de$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
>
> Yes, I agree with you. However, my simulation is a very simplified model
> from reality :) I strive to improve that realism, but my lack of knowledge
> in physics is a big obstacle. It would be very nice to know more about
fluid
> dynamics...
>
Complex behaviour can often be incorporated in models by changing the
premises a little bit: Perturb the model a little in one direction, make the
parameters that describe the cloth vary along the surface et.c.
I really think fluid dynamics wouldn't help you very much in this case.
Computational fluid dynamics (CFD) is a vast area, and millions of CPU hours
are required for relatively small models. And modelling air flow along the
surface of a fabric sure is a complex model!
What about trying to implement velocity dependent air resistance? Assuming
that you can (or alredy have) discretizised your cloth in polygons of some
sort, and assumng that the cloth's velocity through air is slow, maybe a
model like this could be a starting point?
F = - |v| * cos (theta) * A * constant
where v is the polygons velocity, A its area and theta v's angle with the
surface normal. F is the force the polygon "feels" from the air resistance.
This model assumes that the air is uniformly distributed with equal pressure
everywhere, through all time. This is true when there is no wind, the cloth
falls slowly and when two pieces of cloth are not very close to each other.
(In that case, air pressure will change.)
Again, I emphasize the usefulness Runge-Kutta scheme. Assuming that you are
solving with Euler by 1) calculating forces/acceleration on some set of
point masses, 2) adding acceleration * dt to the velocity of each point mass
and 3) adding velocity * dt to position, it really should be a simple task
to extend it to a fourth order scheme. With adaptive time-step, the method
is very robust! I have successfully modelled a lump of jelly (i.e. 3d-mesh
of points connected by (even nonlinear) springs.)
regards,
Simen Kvaal.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Simen Kvaal" <sim### [at] remove_me student matnat uio no> wrote in message
news:3c6853de$1@news.povray.org...
Hi Simen!
> F = - |v| * cos (theta) * A * constant
Yes, I did something like that!!! I also came up with that idea, however I
did not include A, assuming (maybe wrongly) that all triangles' area would
be more or less the same, so it wouldn't be too bad to ignore that factor
and it would help to speed up the cycle.
My results weren't bad, and I just jumped from the idea of air resistance to
the idea of wind. I think it looks very good. I'll post my latest animation
right way. I hope you'll like it.
> Again, I emphasize the usefulness Runge-Kutta scheme. Assuming that you
are
> solving with Euler by 1) calculating forces/acceleration on some set of
> point masses, 2) adding acceleration * dt to the velocity of each point
mass
> and 3) adding velocity * dt to position, it really should be a simple task
> to extend it to a fourth order scheme. With adaptive time-step, the method
> is very robust! I have successfully modelled a lump of jelly (i.e. 3d-mesh
> of points connected by (even nonlinear) springs.)
Thanks for your suggestion, I promise I will try to implement it soon!
Fernando.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Might I suggest Ian Burgmyer's Infinity Communicator? Can't be any worse
than M!cr0$oft...
Apache wrote:
>
> My ICQ crashed!
>
> It seems that ICQ doesn't like terminal services and stuff like that.
>
> At this moment, I'm running Miro$oft's MSN Messenger:
> Tatlicisi-at-hotmail-dot-com
> My e-mail address: apacheserver2000-at-yahoo-dot-com
--
signature{
"Grey Knight" contact{ email "gre### [at] yahoo com" }
site_of_week{ url "http://digilander.iol.it/jrgpov" }
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Apache
Subject: Re: Sorry, I'm still obsessed with cloths (MPEG1)
Date: 12 Feb 2002 07:28:53
Message: <3c690a85@news.povray.org>
|
|
 |
|  |
|  |
|
 |
> I have successfully modelled a lump of jelly (i.e. 3d-mesh
> of points connected by (even nonlinear) springs.)
I'd like to see that! Could you post a nice gello animation? My little
system *is* capable of that, but I've never been patient enough to let it
simulate it. I'm in serious need of cpu power, you know :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Simen Kvaal
Subject: Re: Sorry, I'm still obsessed with cloths (MPEG1)
Date: 12 Feb 2002 16:04:49
Message: <3c698371$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
>
> I'd like to see that! Could you post a nice gello animation? My little
> system *is* capable of that, but I've never been patient enough to let it
> simulate it. I'm in serious need of cpu power, you know :-)
>
Coming up! :)
Me too in need of CPU power. I will start rendering and hopefully post a
nice MPEG in a day or two...
Regards,
Simen Kvaal.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |