POV-Ray : Newsgroups : moray.win : Animation Plugin - Frames out of sync Server Time
1 Jun 2024 12:37:04 EDT (-0400)
  Animation Plugin - Frames out of sync (Message 1 to 3 of 3)  
From: Peter Duthie
Subject: Animation Plugin - Frames out of sync
Date: 1 Nov 2003 05:52:25
Message: <3fa39069@news.povray.org>
Hello,

I'm trying to figure out the Moray animation plugin and I've run up 
against a few problems and was wondering if anyone had seen this before 
and knows what's going on.

My problem is that when I create an animation with "X" (where X can be 
any value) frames and set the FPS to "X" then render the animation, less 
than "X" frames are actually produced, and the translations are 
interpolated across those frames instead of the original values.  The 
funny thing is, when I do individual renders of frames by selecting the 
desired frame in the keyframer then doing Render->render, the frame is 
rendered correctly with the expected translation values.  The above 
doesn't really make sense, so here's an example of what I'm talking about.

1) I create a new scene with a single cube in it and assign it a solid 
color.
2) In render->options I set the FPS to 24 via the drop down box, then 
the start frame to 0 and the end frame to 23.  I set the output format 
to PNG (not that this makes a difference).
3) In the keyframer I set a linear translation from <0,0,0> at frame 0 
to <23,0,0> at frame 23, and a linear rotation from <0,0,0> at frame 0 
to <23,0,0> at frame 23.
4) Sliding the keyframer back and forth shows all interpolated values to 
be correct between them, eg at frame 15 I have <15,0,0>, <15,0,0> for 
translation and rotation.  If I manually render frame 15, the correct 
POV code is generated for this.
5) I save the scene and do render->animation.
6) Looking at the files produced, I only get 20 of them.
7) Looking at the code generated, the first frame has the correct 
coordinates/rotation of <0,0,0>,<0,0,0>.  But the second one has 
<1.2,0,0>,<1.2,0,0> through to the last one which has 
<22.8,0,0>,<22.7999999,0,0>.

What I want to do is produce an animation of one second, with 24 frames 
moving linearly from A to B.  Not an animation of 20 frames moving from 
A to B via interpolated points.

What am I doing wrong?


Incidentally, is there any way within the generated POV code to know 
which frame you're at?  For example if I wanted to use the insertcode 
plugin to "#include" a different file for each different frame, is there 
a way for me to know what frame I'm at within the code?

Thanks,

-peter


Post a reply to this message

From: Arne Kleinophorst
Subject: Re: Animation Plugin - Frames out of sync
Date: 3 Nov 2003 15:55:35
Message: <3fa6c0c7$1@news.povray.org>
Peter Duthie schrieb:

> Hello,
 > problem with Sync...

You are doing nothing wrong, i think this is a problem within the 
anim-plugin. However the source of it is not (yet) released, so no 
bug-fixing :)



> 
> 
> Incidentally, is there any way within the generated POV code to know 
> which frame you're at?  For example if I wanted to use the insertcode 
> plugin to "#include" a different file for each different frame, is there 
> a way for me to know what frame I'm at within the code?

here's an excerpt from povray-help:

frame_number
If you rather want to define the action in POV-Ray animated scenes 
depending upon the integer frame numbers, this identifier can be used.
It reads the number of the frame currently being rendered.

   #if(frame_number=1)
     //stuff for first image or frame
   #end
   #if(frame_number=2)
     //stuff for second image or frame
   #end
   #if(frame_number=n)
     //stuff for n th image or frame
   #end




> 
> Thanks,
> 
> -peter
> 

hope this helps,

Arne


Post a reply to this message

From: Peter Duthie
Subject: Re: Animation Plugin - Frames out of sync
Date: 3 Nov 2003 16:46:19
Message: <3fa6ccab$1@news.povray.org>
Ahh ok, thanks for the info.   I did find a work around to the frames 
problem.  I found that if instead of selecting 24 FPS, if I select 
"Custom frame rate" and then manually set 24 FPS in the input box, it 
works the way it is supposed to, generating the correct number of frames 
with the correct values for the interpolated fields.

Thanks again,

-peter

Arne Kleinophorst wrote:
> 
> 
> Peter Duthie schrieb:
> 
>> Hello,
> 
>  > problem with Sync...
> 
> You are doing nothing wrong, i think this is a problem within the 
> anim-plugin. However the source of it is not (yet) released, so no 
> bug-fixing :)
> 
> 
> 
>>
>>
>> Incidentally, is there any way within the generated POV code to know 
>> which frame you're at?  For example if I wanted to use the insertcode 
>> plugin to "#include" a different file for each different frame, is 
>> there a way for me to know what frame I'm at within the code?
> 
> 
> here's an excerpt from povray-help:
> 
> frame_number
> If you rather want to define the action in POV-Ray animated scenes 
> depending upon the integer frame numbers, this identifier can be used.
> It reads the number of the frame currently being rendered.
> 
>   #if(frame_number=1)
>     //stuff for first image or frame
>   #end
>   #if(frame_number=2)
>     //stuff for second image or frame
>   #end
>   #if(frame_number=n)
>     //stuff for n th image or frame
>   #end
> 
> 
> 
> 
>>
>> Thanks,
>>
>> -peter
>>
> 
> hope this helps,
> 
> Arne
>


Post a reply to this message

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