|
|
On 01/04/2014 10:15, Romain wrote:
> Hello everyone,
>
> I started to use POV-Ray to create some mesh animation. I'd like to make an
> animation like this:
> - During the first 15 frames, make a rotation on Y-axis.
> - During the last 15 frames, make a translation on X-axis.
>
> I did something like this:
>
> mesh {
> .... //My triangles
>
> #if (frame_number < 15)
> rotate < 0, clock*360, 0 >
> #else
> translate < clock*5, 0, 0 >
> #end
> }
>
> The problem with this, is that I don't save the state of the rotation so my
> translation is done on the wrong state.
>
> I tried to declare some variables (in .ini or .pov) but, like I though, their
> values are resetting for each frames.
>
> Can we save the previous transformation applied on one object?
If I understand correctly what you want to do, then you can just add an
additional rotate line into the #else block to do the same rotation as
in frame 14:
#if (frame_number < 15)
rotate < 0, clock*360, 0 >
#else
rotate <0,clockAtFrame14*360,0>
translate < clock*5, 0, 0 >
#end
BTW, is it wise to mix frame_number and clock? I would stick to using
just one or the other, as at some point you might want to change the
frames per second the animation is rendered at. Do you really want the
rotation to last 15 frames regardless of the frame rate, or a fixed
amount of time?
Post a reply to this message
|
|