|
|
"Marc Champagne" <marcch.AT.videotron.DOT.ca> wrote in message
news:Xns### [at] 204213191226...
>
> During an animation sequence, if an object is to:
>
> do something for 2 seconds
> stay idle for 3 seconds
> do something for 3 seconds
>
> Assuming:
>
> +kff???
> +ki0 (default)
> +kf1 (default)
> And that we encode the final animation at 25 fps.
>
> Would one use something like this to figure out where in time
> we are?
>
> #declare T = frame_number / 25 ;
>
> #if ( T<2 | ( T>5 & T<8 ) )
> do something
> #end
Seems okay to me. There's #range, used in #switch directive, that I might
use for this kind of purpose too. Goes like so:
#switch (T)
#range (0,2)
/* do first thing */
#break
#range (5,8)
/* do second thing */
#break
#end
Except this wouldn't prevent the exact values 2, 5 and 8 from being taken
into account; unlike your #if directive method, which I'd say is perfectly
fine in that particular example. You just don't need the parenthesis around
T>5&T<8 for it to work right, I believe.
Bob H.
Post a reply to this message
|
|