POV-Ray : Newsgroups : povray.beta-test : selective component loading..... : Re: selective component loading..... Server Time
28 Jul 2024 18:15:34 EDT (-0400)
  Re: selective component loading.....  
From: Alain
Date: 24 Oct 2007 12:31:00
Message: <471f7344@news.povray.org>
Andycadd nous apporta ses lumieres en ce 2007/10/23 20:51:
> 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?
> 
> 
There is NO WAY that you can only load some parts of an include file. There is 
NO "purge" command.

At the present time, your options are:
  - Load the entire include files.
  - Make your own custom, expurged, includes. Those can be trimmed down to only 
the deffinitions that you actualy use.

Please note that this topic does NOT belong to the beta-test group, but to the 
advanced-users group.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you have ever brought your 
computer to its knees by mistakenly launching 64 simultaneous frames to be 
traced, while trying to maximizing the benefits of parallelizing them.
Carsten Whimster


Post a reply to this message

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