|
![](/i/fill.gif) |
On Sun, 25 Feb 2007 21:35:41 -0000, "St." <dot### [at] dot com> wrote:
>
> So, to the next question; I want to add some lights to the scene, but I
>want them to be flashing on and off throughout the animation. How do I do
>this?
You could also use the switch directive. To start off with keep the debug
statement in. In fact it is good practice to use debug in animations especially
when scenes get complicated. Debug and concat are your friends :-).
#switch (clock)
#range(0,0.2)
#debug "Range A"
light_source {
<0, 0, 0> color rgb <1, 1, 1> // White light
translate <-30, 30, -30>
}
#break
#range(0.2,0.4)
#debug "Range B"
light_source {
<0, 0, 0> color rgb <1, 0,0> // Red light
translate <-30, 30, -30>
}
#break
#range(0.4,0.6)
#debug "Range C"
light_source {
<0, 0, 0> color rgb <0, 1,0> // Green light
translate <-30, 30, -30>
}
#break
#range(0.6,0.8)
#debug "Range D"
light_source {
<0, 0, 0> color rgb <0, 0,1> // Blue light
translate <-30, 30, -30>
}
#break
#range(0.8,1)
#debug "Range E"
light_source {
<0, 0, 0> color rgb <0, 0,0> // Blue light
translate <-30, 30, -30>
}
#break
#end
Regards
Stephen
Post a reply to this message
|
![](/i/fill.gif) |