POV-Ray : Newsgroups : povray.general : changing output file in script : Re: changing output file in script Server Time
3 Aug 2024 04:20:18 EDT (-0400)
  Re: changing output file in script  
From: Stephen McAvoy
Date: 13 May 2004 19:06:10
Message: <fqv7a0t316tuf6ru6mkq2lspg4qpv5dl5d@4ax.com>
On Thu, 13 May 2004 15:59:43 -0600, "Sally"
<bui### [at] NOSPAMyahoocom> wrote:

>I dont need to change the clock variable in the .pov file, its changing
>normally as I want it, but I want the texture to depend on it. I could
>have a huge "switch" like statement with each filename, but then it
>doesn't adapt to each file automatically.
>
>And I'd prefer not to use batch files but its so far the only solution I
>have seen (and ty for that solution by the way).
>

Would something like this do?


#declare Cycle02_Max = 120;   //      Number of textures in the cycle.

#declare F_Name = "My_Texture_"       ;       // Base name of your
Texture                            
        
#declare Cycle02Pos =  mod (frame_number, Cycle02_Max); 
// This should repeat the cycle if the number of frames is a multiple
of the number of textures.

#declare
Texture_clock=concat(F_Name,str(int(Cycle02Pos),-1,0),".txt");


box {
    <-1, 0,   -1>,  
    < 1, 0.5,  3>   
    texture {
      Texture_clock 
    }
}

Where
My_Texture_01.txt
My_Texture_02.txt
My_Texture_03.txt
Etc.
Is the list of textures

I use this sort of logic to create animations with sequentially
numbered meshes. Actually I do the opposite to what you want. One
texture for different objects.
I've not tested this as I'm running an animation.


Regards
        Stephen


Post a reply to this message

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