|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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] wvadelphianet
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] wvadelphianet> 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] wvadelphianet
>
>
>
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] vipbg
TAG e-mail : pet### [at] tagpovrayorg
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] vipbg> 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] wvadelphianet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Mahalis" <don### [at] fakeycom> 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
|
|
| |
| |
|
|
|
|
| |
|
|