POV-Ray : Newsgroups : povray.general : Making Code Conditional on Quality Setting : Re: Making Code Conditional on Quality Setting Server Time
3 Aug 2024 22:15:03 EDT (-0400)
  Re: Making Code Conditional on Quality Setting  
From: Jerry
Date: 29 Sep 2003 12:41:40
Message: <jerry-980DDC.09413429092003@netplex.aussie.org>
In article <web.3f784f827beb29f5458b4d510@news.povray.org>,
 "wacampbell" <nomail@nomail> wrote:

>I am interested in making some of the code in my scene file conditional on
>the quality setting.  To speed up rendering, I intend to replace my
>The word Quality doesn't seem to be recognized as a valid variable.  Does
>anyone have any thoughts on how I might accomplish this.

As far as I know there is no such variable.

I do this also, although I usually do it as simply on/off. If I'm doing 
a complex scene, I'll have a really simple version of each 
time-consuming object (such as cones for each mountain peak) as well as 
the real version.

Something like this:

#declare FINAL=1;
#declare DRAFT=0;

#declare renderVersion=FINAL;
#declare treeVersion=DRAFT;
#declare mountainVersion=FINAL;
#declare NakedMoleRatVersion=DRAFT;
etc....

Then, in the code:

#if (renderVersion | treeVersion)
//do the real tree
#else
//do the simple tree
#end

#if (renderVersion | mountainVersion)
//do the real mountain
#else
//do the simple mountain
#end

#if (renderVersion | NakedMoleRatVersion)
//do the real naked mole rat
#else
//do the simple rat
#end


So if I set renderVersion to FINAL, then everything gets done for 
"real"; if I set it to DRAFT, then only the items whose variable is set 
to FINAL get done for real, everything else is draft.

Jerry
-- 
"Give a man a fish and you feed him for a day. Teach him to fish, and you've
depleted the lake."--It Isn't Murder If They're Yankees
(http://www.ItIsntMurder.com/)


Post a reply to this message

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