POV-Ray : Newsgroups : povray.newusers : without light, why are my objects not black Server Time
27 Nov 2024 02:53:12 EST (-0500)
  without light, why are my objects not black (Message 1 to 7 of 7)  
From: oldmicah
Subject: without light, why are my objects not black
Date: 9 Jul 2003 14:00:01
Message: <web.3f0c57f3336da44e8acd6b550@news.povray.org>
I started with a fairly complex scene and noticed that my bookshelves, even
in the deepest shadows, were not fading into black.  They reached a minimum
luminosity and stayed there.  After eliminating everything in the scene but
my bookshelves (including all lights), I can still see the bookshelves:
faintly, but they are there.  Is there a setting I can use that will allow
them to totally fade to black?

Thanks for any pointers, I've been banging my head against the wall for
several days on this.

-Steve


//#include "shapes.inc"

camera {
 location  <-15,30,-155>
 look_at <10,0,-5>
}


#declare bcwidth=28.0;
#declare bcheight=36.0;
#declare bcdepth=6;
#declare bczoffset = 0.20;
#declare bcthick=0.2;
#declare numshelves=7.0;
#declare floorlevel=-20;

#declare upright=
object {
 /*left side*/
  box { <bcthick, bcheight, bcdepth + bczoffset>, < 0, 0, bczoffset>
     pigment { color red .4 green .1 blue .2 }
  translate y*floorlevel
 }
}

#declare shelf=
object {
 /*bottom*/
 box { <bcthick, bcwidth, bcdepth + bczoffset>, < 0, 0, bczoffset>
     pigment { color red .4 green .1 blue .2 }

     rotate <0, 0, 90>
  translate y*(floorlevel)
  translate x*bcwidth
 }
}

#declare loadedbookcase=
union {

 object { upright }
 object {
  upright
  translate x*28
  }

 object { shelf translate y*bcthick }

  #declare Cnt=1;
 #declare Shelfheight=bcheight/numshelves;
    #while (Cnt<=numshelves)
  #declare CurrHeight=(Shelfheight*Cnt);
     object { shelf translate y*CurrHeight }
        #declare Cnt=Cnt+1;
    #end

  }
object { loadedbookcase translate z*-126  }
object { loadedbookcase translate x*-40 translate z*-126 }


Post a reply to this message

From: ABX
Subject: Re: without light, why are my objects not black
Date: 9 Jul 2003 14:06:00
Message: <r8mogvst09jbt30hius0mga1r2p6m7hiod@4ax.com>
On Wed,  9 Jul 2003 13:59:15 EDT, "oldmicah" <nomail@nomail> wrote:
> After eliminating everything in the scene but
> my bookshelves (including all lights), I can still see the bookshelves

Read carefully paragraphs in "6.7.3.1  Ambient" chapter in POV manual.

ABX


Post a reply to this message

From: oldmicah
Subject: Re: without light, why are my objects not black
Date: 9 Jul 2003 18:10:01
Message: <web.3f0c91c95c737d0e9cfc34200@news.povray.org>
ABX wrote:
>Read carefully paragraphs in "6.7.3.1  Ambient" chapter in POV manual.

Embarassingly enough, you don't even need to read it carefully.  Never
occurred to me that ambient default might be something other than 0.  It
works well and many thanks.

So then I added Wood texture to the shelves, and I immediately ran into the
same glow in the dark shelves.  initially I tried this:
texture { T_Wood2 }
finish { diffuse 0.8 ambient 0 }

no luck, so then, thinking that the finish needed to be applied directly to
the texture, not to the object, I tried this:
texture { T_Wood2 finish {diffuse 0.8 ambient 0 }}

Still no luck.  Looking at Woods.inc, I don't see that they have zero'd out
the ambient in the textures, so I'm guessing that I will have to manually
copy and paste bits from woods.inc and roll my own wood textures
incorporating 'finish {ambient 0}'.

Is there an easier way?  Will I have to do this with all of the 'canned'
textures included with POV?

