POV-Ray : Newsgroups : povray.newusers : Light without light source? : Re: Light without light source? Server Time
28 Jul 2024 16:15:30 EDT (-0400)
  Re: Light without light source?  
From: Warp
Date: 3 Aug 2008 06:32:28
Message: <4895893c@news.povray.org>
Reactor <rea### [at] hotmailcom> wrote:
> What I prefer to do is have some variables at the top of my scene and reference
> them throughout:

> #if( use_radiosity )
>     #declare scene_diffuse = 0.95;
>     #declare scene_ambient = 0.00;
> #else
>     #declare scene_diffuse = 0.85;
>     #declare scene_ambient = 0.15;
> #end

> then, inside of the finish block of a texture:

> finish
> {
>     specular 0 roughness 1
>     ambient scene_ambient
>     diffuse scene_diffuse
> }

  It's just easier and less trouble to use #default. That way you don't
have to add those 'ambient' and 'diffuse' lines to each single texture
you write. And it will work with pre-existing textures/objects as well
(assuming they don't explicitly define an ambient/diffuse).

-- 
                                                          - Warp


Post a reply to this message

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