POV-Ray : Newsgroups : povray.windows : Include color-changes in ini-files. possible? : Re: Include color-changes in ini-files. possible? Server Time
1 Jun 2024 10:33:05 EDT (-0400)
  Re: Include color-changes in ini-files. possible?  
From: Charles C
Date: 20 Oct 2006 19:05:00
Message: <web.453953c6bb20a1509992c0d0@news.povray.org>
To expand on what Stephen was suggesting, if you create a new general
purpose .pov file and include the original .pov file(s) at the beginning
you can re-define things that may have already been placed in the scene but
which can exist only once. E.g you can redefine the camera, background etc.
What this won't help with are things that have already been "placed" in the
scene which CAN be re-instanced, like the lego brick. I don't know how to
add no_shadow to an object which is already parsed and placed in the scene.
 Anyway this approach might look something like this if using the animation
feature to render as many different brick files as you want.

//General_Lego_Renderer.pov:
//if using animation feature to render different parts you can do something
like:
#include concat("Lego_", str(frame_number,0,0), ".pov")
background{rgb <Var1,Var2,Var3>} //however you want to redefine it...


OR if the files aren't nicely numbered:

You could do something like "dir /b > filelist.txt"   Then unfortunately
you'll need to put quotes before and after each file name, as well as
putting a "," after the 2nd quote for each file name.   That'd let you:

#fopen TheFileList "filelist.txt" read
#local ctr = 1;
#while(ctr <= frame_number) //just getting to the correct one for this frame
   #read (TheFileList, FileName)
   #local ctr = ctr +1;
#end
#include FileName
background{rgb<Var1,Var2,Var3} //however you want to redefine it...


Anyway do whatever seems easiest and gets the results you want. :)

Charles


Post a reply to this message

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