POV-Ray : Newsgroups : povray.newusers : Changing parameters across runs : Changing parameters across runs Server Time
28 Jul 2024 18:21:10 EDT (-0400)
  Changing parameters across runs  
From: Numsgil
Date: 8 Nov 2007 00:25:00
Message: <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?


Post a reply to this message

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