POV-Ray : Newsgroups : povray.newusers : Unexpected "wrong" color Server Time
8 Oct 2024 08:20:38 EDT (-0400)
  Unexpected "wrong" color (Message 1 to 10 of 10)  
From: Bald Eagle
Subject: Unexpected "wrong" color
Date: 30 Nov 2017 08:40:01
Message: <web.5a2009978e425e43c437ac910@news.povray.org>
It's always the simplest things... (facepalm)

I was just fiddling with the very beginnings of something, and of course it's
all gone off the rails for no reason that I can see.

Perhaps someone can tell me why my WHITE boxes in a WHITE scene with a WHITE
light source are .... anything but.




#version 3.71;
global_settings {
 assumed_gamma 1.0
}
/*
#default {
 texture {
  pigment {rgb <1, 1, 1>*0}
  finish {specular 0.4}
 }
}
*/

//background {rgb <1, 1, 1>}
sky_sphere {pigment {rgb <1, 1, 1>}}

#include "colors.inc"
#include "functions.inc"
#include "rand.inc"

camera {
  location <7, 40, -48>    // position & direction of view
  look_at  <7, 18,  0>
  right 1*x            // horizontal size of view
  up 1*y               // vertical size of view

}

light_source {<10, 50 -100> color White}

// 24 x 16 x 12

#declare Width = 24;
#declare Depth = 16;
#declare Height = 12;

#declare Line = 0.25;
#declare Origin = <0, 0, 0>;

#declare X = x*Width;
#declare Y = y*Height;
#declare Z = z*Depth;

#declare BoxTex = texture {pigment {rgb <1, 1, 1>} finish {diffuse 0}}

#declare PerspectiveBox =
union {
 sphere {Origin, Line}
 sphere {Origin+Z, Line}
 cylinder {Origin, Origin+Z, Line}
 sphere {Origin+X, Line}
 cylinder {Origin, Origin+X, Line}
 sphere {Origin+Y, Line}
 cylinder {Origin, Origin+Y, Line}

 sphere {Origin+Z+Y, Line}
 cylinder {Origin+Z, Origin+Z+Y, Line}
 sphere {Origin+X+Y, Line}
 cylinder {Origin+X, Origin+X+Y, Line}

 sphere {Origin+X+Y+Z, Line}
 cylinder {Origin+Y, Origin+Z+Y, Line}
 cylinder {Origin+Y, Origin+X+Y, Line}
 cylinder {Origin+Z+Y, Origin+X+Y+Z, Line}
 cylinder {Origin+X+Y, Origin+X+Y+Z, Line}
 union {
  box {Origin, Origin+X+Z}
  box {Origin, Origin+X+Z translate Y}
  box {Origin, Origin+X+Y}
  box {Origin, Origin+X+Y translate Z}
  box {Origin, Origin+Y+Z}
  box {Origin, Origin+Y+Z translate X}
  texture {BoxTex}
 }
}

union {
object {PerspectiveBox}
object {PerspectiveBox translate <2, 16, 2>}
rotate -y*30
}


Post a reply to this message

From: clipka
Subject: Re: Unexpected "wrong" color
Date: 30 Nov 2017 11:00:01
Message: <5a202b01$1@news.povray.org>
Am 30.11.2017 um 14:37 schrieb Bald Eagle:
> It's always the simplest things... (facepalm)
> 
> I was just fiddling with the very beginnings of something, and of course it's
> all gone off the rails for no reason that I can see.
> 
> Perhaps someone can tell me why my WHITE boxes in a WHITE scene with a WHITE
> light source are .... anything but.

> #declare BoxTex = texture {pigment {rgb <1, 1, 1>} finish {diffuse 0}}

Use `diffuse 1` and everything will be fine.

The truth is that pigment doesn't dictate the colour of an object --
pigment AND diffuse do, and the values multiply.


Post a reply to this message

From: Bald Eagle
Subject: Re: Unexpected "wrong" color
Date: 30 Nov 2017 11:45:06
Message: <web.5a2034771cf5c15dc437ac910@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> Use `diffuse 1` and everything will be fine.

I think I tried that - I started off with specular 0.1 and fiddled with it from
there.

Even with no finish statement whatsoever, I'm getting similar results.
I get some sharp banding with a dark gray and a light gray, but never any WHITE.

