I declared some variables that are used by if-else statements to control
the apperence of my before-after Mars landscape. I used a switch
statement to set the variables to different values for different frames,
but when I rendered it with the command line +KFI1 +KFF7, only the first
case version of the scene is rendered for all seven frames. How do I
get the frames to show the different versions of the scene?
Here're the variables and the switch statement. I have tested the
actual code manually by changing the variables' values before I made the
switch statement so I know that the if-else code that choose between the
different scene elements works fine so I didn't include that here.
#declare have_water = 0;
#declare have_clouds = 0;
#declare dust_storm = 0;
#declare night = 0;
#declare flood = 0;
#if(clock_on)
#switch(frame_number)
#case(1)
#break //use values already set
#case(2)
#declare night = 1;
#break
#case(3)
#declare have_water = 1;
#declare have_clouds = 1;
#break
#case(4)
#declare flood = 1;
#break
#case(5)
#declare flood = 0;
#declare night = 1;
#break
#case(6)
#declare night = 0;
#break
#case(7)
#declare have_water = 0;
#declare have_clouds = 0;
#declare dust_storm = 1;
#break
#end
#end
Brendan
Post a reply to this message
|