thanks, and apologies in adv if this is another rtm question,
Steve


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: without light, why are my objects not black
Date: 9 Jul 2003 19:14:03
Message: <Xns93B4CC8DC81Dtorolavkhotmailcom@204.213.191.226>
"oldmicah" <nomail@nomail> wrote in
news:web.3f0c91c95c737d0e9cfc34200@news.povray.org: 

> ABX wrote:
>>Read carefully paragraphs in "6.7.3.1  Ambient" chapter in POV manual.
> 
> Embarassingly enough, you don't even need to read it carefully.  Never
> occurred to me that ambient default might be something other than 0. 
> It works well and many thanks.
> 
> So then I added Wood texture to the shelves, and I immediately ran
> into the same glow in the dark shelves.  initially I tried this:
> texture { T_Wood2 }
> finish { diffuse 0.8 ambient 0 }
> 
> no luck, so then, thinking that the finish needed to be applied
> directly to the texture, not to the object, I tried this:
> texture { T_Wood2 finish {diffuse 0.8 ambient 0 }}
> 
> Still no luck.  Looking at Woods.inc, I don't see that they have
> zero'd out the ambient in the textures, so I'm guessing that I will
> have to manually copy and paste bits from woods.inc and roll my own
> wood textures incorporating 'finish {ambient 0}'.
> 
> Is there an easier way?  Will I have to do this with all of the
> 'canned' textures included with POV?


The last part of section 6.7.3.1 gives a clue:

"You may also specify the overall ambient light source used when 
calculating the ambient lighting of an object using the global 
ambient_light setting. The formula is given by Ambient = Finish_Ambient * 
Global_Ambient_Light_Source See section "Ambient Light" for details."

Now if you follow the "Ambient Light" hyperlink you will arrive at
section 6.11.2, where you can see that you can control the overall
amount of ambient light e.g. like this:

global_settings { ambient_light color rgb <0, 0, 0> }

(This will effectively remove all ambient light in the scene.)


Tor Olav


Post a reply to this message

From: Christopher James Huff
Subject: Re: without light, why are my objects not black
Date: 9 Jul 2003 19:29:20
Message: <cjameshuff-FC065E.18262709072003@netplex.aussie.org>
In article <web.3f0c91c95c737d0e9cfc34200@news.povray.org>,
 "oldmicah" <nomail@nomail> wrote:

> Still no luck.  Looking at Woods.inc, I don't see that they have zero'd out
> the ambient in the textures, so I'm guessing that I will have to manually
> copy and paste bits from woods.inc and roll my own wood textures
> incorporating 'finish {ambient 0}'.

    Unfortunately, this is so for many of the textures. Those that do 
not specify an ambient value can be fixed somewhat by using the #default 
directive, but several specify their own ambient values. A lot of them 
were designed in older versions of POV, without things like radiosity. 
As a result, you end up with glowing woods and metals, unrealistic 
glass, etc. I very rarely use the includes any more, except occasionally 
as a basis for a custom texture. The wood includes do not set ambient 
values and provide all the parts for you to make your own, so the 
#default directive will work (you will have to put it before the 
#include, of course).

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: without light, why are my objects not black
Date: 9 Jul 2003 19:31:36
Message: <cjameshuff-27CF4A.18284409072003@netplex.aussie.org>
In article <Xns### [at] 204213191226>,
 Tor Olav Kristensen <tor_olav_kCURLYAhotmail.com> wrote:

> global_settings { ambient_light color rgb <0, 0, 0> }
> 
> (This will effectively remove all ambient light in the scene.)

Which is why it isn't very useful. If you want ambient light for a 
glowing object, this makes it impossible. It is better to use:
#default {finish {ambient 0 diffuse 1}}

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: oldmicah
Subject: Re: without light, why are my objects not black
Date: 11 Jul 2003 18:30:01
Message: <web.3f0f3a5d5c737d0e9cfc34200@news.povray.org>
Using #default {finish {ambient 0 diffuse 1}} worked like a charm.  Thanks
for all of the help; it is greatly appreciated.

-Steven


Post a reply to this message

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