|
|
"Numsgil" <Num### [at] yahoocom> wrote in message
news:web.47329d00a9b2848111481b6d0@news.povray.org...
>I have various "planet" textures that I'm trying to pre-render animations
>for
> for a game. I've figured out a simple script for rendering a texture that
> looks like this:
>
> #include "colors.inc"
> #declare TextureName = "Planets\\Terran01.png"
>
> camera
> {
> right x //Maintain square aspect ratio
> location <0, 0, 3>
> look_at <0,0,0>
> }
>
>
> sphere
> {
> <0,0,0> 1
> texture
> {
> pigment
> {
> image_map
> {
> png TextureName
> map_type 1 // Esfera
> }
> }
> }
>
> rotate <0, -clock 0> //Rotate so that the sun rises in the west
> finish { ambient 1 }
> }
> ////////////////////////////////////////////////////////////
>
> And the ini that looks like this:
>
> ; POV-Ray animation ini file
> +ua ;Transparent background
> Antialias=On
> Antialias_Threshold=0.3
> Antialias_Depth=2
>
> Width=256
> Height=256
>
> Input_File_Name=Planet.pov
> Output_File_Type = N
> Output_File_Name = AnimatedPlanet\Planet
>
> Initial_Frame=1
> Final_Frame=36 ; 36 frames
> Initial_Clock=0
> Final_Clock=360
>
> Cyclic_Animation=on
> Pause_when_Done=off
> ;---------------------------------------------
>
> What I'm trying to do now is change the texture being used so I can create
> a
> batch file. Ideally, I'd like something like this to work:
>
> povray MyIni.ini TextureA.png
> povray MyIni.ini TextureB.png
> povray MyIni.ini TextureC.png
> povray MyIni.ini TextureD.png
> povray MyIni.ini TextureE.png
>
> So I could pass parameters in to my ini, and have it change parameters in
> the
> ..pov file. However, if there's a way to do this, I don't see it. Can
> anyone
> point me in the right direction?
>
>
Hi,
So far as I know you can't do quite what you've asked for, but you can
probably get fairly close. If you take a look at the 'declare' 'ini-option'
in the help you'll see that it allows you to declare a float variable which
will be available to your scene file (not the ini file) e.g.
'declare=TextureIndex=5'.
You can define an array within the scene file to hold the list of textures
and index it using the variable that you use on the command-line call. For
example #declare MyTexture[TextureIndex] = "TextureA.png"; You'd need to
change the output file name on the command line from your script rather than
in the ini file so that each successive call doesn't overwrite the same set
of image files.
If you're running under Windows you may have a problem suppressing the
startup screen - I vaguely remember people discussing such problems in the
past.
I hope that helps
Regards,
Chris B.
Post a reply to this message
|
|