 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hello all.
I've been working on a gel simulation since I figured out what I wanted to try
to do for the IRTC animation topic (which I won't be able to finish in time...
the simulation took too long :( )
I've got it working pretty good. Here's a sample. I'd run some more but beta 5
won't run the simulation now and 4 won't run at all :(
The next thing I'm going to try is to drop it on the corner and see what
happens.
Does anyone have any idea how I can make it solid? I have an 3 dimensional
array of points that need to be connected. I'd like a 3-d version of triangles,
if that's possible. I haven't come up with anything I like yet. Blobs don't
cut it (I want a smooth surface). I've thought about using intersections of
planes (bounded of course) or sheared boxes, but haven't tried either yet.
Once I'm happy with it, I'll release the code at p.b.s-f, but it may be a while.
Incidentally, total render time for 201 frames at 512x384, no AA was just over 2
hours on my Athlon 700. The number of frames here was cut to 139, which
VideoMach expanded to get the timing matched with MPEG. I also reduced the
resolution in VideoMach. Oh, and the filename means that gravity was set to 1,
the "spring constant" was set to 8, and cylinders were used to render it. Just
so I can keep track of the different versions (all previous ones had K too low
and blew up)
Comments? Questions? Flames?
Michael
--
#declare R=<8,4,.6>/3;#declare C=function{pattern{object{text{ttf"crystal.ttf"
"MDJ"1,0translate-R/4}}}}camera{location-z*30}box{-R,R pigment{rgbf 1}interior
{media{emission.1density{function{C(x,y,z)}density_map{[0mandel 50color_map{[0
rgb 0][.2rgb x][1rgb x+y]}interior 1,1.5scale 60translate<-33.75,2.85>exponent
4][1rgb<2,2>]}}}}scale 24hollow}// (c) 2001 MDJohnson red### [at] wv adelphia net
Post a reply to this message
Attachments:
Download 'Gel G1 K8 cyl.mpg' (614 KB)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Neat! I like how the shock waves travel up and down the object.
"Redbeard (MDJohnson)" <red### [at] wv adelphia net> wrote in message
news:3bc147ed@news.povray.org...
> Hello all.
>
> I've been working on a gel simulation since I figured out what I wanted to
try
> to do for the IRTC animation topic (which I won't be able to finish in
time...
> the simulation took too long :( )
>
> I've got it working pretty good. Here's a sample. I'd run some more but
beta 5
> won't run the simulation now and 4 won't run at all :(
>
> The next thing I'm going to try is to drop it on the corner and see what
> happens.
>
> Does anyone have any idea how I can make it solid? I have an 3
dimensional
> array of points that need to be connected. I'd like a 3-d version of
triangles,
> if that's possible. I haven't come up with anything I like yet. Blobs
don't
> cut it (I want a smooth surface). I've thought about using intersections
of
> planes (bounded of course) or sheared boxes, but haven't tried either yet.
>
> Once I'm happy with it, I'll release the code at p.b.s-f, but it may be a
while.
>
> Incidentally, total render time for 201 frames at 512x384, no AA was just
over 2
> hours on my Athlon 700. The number of frames here was cut to 139, which
> VideoMach expanded to get the timing matched with MPEG. I also reduced
the
> resolution in VideoMach. Oh, and the filename means that gravity was set
to 1,
> the "spring constant" was set to 8, and cylinders were used to render it.
Just
> so I can keep track of the different versions (all previous ones had K too
low
> and blew up)
>
> Comments? Questions? Flames?
>
> Michael
> --
> #declare R=<8,4,.6>/3;#declare
C=function{pattern{object{text{ttf"crystal.ttf"
> "MDJ"1,0translate-R/4}}}}camera{location-z*30}box{-R,R pigment{rgbf
1}interior
> {media{emission.1density{function{C(x,y,z)}density_map{[0mandel
50color_map{[0
> rgb 0][.2rgb x][1rgb x+y]}interior 1,1.5scale
60translate<-33.75,2.85>exponent
> 4][1rgb<2,2>]}}}}scale 24hollow}// (c) 2001 MDJohnson
red### [at] wv adelphia net
>
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Cool. Will be interested in the algo. When I've tried things like this, I have the
hardest time with what to do when the object slows to a stop-- it always fell
through my surface....
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Michael,
a few weeks ago I defended my BEng final project on elastic deformable
body dynamics. I am waiting for the 3.5 stable release to start
working on patching what I've done into POV. Drop me a line if you
need some geeky info.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Greg M. Johnson" <"gregj56590[:-0]"@aol.com> wrote in message
news:3BC1CC2C.BDA9C228@aol.com...
> Cool. Will be interested in the algo. When I've tried things like this, I
have the
> hardest time with what to do when the object slows to a stop-- it always fell
> through my surface....
>
I've been using Hugo Elias' page (http://freespace.virgin.net/hugo.elias/) as a
reference for my simulations. He's got some pretty good info, and if you like
to explore he doesn't give you *too* much.
Basically, this is a 3-D cloth. Each element is connected to it's 26 nearest
neighbors (or less if at the edges) with a spring and you figure out how far to
move each element based on how far the spring is stretched.
As for falling through the surface - I'm cheating right now. If the
y-coordinate is less than 0 + radius of element, it's forced to that value.
When I start adding the ability to bounce off of surfaces I'll have to start
using trace and being *very* careful. Otherwise it *would* be possible to fall
through the surface. In this case, the surface is a plane, and if the gel is
falling too fast (or an element is) it might pass right through the plane and
miss the trace check. I imagine that's the problem a lot of the particle/water
simulations have.
When I get it done, you'll be able to specify the gel size on creation,
springiness, particle mass (for each point :-) as well as extra forces, etc.
Right now the mechanism is a little flaky, but it's not file dependent or clock
step dependent. However, to speed up renders it can use a file between frames
(and it still doesn't affect the animation... clock 0.5 yields the same results
either way - in theory)
Now I'm probably rambling because I'm so happy with this thing... so I'll get on
and reply to some others :-) And I hope the stack fault bug gets fixed quick
:-)
Michael
--
#macro M(D)#local J=strlen(D);#local _=""#while(J>0)#local _=concat(_,substr(D
,J,1))#local J=J-1;#end _#end sphere{z*9,5pigment{rgb x}}#macro N(D,J)text{ttf
"timrom.ttf"M(D)1,0 translate-J}#end#macro O(E,K)#local _=N(E,K)light_source{-
z*9rgb 1projected_through{_}}#end O("leahciM"<1.6,-.3.9>)O("nosnhoJ"<1.6.9.9>)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Peter Popov" <pet### [at] vip bg> wrote in message
news:nl34stcs8gm8pve5cb98o9vg5kuifhi5mc@4ax.com...
> Michael,
>
> a few weeks ago I defended my BEng final project on elastic deformable
> body dynamics. I am waiting for the 3.5 stable release to start
> working on patching what I've done into POV. Drop me a line if you
> need some geeky info.
>
>
Cool. Thanks for the offer. I think the framework I've got now is pretty close
to done. I just need to add info to keep track of orientation and make sure the
algorithm works with whatever I give it.
I'm personally not a fan of using patched POV for highly specialized stuff (like
gels) because I think macros are more flexible, but it is much faster once it's
done. Maybe the ClothRay and yours could be combined? Of course, strings would
have to be added in too. (simple - 1D cloths :-) That would be great. But,
then would POV-Ray be a ray-tracer or a simulation engine?
Again, thanks for the offer. I might take you up on that.
Michael
--
#macro M(D,J)text{ttf"cyrvetic.ttf"D 1,0translate-J}#end#macro N(E,K)#local A=
M(E,K)light_source{-z*30rgb 1projected_through{A}}#end N("Michael"<1.6,-.2,5>)
N("Johnson"<1.9.8,5>)sphere{z*9,4pigment{gradient x+y scale 10color_map{[0 rgb
x][1rgb x+y]}sine_wave}} // (c)2001 Michael D Johnson red### [at] wv adelphia net
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Mahalis" <don### [at] fakey com> wrote in message
news:3bc1807d$1@news.povray.org...
> Neat! I like how the shock waves travel up and down the object.
>
Thanks! Once the simulation was done right, it did that all by itself! I was
heartily impressed. I always find it amazing that once I get done with all the
math stuff, the thing actually looks real.
Michael
--
camera{location<8,20>look_at<6,0,4>}light_source{<8,8>rgb 1}difference{union{
#macro M(D,J)#local R=asc(substr(D,J,1))-32;<div(R,10)*2,mod(R,10)>#end#macro
E(D,B,R)prism{-D,4+D,R#local C=1;#while(C<R+1)M(B,C)#local C=C+1;#end}#end E(
0," (2:FPKAD80* U_dZU"18)sphere{2,2}#macro T(N)cylinder{<9,-N,3><9,4+N,3>3-N}
#end T(0)}T(2)E(1"45LNXUK4"8)pigment{rgb x+y/2}}//(c)2001 MDJohnson(Redbeard)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Redbeard (MDJohnson)" wrote:
> Otherwise it *would* be possible to fall
> through the surface. In this case, the surface is a plane, and if the gel is
> falling too fast (or an element is) it might pass right through the plane and
> miss the trace check.
Yeah, it was say 1E-06 pov units from the floor and plummetting at the floor at a
breathtaking 1E-04 units/frame. It seems silly, but I guess that was what was
happening, so I just shelved the whole idea. My project was actually perfect
rolling/bouncing balls on a golf course...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I'm personally not a fan of using patched POV for highly specialized stuff
(like
> gels) because I think macros are more flexible, but it is much faster once
it's
> done. Maybe the ClothRay and yours could be combined? Of course, strings
would
> have to be added in too. (simple - 1D cloths :-) That would be great.
But,
> then would POV-Ray be a ray-tracer or a simulation engine?
Isn't ratracing simulation of light?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
ARTis wrote:
> Isn't ratracing simulation of light?
No. Ratracing is where you take two of more rats and have them compete
in a race. Betting is usually involved. :)
--
Ken Tyler
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> > Isn't ratracing simulation of light?
>
> No. Ratracing is where you take two of more rats and have them compete
> in a race. Betting is usually involved. :)
And what is rayacing? (:
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
ARTis wrote:
>
> > > Isn't ratracing simulation of light?
> >
> > No. Ratracing is where you take two of more rats and have them compete
> > in a race. Betting is usually involved. :)
>
> And what is rayacing? (:
Raytracing is essentially shooting imaginary rays of light out into space.
When one of those imaginary rays of light intersects something a pixel color
is returned to the screen depending upon the shape, color, and surface
properties described for that object. One could call it the simulation
of light but it does not truly model the physical properties of light as
one would expect from a scientific light modelling program. Raytracing
deals more with object properties than it does light properties.
Certainly there is an overlap that occurs to accomplish this but I
don't think calling Raytracing a "simulation of light" an accurate all
encompassing statement.
--
Ken Tyler
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Rayacing is when a guy named Ray gets A++ in every class.
"ARTis" <art### [at] aaa apollo lv> wrote in message
news:3bc2f823@news.povray.org...
>
> > > Isn't ratracing simulation of light?
> >
> > No. Ratracing is where you take two of more rats and have them compete
> > in a race. Betting is usually involved. :)
>
> And what is rayacing? (:
>
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Mon, 8 Oct 2001 19:28:36 -0400, "Redbeard \(MDJohnson\)"
<red### [at] wv adelphia net> wrote:
>I've been using Hugo Elias' page (http://freespace.virgin.net/hugo.elias/) as a
>reference for my simulations. He's got some pretty good info, and if you like
>to explore he doesn't give you *too* much.
Keep in mind that what is shown on Hugo's page is *the* most
simplistic way of doing deformable body dynamics simulation. Linear
mass-spring models are in general simpler than, say, finite element
models, but the former can be made very realistic with introducing
different improvements.
As a start, I'd recommend reading anything you can find on the
subject, esp. the works of Demetri Terzopoulos, David Baraff, Andrew
Wittkin, James O'Brien and Chen Wu.
>As for falling through the surface - I'm cheating right now. If the
>y-coordinate is less than 0 + radius of element, it's forced to that value.
>When I start adding the ability to bounce off of surfaces I'll have to start
>using trace and being *very* careful.
Keep in mind that contact forces are *very* hard to model
realistically. Collisions are even harder, as impulse propagation in
this case is almost a stepwise process. In addition, inertia has to be
taken into account.
The geeky lingo above is to say that you can't just place some nodes
on the surface they will collide with and expect realistic results.
Maybe I'm just jealous (gelous?). Again someone beat me to it :)
Keep up the good work!
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Peter Popov" <pet### [at] vip bg> wrote in message
news:jsfastgausb9ouu35jhbp7a5shefje1oi9@4ax.com...
> On Mon, 8 Oct 2001 19:28:36 -0400, "Redbeard \(MDJohnson\)"
> <red### [at] wv adelphia net> wrote:
>
> >I've been using Hugo Elias' page (http://freespace.virgin.net/hugo.elias/) as
a
> >reference for my simulations. He's got some pretty good info, and if you
like
> >to explore he doesn't give you *too* much.
>
> Keep in mind that what is shown on Hugo's page is *the* most
> simplistic way of doing deformable body dynamics simulation. Linear
> mass-spring models are in general simpler than, say, finite element
> models, but the former can be made very realistic with introducing
> different improvements.
>
I do realize that (I was an engineering major and was exposed to some FEM) but
I'm not really looking for *super* realistic right now. In fact, the animation
I was working for IRTC (which I still hope to finish, though not in time for the
contest) is going to use the gel to do a *very* unrealistic construction of a
bridge :-)
> As a start, I'd recommend reading anything you can find on the
> subject, esp. the works of Demetri Terzopoulos, David Baraff, Andrew
> Wittkin, James O'Brien and Chen Wu.
Thanks. I'll check into them.
> >As for falling through the surface - I'm cheating right now. If the
> >y-coordinate is less than 0 + radius of element, it's forced to that value.
> >When I start adding the ability to bounce off of surfaces I'll have to start
> >using trace and being *very* careful.
>
> Keep in mind that contact forces are *very* hard to model
> realistically. Collisions are even harder, as impulse propagation in
> this case is almost a stepwise process. In addition, inertia has to be
> taken into account.
Again, I'm not looking for full realism, just something that looks good in an
animation. I will probably have to cheat at most steps by introducing abitrary
forces. The sotrage format I'm using takes that into account.
> The geeky lingo above is to say that you can't just place some nodes
> on the surface they will collide with and expect realistic results.
Yep.
> Maybe I'm just jealous (gelous?). Again someone beat me to it :)
>
> Keep up the good work!
Thanks! In fact, while I was away I figured out something that is wrong with my
model. I hope to fix it over the weekend (now that beta 6 is out - thanks
Chris)
Michael
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |