|
|
Hi,
I have managed to create a collection of 30 frames for an animation. Each
frame is a union of povray objects and is stored in it's own .inc file. I
would now like to render each frame in povray and merge them all together
into an MPEG/movie file.
The problem is that I would like add frames to the animation (thus smoothing
it out) by somehow creating intermediate frames between my 30 frames - is
there any way Povray can do this interpolation between shapes?
I am basically trying to animate a morphing molecule - all the 30
morphological changes have been calculated and written to the 30 povray
files as unions of triangles etc....., I just need a way of padding out
each pair of frames, say by adding 5 frames in between each pair.
Hope that makes any sense! MANY THANKS!
Post a reply to this message
|
|
|
|
> The problem is that I would like add frames to the animation (thus smoothing
> it out) by somehow creating intermediate frames between my 30 frames - is
> there any way Povray can do this interpolation between shapes?
AFAIK POV-Ray is not able to do that. But you could try two other ways:
1.) Morph the Images: You could do that using an "average"
texture/pigment-map. The result would propably not be like anything
you wanted, but if your objects are rather slow it might be worth trying.
2.) The better way to do it would be not to morph the images, but the
data making them up. Say you got 30 positions of one of your objects
(one position per frame) and you have them as hardcoded data. Then you
can simply put all those positions into a spline and use this spline
to translate your object along. You could do the same with object
sizes, colours, etc.
The advantage of this method is that you can render the final file
with as many frames as you want - and the movement will always be smooth.
HTH,
Florian
--
//=================[web: http://www.torfbold.com]==================\\
#local a=-5;#while(a<5)sphere{<sin(a*pi)*5a*10pow(a,5)*.01>sin(a*a*a*
.1)+1pigment{rgb 9*z}}#local a=a+.01;#end camera{look_at-y*10location
<8,-3,-8>*10}// [www.povray.org] [www.imp.org] [www.irtc.org]
Post a reply to this message
|
|
|
|
By making each frame of your animation as an explicit and separate
scene, you have more or less removed the possibility of changing the
amount of frames in your animation.
Animations are usually made in a more abstract way in POV-Ray than
creating explicit individual scenes for each frame. This is usually
made with one scene file using the 'clock' variable.
For example, suppose that you want to rotate a box 90 degrees around
the y axis during the animation.
Your way would be to create a certain amount (eg. 30) .inc files, each
one of them containing a box rotated by a fixed amount. The problem with
this is, as said, that if you want to change the number of frames you have
a problem.
The more abstract way of doing the same thing in POV-Ray is to
make just *one* scene using the 'clock' variable, for example like this:
camera { whatever }
// other scene settings here
box
{ <-1,-1,-1>, <1,1,1>
pigment { whatever }
rotate <0, 90*clock, 0>
}
Then you can render for example 30 frames from this scene by using
the parameter "+kff30" (either in the options field at the top of
WinPOV or in the command line if you are using a command-line version).
You will get 30 frames with the box rotating 90 degrees.
The great advantage of this is, of course, that if don't want 30
frames but for example 40, you just change the option to "+kff40"
and POV-Ray will now calculate 40 frames instead of 30 (the box
still rotates 90 degrees during those 40 frames).
The level of abstraction provided by the 'clock' variable makes it
easy to change the amount of frames the animation takes to complete.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
|
|
Thanks for the replies!
I am familiar with the Povray clock variable and it's potential - the
problem is that the changes which my objects make from frame-to-frame are
not something that can be calculated in Povray - they are calculated
through molecular modelling software, which spits out 30 sets of atomic
co-ordinates. The transition between frames is not something I can do in
Povray. I was therefore hoping that Povray may be able to take a Povray
representation of my atomic co-ordinates (union of shapes) and interpolate
it with another representation.
The spline idea sounds interesting - the only issue I can see with this is
that each of the 30 frames does not necessarily contain the same number of
shapes - for example, parts will bend, rotate etc... without preserving the
number of objects.
Cheers!
Post a reply to this message
|
|