POV-Ray : Newsgroups : povray.beta-test : Ambient and diffuse for include files? : Re: Ambient and diffuse for include files? Server Time
1 Jul 2022 19:18:57 EDT (-0400)
  Re: Ambient and diffuse for include files?  
From: Bald Eagle
Date: 8 Mar 2022 06:45:00
Message: <web.622740a5485c224d1f9dae3025979125@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:

> One way to solve this would be to declare a single pair of variables
> that would be used by all six include files.  Third party include files
> would be encouraged to access these variables.  What do you think of
> this proposal?  Does anyone have a better idea?

Absent my current ability to formulate ways other than that one, I'd say that
starting all of those include files with an #include statement that references a
master include would be a good way to do it, in case any future tweaks happened.

Pre-coffee brain is thinking that the textures ought to be written as macros
that return a texture.
Why?
Then you could declare a secondary pair of values to hold "current" values while
retaining the default master values.   Then the user could use the stock
textures with the unaltered default master values, or override them by
redeclaring the "current" values.

Hope that makes sense.

Having some sort of "starter" include, or basic scene file template, or helper
libraries for new users has been intermittently discussed and worked on.
Perhaps as a means to implement, document, and standardize things going forward
from 3.8 to 4.0, you could take this value-pair idea and put that in a
default_values.inc or something that would always get included first thing.
Even after 30 years, we're still grappling with coincident textures, and so I
always define an E value, which is usually 0.000001 to make things bigger or
smaller by that much.  Having that value defined also serves as a reminder when
I'm doing differences, etc.


Post a reply to this message

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