POV-Ray : Newsgroups : povray.general : creating you include files : Re: creating you include files Server Time
12 Aug 2024 03:25:51 EDT (-0400)
  Re: creating you include files  
From: Ken
Date: 5 Apr 1999 03:53:56
Message: <37085CE3.709AE8DE@pacbell.net>
Royce Sullivan wrote:
> 
> Greetings,
> 
> I'm using spatch to model organic shapes for a project. When I export to
> povray the models can include several hundred lines of code. I was
> wanting to know if these large files can some how be expressed as povray
> include files so they can be tucked away into the include directory and
> be referred to in the main scene making for shorter scene files that are
> easier to troubleshoot.
> Thanks in advance.
> 
> Ronald F. Hicks
> 
> www.geocities.com/SoHo/1006
> dag### [at] yahoocom

  It is very prudent to do so. The usual method is to name the file with
the long code using a .inc extension. In your main .pov file it is
convenient to declare the textures, the translations and rotations, and
any other object modifiers so you don't have to constantly open, save and
close the .inc file containing the object. For example you have a mesh
of a dog that is 100k in size. You call it dog.inc and declare the object
simply Dog. In your main .pov file you could have something like:


camera { stuff }

light_source { light stuff }

#declare DogTex = texture { Stuff }

#include "dog.inc"

object { Dog 
 texture { DogTex scale <whatever> }
  rotate y*23
   translate < -25, 0, 35 >
}

More stuff, other objects here etc.


  This way you are only saving a 1k - 5k file instead of a much larger
file plus it is more compact so you see more of the scene without a lot
of scrolling to find a specific part. If you place it in another directory
you may need to supply a path to the file depending where it is located.
If you place it in one of the directories already located in the pov library
search paths you need not include the extra path syntax.

This is legal -> #include "d:\povray\include\meshs\dog.inc"


-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

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