POV-Ray : Newsgroups : povray.binaries.utilities : Cloth simulator v. 0.1.0 Server Time
9 Oct 2026 04:35:54 EDT (-0400)
  Cloth simulator v. 0.1.0 (Message 1 to 20 of 20)  
From: Jérôme M  Berger
Subject: Cloth simulator v. 0.1.0
Date: 26 Jan 2001 11:12:26
Message: <3A71A1E1.2020109@iname.com>
If you remember the cloth simulator I did for my latest IRTC entry, and 
of which I'd posted a couple of samples two month ago, I've just put a 
new version online. The core simulation engine is exactly the same, but 
now it reads its parameters from a file, so you don't need to recompile 
eache time (and you don't need to understand C++ to use it ;) You'll 
find the source code (GPLed), a linux binary (works on my machine, I 
don't guarantee it'll work anywhere else though) and and the doc at this 
address:
http://www.enst.fr/~jberger/cloth/cloth.html

	If somebody makes a dos/win binary, please let me know so I can add a link.

	As time permits (and depending on my needs), I plan to add the following 
(no particular order):

* a realistic friction model (the current one is pure fantasy);
* a dynamic simulation model (plus animation facilities and wind);
* use the semi-solid cloth model (should allow faster simulation);
* handle self-collisions;
* ability to read/write the cloth in a file;
* ability to attach the cloth (like hanging curtains);
* other objects to interact with;
* ...

	If you have other ideas, or if you'd like some features to be implemented 
first, don't hesitate to tell it!

		Jerome
-- 
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] inamecom
* Settle for a good fantasy.    * http://www.enst.fr/~jberger
*********************************


Post a reply to this message

