POV-Ray : Newsgroups : povray.general : ANN: 3.7 .inc file improvement project : Re: 3.7 .inc file improvement project Server Time
30 Jul 2024 10:21:26 EDT (-0400)
  Re: 3.7 .inc file improvement project  
From: Reactor
Date: 27 Mar 2009 16:55:01
Message: <web.49cd3cae43368518af92dd7a0@news.povray.org>
"Jim Holsenback" <jho### [at] hotmailcom> wrote:
> "[GDS|Entropy]" <gds-entropy AT hotmail DOT com> wrote in message
> news:49cbdec4@news.povray.org...
> >  Compatibility with radiosity also a plus.
>
> This one gets my vote! If I want to use any of the "canned" textures I've
> been redefining the finishes by setting a variable, then a conditional test
> in the finish block .... so moving that overhead into an include file sounds
> like a winner to me.
>
> Jim


I have done something similar to make my finishes work during test renders with
no radiosity, then switch to a more radiosity-compatible version with a single
variable change.

My default finish settings are similar to below, as set by a custom include
file:
//CODE:
#ifndef( scene_ambient ) #local scene_ambient = 0.15; #end
#ifndef( scene_diffuse ) #local scene_diffuse = 0.85; #end

#default{

#default{
    finish
    {
        ambient scene_ambient
        diffuse scene_diffuse
    }
}


Within the actual scene, I have something like:
#declare use_radiosity = off;
#declare use_mc = off;

#if( use_radiosity | use_mc )
 #declare scene_diffuse   = 0.99;
 #declare scene_ambient   = 0.00;
 #declare light_intensity = 0.50;
#else
 #declare scene_diffuse   = 0.90;
 #declare scene_ambient   = 0.15;
 #declare light_intensity = 0.85;
#end

The most important part is mainly the ambient component of the finish, since
using the same ambient value for a radiosity scene as compared to a
non-radiosity scene usually looks wrong.

I know there is always the concern of identifier name collisions, but having a
switch or two that toggles some of the commonly changed components of the
finishes would be very handy.


-Reactor


Post a reply to this message

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