POV-Ray : Newsgroups : moray.win : Animation question Server Time
28 Mar 2024 12:44:21 EDT (-0400)
  Animation question (Message 1 to 6 of 6)  
From: dj
Subject: Animation question
Date: 5 Apr 2005 09:30:00
Message: <web.42529207d94d7e8f63b34e470@news.povray.org>
I have a quick (hopefully) question about animation. I'm trying to animate a
flying aircraft.  I need to animate some strobe lights flashing and a
propeller spinning.  Is there a way to animate small segments and have them
repeat?  I'd rather not have to manually animate the strobe light flashing
through the entire sequence.

Thanks,
Dave


Post a reply to this message

From: Stefan Persson
Subject: Re: Animation question
Date: 10 Apr 2005 21:43:20
Message: <4259d638$1@news.povray.org>
Hi Dave,
And so you shouldn't.. ;)

For the propeller I would use some sort of semi-transparent texture
to fake the motion blur of the spinning.
For the strobe, I can think of a solution..

        A counter that holds the duration of the on/off sequense
        + a boolean variable.
        Let's say you want the light to be on for half a second
        (that's something like 12 frames.. 24 fps/2). Then the
        counter increments itself 12 times. When it reaches
        12 or 11, depending on if you start on 0 or 1, it switches
        the boolean.
        The light checks every cycle if the boolean is true or
        false. If it's true, it's on.. and the opposite of course.

Try it. I hold no responsibility if it does any harm to
animals or your computer.. ;)

Stefan

"dj" <djh### [at] msncom> skrev i meddelandet
news:web.42529207d94d7e8f63b34e470@news.povray.org...
> I have a quick (hopefully) question about animation. I'm trying to animate
a
> flying aircraft.  I need to animate some strobe lights flashing and a
> propeller spinning.  Is there a way to animate small segments and have
them
> repeat?  I'd rather not have to manually animate the strobe light flashing
> through the entire sequence.
>
> Thanks,
> Dave
>
>


Post a reply to this message

From: Stefan Persson
Subject: Re: Animation question
Date: 10 Apr 2005 21:57:11
Message: <4259d977$1@news.povray.org>
To expand my theory..

#declare c=0;  ;Declare the counter
#declare OnOff = 0; ;Declare the boolean variable

code code..

#if(c<=11) ;Check if we reached the end of the light cycle. If we are still
within 0-11 then do nothing except..
    c=c+1; ;..increment the counter
#else ;We have reached the end of the light cycle
    #if(OnOff=0) ;Check if the light was on or off
        OnOff=1;
    #else
        OnOff=0;
    #end
    c=0; ;IMPORTANTE!! Reset the counter so that we reset the cycle..
#end

code code..

#lightsomething..
    #if(OnOff=1) ;If 1 then the light is on.. if not.. just do nothing..
            light_source {   // Strobe light
          <0.0, 0.0, 0.0>
          color rgb <1.000, 1.000, 1.000>
          translate  <0.985, -9.983, 15.82>
           }
    #end
#end

Code.. code..

Or something like that..

Stefan

"Stefan Persson" <azy### [at] teliacom> skrev i meddelandet
news:4259d638$1@news.povray.org...
> Hi Dave,
> And so you shouldn't.. ;)
>
> For the propeller I would use some sort of semi-transparent texture
> to fake the motion blur of the spinning.
> For the strobe, I can think of a solution..
>
>         A counter that holds the duration of the on/off sequense
>         + a boolean variable.
>         Let's say you want the light to be on for half a second
>         (that's something like 12 frames.. 24 fps/2). Then the
>         counter increments itself 12 times. When it reaches
>         12 or 11, depending on if you start on 0 or 1, it switches
>         the boolean.
>         The light checks every cycle if the boolean is true or
>         false. If it's true, it's on.. and the opposite of course.
>
> Try it. I hold no responsibility if it does any harm to
> animals or your computer.. ;)
>
> Stefan
>
> "dj" <djh### [at] msncom> skrev i meddelandet
> news:web.42529207d94d7e8f63b34e470@news.povray.org...
> > I have a quick (hopefully) question about animation. I'm trying to
animate
> a
> > flying aircraft.  I need to animate some strobe lights flashing and a
> > propeller spinning.  Is there a way to animate small segments and have
> them
> > repeat?  I'd rather not have to manually animate the strobe light
flashing
> > through the entire sequence.
> >
> > Thanks,
> > Dave
> >
> >
>
>