From: Christoph Hormann
Subject: Re: Cloth simulator v. 0.1.0
Date: 26 Jan 2001 13:06:52
Message: <3A71BCBD.2B3F1FA4@gmx.de>
"Jérôme M. Berger" wrote:
> 
>         If you remember the cloth simulator I did for my latest IRTC entry, and
> of which I'd posted a couple of samples two month ago, I've just put a
> new version online. The core simulation engine is exactly the same, but
> now it reads its parameters from a file, so you don't need to recompile
> eache time (and you don't need to understand C++ to use it ;) You'll
> find the source code (GPLed), a linux binary (works on my machine, I
> don't guarantee it'll work anywhere else though) and and the doc at this
> address:
> http://www.enst.fr/~jberger/cloth/cloth.html
> 
>         If somebody makes a dos/win binary, please let me know so I can add a link.

When compiling it with cygwin, it only complained about the 'if
(!isfinite(tmp))' in vector.cc.  I just commented it out to get it running
and it worked nice although with the sample parameters in the docu, it
generated 'NaN' values in the output.

I doubt these two things are related because the 'if (!isfinite(tmp))'
construction would not even finish the calculation.  

I don't know any C++ so i would appreciate some info about both the 'NaN'
output and the isfinite() function

>         As time permits (and depending on my needs), I plan to add the following
> (no particular order):
> 
> * a realistic friction model (the current one is pure fantasy);
> * a dynamic simulation model (plus animation facilities and wind);
> * use the semi-solid cloth model (should allow faster simulation);
> * handle self-collisions;
> * ability to read/write the cloth in a file;
> * ability to attach the cloth (like hanging curtains);
> * other objects to interact with;
> * ...
> 
>         If you have other ideas, or if you'd like some features to be implemented
> first, don't hesitate to tell it!
> 

Have you thought about adding it directly to Povray? that would make it
possible to use all Povray object for collision. 

Another nice thing would be smooth meshes.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Mark Wagner
Subject: Re: Cloth simulator v. 0.1.0
Date: 27 Jan 2001 00:27:24
Message: <3a725c3c@news.povray.org>
Christoph Hormann wrote in message <3A71BCBD.2B3F1FA4@gmx.de>...
>
>"Jérôme M. Berger" wrote:
>>
>>         If you remember the cloth simulator I did for my latest IRTC
entry, and
>> of which I'd posted a couple of samples two month ago, I've just put a
>> new version online. The core simulation engine is exactly the same, but
>> now it reads its parameters from a file, so you don't need to recompile
>> eache time

And just today I'd started making these modifications to version 0.0.0 :-)

>When compiling it with cygwin, it only complained about the 'if
>(!isfinite(tmp))' in vector.cc.  I just commented it out to get it running
>and it worked nice although with the sample parameters in the docu, it
>generated 'NaN' values in the output.


The algorithm used is numerically unstable.  Under certain circumstances,
points will start heading off towards infinity.  isinfinite() attempts to
detect this and currently stops calculations with an error.

>>
>>         If you have other ideas, or if you'd like some features to be
implemented
>> first, don't hesitate to tell it!


If you haven't already implemented it, I'd like interaction with spheres (or
even better, blobs ;-).

--
Mark


Post a reply to this message

From: Mark Wagner
Subject: Re: Cloth simulator v. 0.1.0
Date: 27 Jan 2001 00:32:02
Message: <3a725d52@news.povray.org>
Mark Wagner wrote in message <3a725c3c@news.povray.org>...

>If you haven't already implemented it, I'd like interaction with spheres
(or
>even better, blobs ;-).


Additional suggestion: Replace the #version unofficial MegaPov 0.6; wit
#version unofficial MegaPov 0.3;.  Mesh2 only requires 0.3, and for those of
us using older versions of MegaPOV, it would be nice not to need to change
this in every file.

--
Mark


Post a reply to this message

From: Christoph Hormann
Subject: Re: Cloth simulator v. 0.1.0
Date: 27 Jan 2001 05:54:03
Message: <3A72A8CB.D5B4305A@gmx.de>
Mark Wagner wrote:
> 
> The algorithm used is numerically unstable.  Under certain circumstances,
> points will start heading off towards infinity.  isinfinite() attempts to
> detect this and currently stops calculations with an error.
> 

That's interesting, because it happens with the sample parameters Jérôme
suggested - I wouldn't expect such differences between linux and cygwin. 
I added 'hnoise' and 'vnoise' to the .cl file and it works ok now (with
'(!isfinite(tmp))' replaced by '(tmp>1e300)').

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Cloth simulator v. 0.1.0
Date: 28 Jan 2001 18:04:37
Message: <3a74a585$1@news.povray.org>
Could you make the Windows Version public in one way or another (of course
only if it's OK for Jérôme)? Or if not, could you mail me a copy? I have no
compiler here and not even basic knowledge about using one, but I would
really love to try the program.

Marc-Hendrik


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Cloth simulator v. 0.1.0
Date: 28 Jan 2001 18:07:43
Message: <3a74a63f@news.povray.org>
Marc-Hendrik Bremer schrieb in Nachricht <3a74a585$1@news.povray.org>...
>Could you make the Windows Version public in one way or another (of course
>only if it's OK for Jérôme)? Or if not, ...

If you don't want to make it public, that is .... :-/


Post a reply to this message

From: Tony[B]
Subject: Re: Cloth simulator v. 0.1.0
Date: 28 Jan 2001 23:30:24
Message: <3a74f1e0@news.povray.org>
God bless you, you kind, intelligent man! I don't visit p.b.u often enough.
I would really appreciate a dos/win compile if anyone can slap one together.
Keep up the good work Jerome! :)


Post a reply to this message

From: Christoph Hormann
Subject: Re: Cloth simulator v. 0.1.0
Date: 29 Jan 2001 01:33:25
Message: <3A750EB2.254949@gmx.de>
Marc-Hendrik Bremer wrote:
> 
> Could you make the Windows Version public in one way or another (of course
> only if it's OK for Jérôme)? Or if not, could you mail me a copy? I have no
> compiler here and not even basic knowledge about using one, but I would
> really love to try the program.
> 
> Marc-Hendrik

Please wait till the afternoon :-) 

I am working on some general changes of the website so i thought about
putting it there later, but will do it sooner now.  Anyway, real life is
demanding this morning so...

It's made with cygwin so you will need the cygwin DLL just like for
PovCyg.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Cloth simulator v. 0.1.0
Date: 29 Jan 2001 07:38:12
Message: <3a756434@news.povray.org>
Christoph Hormann schrieb in Nachricht <3A7### [at] gmxde>...
>Please wait till the afternoon :-)
>


Of course :-)