I thought perhaps because I started off using background, that maybe that was a
weird way to do the scene, so I switched to a white sky_sphere...


Nope.


Post a reply to this message

From: clipka
Subject: Re: Unexpected "wrong" color
Date: 30 Nov 2017 12:39:40
Message: <5a20425c$1@news.povray.org>
Am 30.11.2017 um 14:37 schrieb Bald Eagle:
> It's always the simplest things... (facepalm)

Indeed!
Had another close look at your scene and found this:

> light_source {<10, 50 -100> color White}

Try a comma between `50` and `-100`.
As it is now, you're placing the light source at `<10, 50-100, 0>` =
`<10, -50, 0>`.


Post a reply to this message

From: Stephen
Subject: Re: Unexpected "wrong" color
Date: 30 Nov 2017 13:02:40
Message: <5a2047c0$1@news.povray.org>
On 30/11/2017 16:40, Bald Eagle wrote:
> clipka <ano### [at] anonymousorg> wrote:
> 
>> Use `diffuse 1` and everything will be fine.
> 
> I think I tried that - I started off with specular 0.1 and fiddled with it from
> there.
> 

So did I with little difference. :-(

Did you try usinf "ambient"?
[Sorry Clipka but just for testing.]



-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Unexpected "wrong" color
Date: 30 Nov 2017 13:05:00
Message: <web.5a2047c31cf5c15dc437ac910@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> Indeed!

> Try a comma between `50` and `-100`.
> As it is now, you're placing the light source at `<10, 50-100, 0>` =
> `<10, -50, 0>`.

That certainly makes things look better.
Not as white as I had expected, but it also explains some of the strange banding
- those must have been shadows cast upward.

Oh, that sneaky vector-promotion.

Thanks very much as always!


Post a reply to this message

From: Stephen
Subject: Re: Unexpected "wrong" color
Date: 30 Nov 2017 13:06:30
Message: <5a2048a6$1@news.povray.org>
On 30/11/2017 18:02, Stephen wrote:
> Did you try usinf "ambient"?

Oh! why can't we edit our posts (for spelling mostly)?
No need to answer I know but it is no longer the century of the fruit bat.

-- 

Regards
     Stephen


Post a reply to this message

From: dick balaska
Subject: Re: Unexpected "wrong" color
Date: 30 Nov 2017 18:31:29
Message: <5a2094d1$1@news.povray.org>
Am 2017-11-30 13:06, also sprach Stephen:

>  no longer the century of the fruit bat.

I find the fruit battiness annoying too. However, it is ours (in a 
global community sense; literally I believe it is still chrisc's.) and 
it is ad free.
On the flip side, I *loathe* when someone starts a discussion on FB, 
doesn't like the direction of the discussion, and deletes the entire 
thread. You can't un-have a discussion!

-- 
dik


Post a reply to this message

From: Stephen
Subject: Re: Unexpected "wrong" color
Date: 1 Dec 2017 06:26:34
Message: <5a213c6a$1@news.povray.org>
On 30/11/2017 23:31, dick balaska wrote:
> Am 2017-11-30 13:06, also sprach Stephen:
> 
>>  no longer the century of the fruit bat.
> 
> I find the fruit battiness annoying too. However, it is ours (in a 
> global community sense; literally I believe it is still chrisc's.) and 
> it is ad free.

Sorry, it was a reference to Terry Pratchett's discworld, universe. I 
just meant it was a bit 20th Cent. and old fashioned. But you are right 
in the way you understood it too. :-)


> On the flip side, I *loathe* when someone starts a discussion on FB, 
> doesn't like the direction of the discussion, and deletes the entire 
> thread. You can't un-have a discussion!
> 

You know better than me. I don't have a FB account. :-D

-- 

Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: Unexpected "wrong" color
Date: 1 Dec 2017 21:18:40
Message: <5a220d80$1@news.povray.org>
Le 17-11-30 à 08:37, Bald Eagle a écrit :

> /*
> #default {
>   texture {
>    pigment {rgb <1, 1, 1>*0}
>    finish {specular 0.4}
>   }
> }
> */

That's black


> #declare BoxTex = texture {pigment {rgb <1, 1, 1>} finish {diffuse 0}}
> 

This also result in a black texture. diffuse 0 = don't give back any 
light at all.


Post a reply to this message

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