POV-Ray : Newsgroups : povray.animations : professional animation management : Re: professional animation management Server Time
6 Oct 2024 10:05:05 EDT (-0400)
  Re: professional animation management  
From: Peter Hertel
Date: 18 Sep 2002 05:45:04
Message: <3d884b20@news.povray.org>
"GRUMBLE" <gru### [at] SPAMgmxat> skrev i melding
news:web.3d591b9e84f39dd52c0cb40@news.povray.org...
> are there any special techniques on how to get a better overview about
> animations in povray?
>
> i mean, you only have clock goin from 0 to 1 (or whatever you set it to)
> and everything else has to be referenced by this variable. and if you add
> more and more moving things to it, it all gets a whole chaos.
>
> im actually workin on a short movie where some things are animated. and
they
> all start and end at different times. and im so far now, that i have
> created an extra variable for each of it. but im still kinda confused. any
> tips?
>
I won't and can't claim this is professional animation management =) But
I've recently started another animation project, and so far it works out
well, I'm at the first scene which so far has 4 stages..

I've done it like this:
1) Build a animatable object ( I did a Alien which can move it's head, arms
and hover above the ground with fanzy fire coming out :)
2) Then assign the Alien to a macro, something like
Alien(Headrotate,Armsrotate,Translate).
3) Animate the Alien the way you want, using Alien_Clock going from 0 to 1
4) Model another object ( I did a transport ) Assign it to a macro like
Transport(Translate)
5) Animate the transport the way you want it to move, using Transport_Clock
going from 0 to 1.
6) Then piece the two object together like this in a macro(with clock going
from 0 to 1):

#macro Fill_Transport(Fill_Transport_Clock)
    #switch (Fill_Transport_Clock)
    #range (0,0.5)
        #declare Alien_Clock = Fill_Transport_Clock*2;// makes the clock go
from 0 to 1
        Alien(y*360*Alien_Clock,x*10*Alien_Clock,x*20*Alien_Clock)
        Transport(0)// Transport not moving
    #break
    #range (0.5,1)
        Alien(0,0,0)// Alien not moving
        #declare Transport_Clock = (Fill_Transport_Clock-0.5)*2; // makes
the clock go from 0 to 1
        Transport(x*100*Transport_Clock)
    #break
    #end
#end

Now you can initiate the macro in the next stage by just using
Fill_Transport(clock moving from 0 to 1)
Always make sure the macro clock goes from 0 to 1, first when you model it,
then modify the clock to fit when you initiate the macro.
If you want to make stuff start at different times you could do it like
this:

// command line: +KI0 +KF1 +KFI0 +KFF19 +w320 +h240

#local Pclock = clock;

// white ball
#switch (Pclock)
#range(0,0.5)
    #local MY_Clock = Pclock*2;
    sphere{x*2,1 translate y*2*MY_Clock pigment {rgb 1}}
#break
#range(0.5,1)
    sphere{x*2,1 translate y*2 pigment {rgb 1}}
#end

// red ball
#switch (Pclock)
#range(0,0.6)
    #local MY_Clock = Pclock*(1/0.6);
    sphere {x*-2,0.1+0.9*MY_Clock pigment {rgb <0.2+0.8*MY_Clock,0,0>}}
#break
#range(0.6,0.8)
    #local MY_Clock = (Pclock-0.6)*5;
    sphere{x*-2,1 translate x*-6*MY_Clock pigment {rgb <1,0,0>}}
#break
#range(0.8,1)
    sphere{x*-2,1 translate x*-6 pigment {rgb <1,0,0>}}
#break
#end

Since I've noe used this method for very long, I'm not sure how this will
work with even more stages, or if you want to go back and change a lot
(minor changes work well at this stage though)..In theory, it could work :)
I never use clock directly in my code, but rather declare another variable
like Pclock, because then I can just change Pclock to something between 0
and 1, and render a single frame at any stage in the animation.

I hope I managed to explain this good enough.. Hope you can use it, and if
you want to do accelration etc. take a look at the bottom of this page:
http://www.geocities.com/SoHo/Gallery/2006/ptip26.htm

Or use clockmod :)

I'm a newbie at animation, so please, if anyone out there knows better ways
to do this, please tell :)

Good luck!

-Peter
http://hertel.no/peter


Post a reply to this message

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