>It's made with cygwin so you will need the cygwin DLL just like for
>PovCyg.


Can I find that DLL in the cygwin-package? I thing I have it on one of the
c't shareware CD's ...?

Thanks,

Marc-Hendrik


Post a reply to this message

From: Tony[B]
Subject: Re: Cloth simulator v. 0.1.0
Date: 29 Jan 2001 09:34:27
Message: <3a757f73@news.povray.org>
> It's made with cygwin so you will need the cygwin DLL just like for
> PovCyg.

Could you include the DLL on your site? I was unable to download it with the
cygwin package (and that's why I didn't try your cygPOV).


Post a reply to this message

From: Christoph Hormann
Subject: Re: Cloth simulator v. 0.1.0
Date: 29 Jan 2001 10:31:35
Message: <3A758CD6.A941447F@gmx.de>
Here it comes:

http://www.schunter.etc.tu-bs.de/~chris/cloth/index.html

The Cygwin DLL is needed to run the program.  I'm using version 1.1.7
which is the latest (Dec. 28 2000) and i don't know if earlier versions
work as well.  

You can find it on the Cygwin homepage:
http://sources.redhat.com/cygwin/

Either use the setup program offered:
http://sources.redhat.com/cygwin/setup.exe

or directly download the package from one of the various mirror sites
like:
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/mirrors/cygnus/latest/cygwin/cygwin-1.1.7-1.tar.gz

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Cloth simulator v. 0.1.0
Date: 29 Jan 2001 16:11:05
Message: <3a75dc69@news.povray.org>
That is really great!

I succeeded in removing the vnoise and hnoise by using step 0.1.

Thank you very much, Chris and Jérôme!

Marc-Hendrik


Post a reply to this message

From: Tony[B]
Subject: Re: Cloth simulator v. 0.1.0
Date: 29 Jan 2001 16:42:35
Message: <3a75e3cb@news.povray.org>
Thank you Chris. I have downloaded it, and will soon commence testing. :)


Post a reply to this message

From: Jérôme M  Berger
Subject: Re: Cloth simulator v. 0.1.0
Date: 2 Feb 2001 09:44:00
Message: <3A7AC7A5.70705@iname.com>
Marc-Hendrik Bremer wrote:

 > That is really great!
 >
 > I succeeded in removing the vnoise and hnoise by using step 0.1.
 >
	Yes, lowering the step will improve the stability of the algorithm but it 
will require more steps to compute and therefore will be longer. I hope 
to improve this by moving to the semi-rigid model...

 > Thank you very much, Chris and Jérôme!
 >
	You're welcome

		Jerome
-- 
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] inamecom
* Settle for a good fantasy.    * http://www.enst.fr/~jberger
*********************************


Post a reply to this message

From: Jérôme M  Berger
Subject: Re: Cloth simulator v. 0.1.0
Date: 2 Feb 2001 09:49:34
Message: <3A7AC8FC.1080103@iname.com>
Mark Wagner wrote:

 > The algorithm used is numerically unstable.  Under certain
 > circumstances, points will start heading off towards infinity.
 > isinfinite() attempts to detect this and currently stops
 > calculations with an error.
 >
	Exactly (no point in spending several hours computing something, just to 
discover that the result is full of NaNs and Infs, especially since as 
soon as they start appearing, the computations slow down). However, I'm 
not sure why the algorithm is unstable like that and why it depends on 
the cloth parameters (intuitively, I would have thought that it should 
depend only on step: being stable if step<1 and unstable if step>=1)

 > If you haven't already implemented it, I'd like interaction with
 > spheres (or even better, blobs ;-).
 >
	Spheres shouldn't be too long in coming. Blobs will probably have to wait 
more...

		Jerome
-- 
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] inamecom
* Settle for a good fantasy.    * http://www.enst.fr/~jberger
*********************************


Post a reply to this message

From: Jérôme M  Berger
Subject: Re: Cloth simulator v. 0.1.0
Date: 2 Feb 2001 09:59:50
Message: <3A7ACB61.5010508@iname.com>
Christoph Hormann wrote:

 > When compiling it with cygwin, it only complained about the 'if 
