POV-Ray : Newsgroups : povray.general : Scripting guidance : Re: Scripting guidance Server Time
18 Nov 2024 23:17:42 EST (-0500)
  Re: Scripting guidance  
From: Bonsai
Date: 19 Jun 2002 09:42:51
Message: <3D1089FA.8000905@b0n541.net>
> With lots of objects, especially of type mesh,
> cameras, lights, textures etc, I can image that pov fies get really big. Any
> clues somewhere on how a good pov file could be laid out to make development
> and maintenance easier?

You can separate the textures, meshes and other objects into different 
files with the extension .inc (this is not required, but easier to 
recognize which is the global POV-Ray-File). Use the #declare function 
to give them a name:

#declare MyBestTextureIEverMade = texture
   {
   pigment
   ...
   ...
   }

Then make a global scene and include all necessary files with #include 
"filename.inc". Now you can use your defined textures, meshes and what ever.

e.g. a Mesh-Object

#include "mymeshes.inc"
#include "mytextures.inc"

object
   {
   TheBigMesh

   texture
     {
     MyBestTextureIEverMade
     }
   }

Hope that helps...

So long,

Bonsai


-- 
<--------------------------->
    ___ __ __  _ ___ ___  _
   | _ )  \  \( )  _) _ )( )
   | _ \() |\ \ |\ \/ _ \| |
   |___/__/_)\__)___)/ \_)_)

        www.b0n541.net
<--------------------------->


Post a reply to this message

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