Post a reply to this message

From: Stefan Persson
Subject: Re: Animation question
Date: 10 Apr 2005 22:04:05
Message: <4259db15@news.povray.org>
..and I'm so sorry.. I missed a couple of  #declare
If you are not familiar with the POV SDL, the creation
and changing of a variable always begin with #declare.
So.. for instance c=c+1; should be #declare c=c+1;

I guess I was thinking C..

Again, sorry..

Stefan

"Stefan Persson" <azy### [at] teliacom> skrev i meddelandet
news:4259d977$1@news.povray.org...
> To expand my theory..
>
> #declare c=0;  ;Declare the counter
> #declare OnOff = 0; ;Declare the boolean variable
>
> code code..
>
> #if(c<=11) ;Check if we reached the end of the light cycle. If we are
still
> within 0-11 then do nothing except..
>     c=c+1; ;..increment the counter
> #else ;We have reached the end of the light cycle
>     #if(OnOff=0) ;Check if the light was on or off
>         OnOff=1;
>     #else
>         OnOff=0;
>     #end
>     c=0; ;IMPORTANTE!! Reset the counter so that we reset the cycle..
> #end
>
> code code..
>
> #lightsomething..
>     #if(OnOff=1) ;If 1 then the light is on.. if not.. just do nothing..
>             light_source {   // Strobe light
>           <0.0, 0.0, 0.0>
>           color rgb <1.000, 1.000, 1.000>
>           translate  <0.985, -9.983, 15.82>
>            }
>     #end
> #end
>
> Code.. code..
>
> Or something like that..
>
> Stefan
>
> "Stefan Persson" <azy### [at] teliacom> skrev i meddelandet
> news:4259d638$1@news.povray.org...
> > Hi Dave,
> > And so you shouldn't.. ;)
> >
> > For the propeller I would use some sort of semi-transparent texture
> > to fake the motion blur of the spinning.
> > For the strobe, I can think of a solution..
> >
> >         A counter that holds the duration of the on/off sequense
> >         + a boolean variable.
> >         Let's say you want the light to be on for half a second
> >         (that's something like 12 frames.. 24 fps/2). Then the
> >         counter increments itself 12 times. When it reaches
> >         12 or 11, depending on if you start on 0 or 1, it switches
> >         the boolean.
> >         The light checks every cycle if the boolean is true or
> >         false. If it's true, it's on.. and the opposite of course.
> >
> > Try it. I hold no responsibility if it does any harm to
> > animals or your computer.. ;)
> >
> > Stefan
> >
> > "dj" <djh### [at] msncom> skrev i meddelandet
> > news:web.42529207d94d7e8f63b34e470@news.povray.org...
> > > I have a quick (hopefully) question about animation. I'm trying to
> animate
> > a
> > > flying aircraft.  I need to animate some strobe lights flashing and a
> > > propeller spinning.  Is there a way to animate small segments and have
> > them
> > > repeat?  I'd rather not have to manually animate the strobe light
> flashing
> > > through the entire sequence.
> > >
> > > Thanks,
> > > Dave
> > >
> > >
> >
> >
>
>


Post a reply to this message

From: dj
Subject: Re: Animation question
Date: 11 Apr 2005 09:35:00
Message: <web.425a7cb93e37622c63b34e470@news.povray.org>
Stefan,

