POV-Ray : Newsgroups : povray.newusers : Help with frame_number Server Time
4 Sep 2024 18:14:59 EDT (-0400)
  Help with frame_number (Message 1 to 3 of 3)  
From: Brendan Ryan
Subject: Help with frame_number
Date: 20 Aug 2002 01:02:40
Message: <3D61CD05.7040206@global2000.net>
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

From: Fidel viegas
Subject: Re: Help with frame_number
Date: 20 Aug 2002 14:09:41
Message: <B98843C0.2EEF%fidel.viegas@artrecognition.co.uk>
Hi Brendan,

I have just tried it on Megapov 0.7 and Povray 3.5 and I didn't have any
problems with it. I have run the code and it selected all 7 frames.
You better double check your system.

All the best

Fidel.



in article 3D6### [at] global2000net, Brendan Ryan at
ary### [at] global2000net wrote on 20/8/02 6:00 am:

> 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

From: Brendan Ryan
Subject: Re: Help with frame_number
Date: 20 Aug 2002 19:01:49
Message: <3D62C9F0.1080208@global2000.net>
Fidel viegas wrote:
> Hi Brendan,
> 
> I have just tried it on Megapov 0.7 and Povray 3.5 and I didn't have any
> problems with it. I have run the code and it selected all 7 frames.
> You better double check your system.
> 

Oh, I just had the incorrect assumation that it would fall through the 
switch statement.
Brendan


Post a reply to this message

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