POV-Ray : Newsgroups : povray.newusers : Animation Server Time
5 Nov 2024 01:25:55 EST (-0500)
  Animation (Message 1 to 8 of 8)  
From: Renato Oliveira
Subject: Animation
Date: 4 Aug 2001 20:12:23
Message: <3b6c8f67@news.povray.org>
What is the simplest way to set POV-Ray to render the frames of the
animation and how to use the keyword clock?
I read the documentation but I just can't get right.


Post a reply to this message

From: Bob H 
Subject: Re: Animation
Date: 4 Aug 2001 21:20:48
Message: <3b6c9f70@news.povray.org>
"Renato Oliveira" <war### [at] bolcombr> wrote in message
news:3b6c8f67@news.povray.org...
> What is the simplest way to set POV-Ray to render the frames of the
> animation and how to use the keyword clock?
> I read the documentation but I just can't get right.

The very simplest form would go something like this (for Windows platform).

Your pov scene file contains the following, for example:

light_source {<10,10,-10>,1}

camera {location -5*z look_at 0}

box {-1,1 pigment {rgb 1} rotate clock*360}

That sort of tumbles the box primitive in all 3 axes, or you could choose
one as in clock*360*y.  The 360 is degrees and for a full rotation.  The
basic idea is clock will run from one number to the next interpolating
inbetween depending on what values you gave for them.   But wait!  To get it
going you still must do the next step.

Press the Ini button on the toolbar and type +ki0.0 +kf1.0 +kfi1 +kff10 into
the Command field then render.  Then press Render.  The animation frames (#1
thru #10) will output to your default folder (directory) having clock going
from 0 to 1.

Alternatively, and the best thing to do IMHO, use a ini file to set up the
whole thing with all the parameters you might need.  You can create one in
POV's editor and save as animate.ini into the \POV-Ray\renderer\ folder,
opening it for use with a scene file later via that Ini button.
The ini syntax is Initial_Clock=0.0 Final_Clock=1.0 Initial_Frame=1
Final_Frame=10 (each on their own line).  Once you learn more about it you
can add/change things, just read about it in the Output Options|Animation
section of the Scene help doc.

Bob H.


Post a reply to this message

From: Renato Oliveira
Subject: Re: Animation
Date: 4 Aug 2001 22:01:26
Message: <3b6ca8f6@news.povray.org>
Bob H. <omn### [at] msncom>
> The ini syntax is Initial_Clock=0.0 Final_Clock=1.0 Initial_Frame=1
> Final_Frame=10 (each on their own line).

I think I got now, but just one more question: the "Initial_frame" and
"Final_frame" that defines how long the animation will last?


Post a reply to this message

From: Kari Kivisalo
Subject: Re: Animation
Date: 4 Aug 2001 22:10:48
Message: <3B6CABCD.15905B0B@pp.htv.fi>
Renato Oliveira wrote:
>
> I think I got now, but just one more question: the "Initial_frame" and
> "Final_frame" that defines how long the animation will last?

You will get Final_frame-Initial_frame+1 frames. If those are shown
at 30 fps the animation lasts frame_count/30 seconds.


_____________
Kari Kivisalo


Post a reply to this message

From: Renato Oliveira
Subject: Re: Animation
Date: 5 Aug 2001 00:08:15
Message: <3b6cc6af@news.povray.org>
Bob H. <omn### [at] msncom>
> That sort of tumbles the box primitive in all 3 axes, or you could choose
> one as in clock*360*y.  The 360 is degrees and for a full rotation.

And if I want to make the cube starts rotating only in the frame 3, for
example what should I do?


Post a reply to this message

From: Bob H 
Subject: Re: Animation
Date: 5 Aug 2001 03:30:09
Message: <3b6cf601@news.povray.org>
"Renato Oliveira" <war### [at] bolcombr> wrote in message
news:3b6cc6af@news.povray.org...
>
> Bob H. <omn### [at] msncom>
> > That sort of tumbles the box primitive in all 3 axes, or you could
choose
> > one as in clock*360*y.  The 360 is degrees and for a full rotation.
>
> And if I want to make the cube starts rotating only in the frame 3, for
> example what should I do?

Definitely go get the Clock Modifier Macro (or the Include), it will allow
you to set up exactly such a thing by declaring a clock start and finish.
Not sure if there's a direct way to enter it by frame number using the macro
since I seldom use it but it's easy to do the math to get a clock value for
a frame, ie. Clock=FrameThree/TotalFrameCount

See  http://www.geocities.com/ccolefax/

Bob H.


Post a reply to this message

From: Steve
Subject: Re: Animation
Date: 5 Aug 2001 08:47:58
Message: <slrn9mqfs9.nt0.steve@zero-pps.localdomain>
On Sun, 5 Aug 2001 02:32:10 -0500, Bob H. wrote:
>"Renato Oliveira" <war### [at] bolcombr> wrote in message
>news:3b6cc6af@news.povray.org...
>>
>> Bob H. <omn### [at] msncom>
>> > That sort of tumbles the box primitive in all 3 axes, or you could
>choose
>> > one as in clock*360*y.  The 360 is degrees and for a full rotation.
>>
>> And if I want to make the cube starts rotating only in the frame 3, for
>> example what should I do?

>Clock=FrameThree/TotalFrameCount

Say I want something to start moving half way through the animation, 
I tend to do something like:

object{
       Strobe
       #if(clock>0.5)        
          rotate y*clock*135
          rotate x*clock*270
        #end
        }

And here's how I animated the Strobe that's on my gallery page,
I havn't uploaded the animation as I havn't got round to converting it
to mpeg yet. 

object{
       Strobe
       #if(clock<=0.333)        
          rotate y*clock*135
          rotate x*clock*270
        #end
          
        #if(clock>0.333 & clock<=0.666)        
           rotate y*clock*135
           rotate x*90
           rotate y*(clock-0.333)*270
        #end
           
        #if(clock>0.666)        
           rotate y*clock*135
           rotate x*90
           rotate y*90
           rotate z*(clock-0.666)*270
        #end

        translate<0,5,10>       
        photons{
                target 0.75
                refraction off
                reflection on
               }            
      }         
 
I wrote this a few years ago so the photon code is probably out of
date.  Hope some of that is useful. 

--
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  1:30pm  up 22 days, 15:33,  2 users,  load average: 1.03, 1.02, 1.00


Post a reply to this message

From: Warp
Subject: Re: Animation
Date: 5 Aug 2001 20:05:22
Message: <3b6ddf42@news.povray.org>
Steve <ste### [at] zeroppsuklinuxnet> wrote:
:        #if(clock>0.5)        
:           rotate y*clock*135
:           rotate x*clock*270
:         #end

  Note that when you do this to "start something at a certain clock value",
you might want to use a "subclock" value which itself goes from 0 to 1
inside the subrange although the main clock value has other values.
  In this example the clock will "start" from 0.5 inside the block, which
is often not handy. You can do something like this:

  #if(clock>0.5)
    #local subclock = (clock-.5)*2;
    ...
  #end

  Of course using some of the clock macros out there would be easier. See
for example:
http://www.geocities.com/ccolefax/clockmod.html

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

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