(!isfinite(tmp))'
 >  in vector.cc.  I just commented it out to get it running and it
 > worked nice although with the sample parameters in the docu, it generated
 >  'NaN' values in the output.
 >
 > I doubt these two things are related because the 'if
 > (!isfinite(tmp))' construction would not even finish the
 > calculation.
 >
 > I don't know any C++ so i would appreciate some info about both the
 > 'NaN' output and the isfinite() function
 >
	Look at Mark Wagner's message and my answer.

 > Have you thought about adding it directly to Povray? that would make
 >  it possible to use all Povray object for collision.
 >
	Yes it would, but since cloth computing is pretty slow, it should still 
be independent of scene rendering. Ideally, it would be an independant 
binary linked to the povray object code, but the license of pov doesn't 
allow this and anyway I'm afraid it would be too much of a mess until 
pov is programmed in C++ so I won't do it.

	OTOH, someone has just showed one such patch on the french newsgroup. 
It's not publicly available yet but it shows some promise (except that 
from the description the author gave it seems hellishly difficult to use)

 > Another nice thing would be smooth meshes.
 >
	If you mean in the output, it's already there (actually, there's no way 
to output a non-smooth mesh). If you mean in the input, meshes are 
certainly a possibility (they'll wait until after self-collision though, 
since they'll share a lot of code with it) but I don't see how *smooth* 
meshes would behave?

		Jerome
-- 
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] inamecom
* Settle for a good fantasy.    * http://www.enst.fr/~jberger
*********************************


Post a reply to this message

From: Jérôme M  Berger
Subject: Re: Cloth simulator v. 0.1.0
Date: 2 Feb 2001 10:10:14
Message: <3A7ACDC0.8050107@iname.com>
Christoph Hormann wrote:

> Here it comes:
> 
> http://www.schunter.etc.tu-bs.de/~chris/cloth/index.html
> 
	Thank you Christoph, I've added a link to your page on the simulator's main page.

		Jerome
-- 
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] inamecom
* Settle for a good fantasy.    * http://www.enst.fr/~jberger
*********************************


Post a reply to this message

From: Christoph Hormann
Subject: Re: Cloth simulator v. 0.1.0
Date: 2 Feb 2001 11:15:07
Message: <3A7ADD07.16301974@gmx.de>
"Jérôme M. Berger" wrote:
> 
>         Yes it would, but since cloth computing is pretty slow, it should still
> be independent of scene rendering. Ideally, it would be an independant
> binary linked to the povray object code, but the license of pov doesn't
> allow this and anyway I'm afraid it would be too much of a mess until
> pov is programmed in C++ so I won't do it.
> 

I understand that, although another nice thing about integration into Pov
would be animations.

>  > Another nice thing would be smooth meshes.
>  >
>         If you mean in the output, it's already there (actually, there's no way
> to output a non-smooth mesh). If you mean in the input, meshes are
> certainly a possibility (they'll wait until after self-collision though,
> since they'll share a lot of code with it) but I don't see how *smooth*
> meshes would behave?
> 

Seems i have got this wrong, sorry.

One very nice thing for an object in the cloth simulator would be a
heightfield.  One could generate a depth map of any pov scene from above
and use it in the simulator.  Of course that would have some limitations,
but it would be quite sufficient for many complex scenes.  For example
imagine some sheet covering a table with a lot of different objects on
top.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Jérôme M  Berger
Subject: Re: Cloth simulator v. 0.1.0
Date: 9 Feb 2001 08:28:53
Message: <3A83F095.9060009@iname.com>
Christoph Hormann wrote:

 >
 > Seems i have got this wrong, sorry.
 >
 > One very nice thing for an object in the cloth simulator would be a 
heightfield.
 >   One could generate a depth map of any pov scene from above and
 > use it in the simulator.  Of course that would have some
 > limitations, but it would be quite sufficient for many complex
 > scenes.  For example imagine some sheet covering a table with a lot
 >  of different objects on top.
 >
	That's true, I'll try to add it after the mesh (since internally, an 
height-field is best represented as a mesh anyway)

		Jerome
-- 
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] inamecom
* Settle for a good fantasy.    * http://www.enst.fr/~jberger
*********************************


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.