Thanks for the feedback.  I'm using the Animation and Rendering Plugin in
Moray (my fault, if I wasn't clear on that point) and was wondering if
there was away to do it from within Moray. I can embed Povray code-snippets
to 'stobe' the light on and off in the Moray file but I don't know if there
is a way in Moray to pass Povray the current frame info.  I've been coding
for years so that's not the problem. Just figuring to figure out the
mechanics of it all.

Thanks,
Dave...

"Stefan Persson" <azy### [at] teliacom> wrote:
> ..and I'm so sorry.. I missed a couple of  #declare
> If you are not familiar with the POV SDL, the creation
> and changing of a variable always begin with #declare.
> So.. for instance c=c+1; should be #declare c=c+1;
>
> I guess I was thinking C..
>
> Again, sorry..
>
> Stefan
>
> "Stefan Persson" <azy### [at] teliacom> skrev i meddelandet
> news:4259d977$1@news.povray.org...
> > To expand my theory..
> >
> > #declare c=0;  ;Declare the counter
> > #declare OnOff = 0; ;Declare the boolean variable
> >
> > code code..
> >
> > #if(c<=11) ;Check if we reached the end of the light cycle. If we are
> still
> > within 0-11 then do nothing except..
> >     c=c+1; ;..increment the counter
> > #else ;We have reached the end of the light cycle
> >     #if(OnOff=0) ;Check if the light was on or off
> >         OnOff=1;
> >     #else
> >         OnOff=0;
> >     #end
> >     c=0; ;IMPORTANTE!! Reset the counter so that we reset the cycle..
> > #end
> >
> > code code..
> >
> > #lightsomething..
> >     #if(OnOff=1) ;If 1 then the light is on.. if not.. just do nothing..
> >             light_source {   // Strobe light
> >           <0.0, 0.0, 0.0>
> >           color rgb <1.000, 1.000, 1.000>
> >           translate  <0.985, -9.983, 15.82>
> >            }
> >     #end
> > #end
> >
> > Code.. code..
> >
> > Or something like that..
> >
> > Stefan
> >
> > "Stefan Persson" <azy### [at] teliacom> skrev i meddelandet
> > news:4259d638$1@news.povray.org...
> > > Hi Dave,
> > > And so you shouldn't.. ;)
> > >
> > > For the propeller I would use some sort of semi-transparent texture
> > > to fake the motion blur of the spinning.
> > > For the strobe, I can think of a solution..
> > >
> > >         A counter that holds the duration of the on/off sequense
> > >         + a boolean variable.
> > >         Let's say you want the light to be on for half a second
> > >         (that's something like 12 frames.. 24 fps/2). Then the
> > >         counter increments itself 12 times. When it reaches
> > >         12 or 11, depending on if you start on 0 or 1, it switches
> > >         the boolean.
> > >         The light checks every cycle if the boolean is true or
> > >         false. If it's true, it's on.. and the opposite of course.
> > >
> > > Try it. I hold no responsibility if it does any harm to
> > > animals or your computer.. ;)
> > >
> > > Stefan
> > >
> > > "dj" <djh### [at] msncom> skrev i meddelandet
> > > news:web.42529207d94d7e8f63b34e470@news.povray.org...
> > > > I have a quick (hopefully) question about animation. I'm trying to
> > animate
> > > a
> > > > flying aircraft.  I need to animate some strobe lights flashing and a
> > > > propeller spinning.  Is there a way to animate small segments and have
> > > them
> > > > repeat?  I'd rather not have to manually animate the strobe light
> > flashing
> > > > through the entire sequence.
> > > >
> > > > Thanks,
> > > > Dave
> > > >
> > > >
> > >
> > >
> >
> >


Post a reply to this message

From: Stefan Persson
Subject: Re: Animation question
Date: 11 Apr 2005 18:56:40
Message: <425b00a8$1@news.povray.org>
Well, in that case.. hehe

Why not use real life physics?
Like the roof lights on a police car. They
turn a deflector.. right? Perhaps some system
with a opaque deflector that hides the light..

Just a thought.. :)

Stefan

