POV-Ray : Newsgroups : povray.newusers : Light without light source? Server Time
24 Nov 2024 12:35:07 EST (-0500)
  Light without light source? (Message 1 to 9 of 9)  
From: Triple Omega
Subject: Light without light source?
Date: 27 Jul 2008 18:20:01
Message: <web.488cf38ffb56fa1cbc347d080@news.povray.org>
First of all i'm a complete newbie, but i've searched a lot and didn't find
anything similar. (I'm using the windows version 3.6)

The problem i'm having is that whether i've defined a light source or not, any
plane and/or object is always illuminated. For example the following renders a
blue/red checkered plane thats a little dark, but illuminated all the way to
the horizon and a yellow sphere(also a little dark, but still illuminated):

  #include "colors.inc"
  #include "stones.inc"

    camera {
    location <0, 2, -3>
    look_at  <0, 1,  2>
  }

  sphere {
    <0, 1, 2>, 2
    texture {
      pigment { color Yellow }
    }
  }

    plane { <0, 1, 0>, -1
    pigment {
      checker color Red, color Blue
    }
  }


Now the "Messages" part of Pov-ray even states that no light sources were
in the scene, only 1 finite and 1 infinite object. So why isn't my rendering
completely black? There is no light source, so how can i possibly see
anything/how could it possibly render anything?

Thanks in advance,

Triple


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Light without light source?
Date: 27 Jul 2008 18:38:40
Message: <488cf8f0@news.povray.org>
Triple Omega wrote:

> The problem i'm having is that whether i've defined a light source or not, any
> plane and/or object is always illuminated.

it's the ambient light. Add

   #default {finish {ambient 0}}

at the beginning of your scene file.

However, this means all shadows cast will be pitch
black, so you need to use fill lights or radiosity
to avoid that.


Post a reply to this message

From: Triple Omega
Subject: Re: Light without light source?
Date: 28 Jul 2008 09:10:01
Message: <web.488dc4274e32c40ebc347d080@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> Triple Omega wrote:
>
> > The problem i'm having is that whether i've defined a light source or not, any
> > plane and/or object is always illuminated.
>
> it's the ambient light. Add
>
>    #default {finish {ambient 0}}
>
> at the beginning of your scene file.
>
> However, this means all shadows cast will be pitch
> black, so you need to use fill lights or radiosity
> to avoid that.

Thanx a lot. I was following the beginner tutorials for pov-ray and came to
this: http://www.povray.org/documentation/view/3.6.1/36/ when i realised that
my render did not match what was being discribed. There is no mention of the
ambient light that is on by default, yet it expected me to have no ambient
light, sharp shadows and an unlit plane when using a spotlight. Maybe someone
should report this to someone?(I don't know who to contact.)


Post a reply to this message

From: Sherry Shaw
Subject: Re: Light without light source?
Date: 1 Aug 2008 12:21:47
Message: <4893381b@news.povray.org>
Triple Omega wrote:
>There is no mention of the
> ambient light that is on by default, yet it expected me to have no ambient
> light, sharp shadows and an unlit plane when using a spotlight. Maybe someone
> should report this to someone?(I don't know who to contact.)

The problem is that you're writing textures without finishes.  According 
to Help, the default value for ambient is 0.1 (look under "finish"). 
Try using something like this:

sphere {
   <0, 1, 2>, 2
   texture {
     pigment {
       color Yellow
     }
     finish {
       ambient 0
     }
   }
}

plane {
   <0, 1, 0>, -1
   texture {
     pigment {
       checker
       color Red, color Blue
     }
     finish {
       ambient 0
     }
   }
}

You can, of course, make the ambient light go away by changing the 
default texture.  You can also shut off ambient light in global_settings 
(my personal preference, as I don't care for falling back on the default 
texture).  This can be useful for doing quick preliminary renders of a 
scene that's going to be using radiosity or complex lighting 
arrangements (which slow things down):  use an ambient value in your 
finishes somewhere in the neighborhood of 0.3, and then add 
ambient_light 0 to global_settings when you're ready to do radiosity 
renders.  The actual ambient value will then be 0 x 0.3 = 0.

Hope this helps.

--Sherry Shaw

-- 
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}//                                   TenMoons


Post a reply to this message

From: Alain
Subject: Re: Light without light source?
Date: 1 Aug 2008 14:36:49
Message: <489357c1$1@news.povray.org>
Sherry Shaw nous illumina en ce 2008-08-01 12:21 -->

> You can, of course, make the ambient light go away by changing the 
> default texture.  You can also shut off ambient light in global_settings 
> (my personal preference, as I don't care for falling back on the default 
> texture).  This can be useful for doing quick preliminary renders of a 
> scene that's going to be using radiosity or complex lighting 
> arrangements (which slow things down):  use an ambient value in your 
> finishes somewhere in the neighborhood of 0.3, and then add 
> ambient_light 0 to global_settings when you're ready to do radiosity 
> renders.  The actual ambient value will then be 0 x 0.3 = 0.
> 
> Hope this helps.
> 
> --Sherry Shaw
> 
A bad solution, as it preclude the use of high ambient object to illuminate your 
scene. ambient_lights is multiplied with the ambient component of your finishes. 
Set it to zero, and no object can shed light whatever ambient value you set. 
It's goal it to tint the ambient by using a non-white value.
I prefer to use this:

#declare Use_Rad = on;
#default{finish{#if(Use_Rad)diffuse 0.8 ambient 0#else diffuse 0.6 ambient 0.2#end}}

I also edit the various includes to remove some absurd and useless ambient values.

-- 
Alain
-------------------------------------------------
   A girl phoned me and said, "Come on over. There's nobody home." I Went over. 
Nobody was home!
	Rodney Dangerfield


Post a reply to this message

From: Sherry Shaw
Subject: Re: Light without light source?
Date: 2 Aug 2008 14:49:44
Message: <4894ac48@news.povray.org>
Alain wrote:
>
> A bad solution, as it preclude the use of high ambient object to 
> illuminate your scene.
> 

In that case, set ambient_light to a tiny value, effectively killing the 
ambient value in ordinary finishes, and set the ambient value of the 
high-ambient object high enough to offset it.  (For example, 
ambient_light 0.001 * ambient 10000 = 10)

--Sherry Shaw


-- 
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}//                                   TenMoons


Post a reply to this message

From: Warp
Subject: Re: Light without light source?
Date: 2 Aug 2008 19:12:25
Message: <4894e9d9@news.povray.org>
Sherry Shaw <ten### [at] aolcom> wrote:
> In that case, set ambient_light to a tiny value, effectively killing the 
> ambient value in ordinary finishes, and set the ambient value of the 
> high-ambient object high enough to offset it.  (For example, 
> ambient_light 0.001 * ambient 10000 = 10)

  IMO a cleaner solution is to use #default { finish { ambient 0 } }

-- 
                                                          - Warp


Post a reply to this message

From: Reactor
Subject: Re: Light without light source?
Date: 2 Aug 2008 21:50:00
Message: <web.48950ead4e32c40ec90c6aa70@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Sherry Shaw <ten### [at] aolcom> wrote:
> > In that case, set ambient_light to a tiny value, effectively killing the
> > ambient value in ordinary finishes, and set the ambient value of the
> > high-ambient object high enough to offset it.  (For example,
> > ambient_light 0.001 * ambient 10000 = 10)
>
>   IMO a cleaner solution is to use #default { finish { ambient 0 } }
>
> --
>                                                           - Warp



What I prefer to do is have some variables at the top of my scene and reference
them throughout:

#declare use_radiosity = on; // off

#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
}

Sometimes I'll add another variable for light intensity, too.

-Reactor


Post a reply to this message

From: Warp
Subject: Re: Light without light source?
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.