POV-Ray : Newsgroups : povray.beta-test : selective component loading..... : Re: selective component loading..... Server Time
28 Jul 2024 18:15:24 EDT (-0400)
  Re: selective component loading.....  
From: Andycadd
Date: 23 Oct 2007 20:55:00
Message: <web.471e96f67dcd5e2ffedbe4b90@news.povray.org>
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
> Andycadd escribió:
> > is there such a system in the scene control language?
> >
> > IE...  a very large file of many textures takes up too much memory
> > is there anyway to only load "specific" lines from an include file? not the
> > whole file.
> >
> >
> Totally wrong newsgroup; setting followup to povray.general.
>
> You could either keep it in separate files, or use #if statements.
>
> On main scene:
> #declare UseHighQualityModels=no;
> #declare UseHighQualityTextures=no;
>
> On an included file:
> #if(UseHighQualityModels)
>   #declare Model = union {
>    ...something BIG
>   }
> #else
>   #declare Model = union {
>    ...simplified model...
>   }
> #end
>
> object {
>   Model
>   #if(UseHighQualityTextures)
>    texture {
>     ...something BIG
>    }
>   #else
>   pigment {
>    color Yellow
>   }
>   #end
> }

Thank you for your very useful routines for step 2

BUT....    step 1.  Is there a partial load possible for ".inc" files?
a file access keyword to let me search for specific textures/materials from
within the parser, rather than loading the entire ".inc" file.

the SCENE DESCRIPTION LANGUAGE equivalent to:
(fileopen "XXX" "rw")
(wcmatch "XXXX" file)
(readfile ....  " xx ;" )

I want to do this because I have a few thousand texture maps and definitions
which overload the stack if I load them all simultaneously.

Or better would be a "purge" type function to clear out unused textures from
the stack before rendering.

I have a collection of many thousand finishes and architectural elements, in
texture/material definitions some are in bitmap form.  I slapped them
together with excel into a dozen or so ".inc" files that are cumbersome to
work with.  So selective loading would minimize my cumber with regards to
using my library.

The best would be a "purge" type function, to remove the excess items.  This
would be the most useful and trouble free, especially if it could be called
repeatedly from within an ".inc" file.

oh and where is the proper group for this discussion?


Post a reply to this message

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