POV-Ray : Newsgroups : povray.bugreports : Using phong with shadowless Server Time
8 Nov 2024 21:21:08 EST (-0500)
  Using phong with shadowless (Message 1 to 4 of 4)  
From: Bald Eagle
Subject: Using phong with shadowless
Date: 20 Nov 2022 13:00:00
Message: <web.637a6a1a87f3036f1f9dae3025979125@news.povray.org>
While experimenting with some code, I was using a shadowless light, and noticed
that I wasn't getting a phong highlight on a sphere with that finish.

Is this for some reason the intended behaviour, or an actual bug?


Minimal scene:


#version 3.8;
global_settings {assumed_gamma 1.0}



#declare Camera_Orthographic = true;
#declare Camera_Position = <0, 0, -100> ;
#declare Camera_Look_At  = <0, 0,  0> ;
// functions as a zoom for the orthographic view: 4 zooms in 4x, 8 zooms in 8x,
etc.
#declare Fraction = 75;

// ###########################################
camera {
 #if (Camera_Orthographic = true)
  orthographic
  right     x*image_width/(Fraction)
  up   y*image_height/(Fraction)
 #else
  right     x*image_width/image_height
  up y
 #end
 location  Camera_Position
 look_at   Camera_Look_At}
// ###########################################

sky_sphere {pigment {rgb <1, 1, 0.8>}}
#declare LS = <10, 10, -20>;
light_source {LS rgb 1 } //shadowless}

#declare Color = z*0.2; //<1, 0.9, 0.0>;
sphere {0, 1.2 texture {pigment {rgb Color} finish {phong 1}} }


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Using phong with shadowless
Date: 20 Nov 2022 16:25:00
Message: <web.637a99ec32973d7d892957989db30a9@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> While experimenting with some code, I was using a shadowless light, and noticed
> that I wasn't getting a phong highlight on a sphere with that finish.
>
> Is this for some reason the intended behaviour, or an actual bug?
>...


It looks like a bug to me. I can confirm that the behavior is the same for
POV-Ray for Windows Version 3.7.0.msvc10.win64 (The official version)

Here's a minimal scene for v3.7:

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#version 3.7;

global_settings { assumed_gamma 1.0 }

sphere {
    0*z, 2
    texture {
        pigment { color blue 0.2 }
        finish { phong 1 }
    }
}

background { color rgb <1.0, 1.0, 0.8> }

light_source {
    100*<1, 1, -2>
    color rgb <1, 1, 1>
    shadowless
}

camera {
    translate -10*z
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Cousin Ricky
Subject: Re: Using phong with shadowless
Date: 20 Nov 2022 23:56:04
Message: <637b04e4$1@news.povray.org>
On 2022-11-20 13:55 (-4), Bald Eagle wrote:
> While experimenting with some code, I was using a shadowless light, and noticed
> that I wasn't getting a phong highlight on a sphere with that finish.
> 
> Is this for some reason the intended behaviour, or an actual bug?

It is documented non-judgmentally, which suggests that it is deliberate.
 See:
https://wiki.povray.org/content/Reference:Light_Source#Shadowless_Lights

As for why, I can only guess.  But I tend to use shadowless lights as
fill lighting, for which highlights are undesirable anyway.  Perhaps the
dev team had the same idea.


Post a reply to this message

From: Bald Eagle
Subject: Re: Using phong with shadowless
Date: 21 Nov 2022 06:35:00
Message: <web.637b620d32973d7d1f9dae3025979125@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> On 2022-11-20 13:55 (-4), Bald Eagle wrote:
> > While experimenting with some code, I was using a shadowless light, and noticed
> > that I wasn't getting a phong highlight on a sphere with that finish.
> >
> > Is this for some reason the intended behaviour, or an actual bug?
>
> It is documented non-judgmentally, which suggests that it is deliberate.
>  See:
> https://wiki.povray.org/content/Reference:Light_Source#Shadowless_Lights
>
> As for why, I can only guess.  But I tend to use shadowless lights as
> fill lighting, for which highlights are undesirable anyway.  Perhaps the
> dev team had the same idea.

"Also note that shadowless lights will not cause highlights on the illuminated
objects."

Well ...  not a bug, and your reasoning makes sense.
I was just taken off guard, as it was my only light source.

Thank you, Sir.


Post a reply to this message

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