"dj" <djh### [at] msncom> skrev i meddelandet
news:web.425a7cb93e37622c63b34e470@news.povray.org...
> Stefan,
>
> Thanks for the feedback.  I'm using the Animation and Rendering Plugin in
> Moray (my fault, if I wasn't clear on that point) and was wondering if
> there was away to do it from within Moray. I can embed Povray
code-snippets
> to 'stobe' the light on and off in the Moray file but I don't know if
there
> is a way in Moray to pass Povray the current frame info.  I've been coding
> for years so that's not the problem. Just figuring to figure out the
> mechanics of it all.
>
> Thanks,
> Dave...
>
> "Stefan Persson" <azy### [at] teliacom> wrote:
> > ..and I'm so sorry.. I missed a couple of  #declare
> > If you are not familiar with the POV SDL, the creation
> > and changing of a variable always begin with #declare.
> > So.. for instance c=c+1; should be #declare c=c+1;
> >
> > I guess I was thinking C..
> >
> > Again, sorry..
> >
> > Stefan
> >
> > "Stefan Persson" <azy### [at] teliacom> skrev i meddelandet
> > news:4259d977$1@news.povray.org...
> > > To expand my theory..
> > >
> > > #declare c=0;  ;Declare the counter
> > > #declare OnOff = 0; ;Declare the boolean variable
> > >
> > > code code..
> > >
> > > #if(c<=11) ;Check if we reached the end of the light cycle. If we are
> > still
> > > within 0-11 then do nothing except..
> > >     c=c+1; ;..increment the counter
> > > #else ;We have reached the end of the light cycle
> > >     #if(OnOff=0) ;Check if the light was on or off
> > >         OnOff=1;
> > >     #else
> > >         OnOff=0;
> > >     #end
> > >     c=0; ;IMPORTANTE!! Reset the counter so that we reset the cycle..
> > > #end
> > >
> > > code code..
> > >
> > > #lightsomething..
> > >     #if(OnOff=1) ;If 1 then the light is on.. if not.. just do
nothing..
> > >             light_source {   // Strobe light
> > >           <0.0, 0.0, 0.0>
> > >           color rgb <1.000, 1.000, 1.000>
> > >           translate  <0.985, -9.983, 15.82>
> > >            }
> > >     #end
> > > #end
> > >
> > > Code.. code..
> > >
> > > Or something like that..
> > >
> > > Stefan
> > >
> > > "Stefan Persson" <azy### [at] teliacom> skrev i meddelandet
> > > news:4259d638$1@news.povray.org...
> > > > Hi Dave,
> > > > And so you shouldn't.. ;)
> > > >
> > > > For the propeller I would use some sort of semi-transparent texture
> > > > to fake the motion blur of the spinning.
> > > > For the strobe, I can think of a solution..
> > > >
> > > >         A counter that holds the duration of the on/off sequense
> > > >         + a boolean variable.
> > > >         Let's say you want the light to be on for half a second
> > > >         (that's something like 12 frames.. 24 fps/2). Then the
> > > >         counter increments itself 12 times. When it reaches
> > > >         12 or 11, depending on if you start on 0 or 1, it switches
> > > >         the boolean.
> > > >         The light checks every cycle if the boolean is true or
> > > >         false. If it's true, it's on.. and the opposite of course.
> > > >
> > > > Try it. I hold no responsibility if it does any harm to
> > > > animals or your computer.. ;)
> > > >
> > > > Stefan
> > > >
> > > > "dj" <djh### [at] msncom> skrev i meddelandet
> > > > news:web.42529207d94d7e8f63b34e470@news.povray.org...
> > > > > I have a quick (hopefully) question about animation. I'm trying to
> > > animate
> > > > a
> > > > > flying aircraft.  I need to animate some strobe lights flashing
and a
> > > > > propeller spinning.  Is there a way to animate small segments and
have
> > > > them
> > > > > repeat?  I'd rather not have to manually animate the strobe light
> > > flashing
> > > > > through the entire sequence.
> > > > >
> > > > > Thanks,
> > > > > Dave
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
>
>
>
>


Post a reply to this message

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