POV-Ray : Newsgroups : povray.general : Automatically rendering multiple views : Re: Automatically rendering multiple views Server Time
31 Jul 2024 20:25:19 EDT (-0400)
  Re: Automatically rendering multiple views  
From: Randy
Date: 20 Sep 2006 00:10:01
Message: <web.4510be19d96628161c8c96c0@news.povray.org>
"Chris B" <c_b### [at] btconnectcomnospam> wrote:

>
>(helpful stuff I removed)
>

Thanks much for pointing me to a section of the POV help files that I had
usually just skipped over.  This has helped me to write some code that does
almost everything I want.

Now I'm going to have to have POV write a .bat file to run as a post-frame
shell command to rename the output so that it ends up exactly the way I
want it (but that will have to wait for tomorrow night).

My solution to rendering various cameras automagically:

//The camera
#if (clock_on = 0)
  #declare Cam_Num = 1; //Value of desired camera for single frame render
                        // (edit this value before rendering)
#else
  //To automatically render multiple times with different cameras,
  //set the scene's initial and final frames
  //i.e. put +KFI3 +KFI5 on the command line
  //to render frames 3 through 5
  #declare Cam_Num = frame_number;
#end

#debug concat("nCamera Number: ", str(Cam_Num,2,1), "nn")

#switch (Cam_Num)
  #case (1) // Standard view
    #declare Cam_Pos = <9*Ft, 5*Ft, -20*Ft>;
    #declare Cam_Look = <9*Ft, 5*Ft,  0.0>;
  #break
  #case (2) // Close-up of piston box
    #declare Cam_Pos = <10*Ft, 3*Ft, -10*Ft>;
    #declare Cam_Look = <10*Ft, 3*Ft, 0*Ft>;
  #break
  .
  .
  .

Thanks again, Chris B. !!


Post a reply to this message

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