POV-Ray : Newsgroups : povray.general : object media / spotlight aberration Server Time
1 Aug 2024 00:16:38 EDT (-0400)
  object media / spotlight aberration (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: object media / spotlight aberration
Date: 22 Sep 2006 05:40:00
Message: <web.4513ab5d55cb6906b0d7b10e0@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:
> The problem is in the spotlight definition...
>
> Although it is legal to put "translate" before the spotlight terms, it
> confuses the parser....

Hi, Tim--

Well, I'm amazed. That simple trick eliminated the problem. I would never
have thought of looking at the ordering of terms in the light source (and
didn't know it could make such a difference!) Thank you.

UNFORTUNATELY, "inserting" a spotlight into a scene's code using the insert
menu (as I did) automatically  plugs in the problem-causing arrangement of
terms. I had always assumed that the POV developers had already worked out
the "best" way to write these bits of code. Now I'm not so sure (and that's
kind of unsettling.) At the very least, the current spotlight SDL code--and
the cylinder light code-- need to be rewritten (to reflect whatever *is* the
best form of the terms, given the parsing problems you mentioned.)
Errors like this--in such basic parts of the  POV package--are a bit more
than just a nuisance.

If I may ask: How did you happen to come by this bit of information? Is
there perhaps a source of similar info on the 'net that I should be looking
at?

Ken W.


Post a reply to this message

From: Kenneth
Subject: Re: object media / spotlight aberration
Date: 22 Sep 2006 05:45:01
Message: <web.4513afd255cb6906b0d7b10e0@news.povray.org>
I forgot to ask: Do you know if this little problem with the
spotlight/cylinder light SDL code is confined only to the Windows version
of POV-Ray, or is it across the board, in all versions?

Ken


Post a reply to this message

From: Alain
Subject: Re: object media / spotlight aberration
Date: 22 Sep 2006 19:25:43
Message: <451470f7$1@news.povray.org>
Tim Attwood nous apporta ses lumieres en ce 22/09/2006 04:35:
> The problem is in the spotlight definition...

> Although it is legal to put "translate" before the spotlight terms, it
> confuses the parser. This is similar to placing "spotlight" after the
> spotlight terms, which is legal, but causes the light to act as a point-
> light.

> This light works fine, but this is still a parsing bug...

> light_source {
>   0*x
>   color <1,0,0>
>   spotlight // before all spot terms
>   point_at <0,0,0>
>   radius 7
>   tightness 10
>   falloff 9
>   translate <-36, 36, -36> // after all light terms
> }

Not good! Now the light is placed at <-36,36,-36> and point_at <-36,36,-36>, and 
it don't light the scene any more. The traslate at the end apply to ALL 
coordinates: location AND point_at. A rotate or scale at the same place would 
also apply to both location and point_at.
Placing the light at <-36,36,-36> and removing the translate and the problem is 
still there.

-- 
Alain
-------------------------------------------------
Grandchildren are God's reward for not killing your own.


Post a reply to this message

From: Thomas de Groot
Subject: Re: object media / spotlight aberration
Date: 23 Sep 2006 04:20:19
Message: <4514ee43$1@news.povray.org>
I changed your little scene a bit, just to make it more intuitive for me.
I don't know what happens, but it has to do imo with the relative, combined 
positions of camera, media sphere, and spotlight. I don't think that the 
spotlight code itself is the culprit. Try this with the scene below, only 
switching the camera z-position between -70 (no aberration) and -80 
(aberration in one of the spheres).

Thomas

camera {
  perspective
  location  <20,25,-70>
  look_at   <0,0,0>
  right     x*image_width/image_height
  angle 90
}

light_source {
  0*x
  color <1,1,0>
  spotlight
  translate <0, 36, -36>
  point_at <0,0,0>
  radius 7
  tightness 10
  falloff 9
  media_interaction on
}

// floor
object{
        box { <-65,-1, -40>, <65,0,40>
        texture{
                pigment{agate scale 15}
                finish {
                        ambient .2
                        diffuse .8
                       }
                }
            }
       }


// oblong box
box{<-4,0,-4>, <4,30,4>
        texture{
                pigment {color rgb 1}
                finish{
                        ambient .1
                        diffuse .9
                      }

               }
     translate <0,0,0>
    }

#declare media_sphere =
sphere{0,1 hollow no_shadow
    texture{
        pigment{color rgbt 1}
        finish{ // not needed, but does not alter problem
                ambient 0
                diffuse 0
              }
           }

    interior{
         media{
                emission .4
                density{bozo}
              }
            }
      }

object{media_sphere translate <-10,20,-50>}

object{media_sphere translate <10,20,-50>}


Post a reply to this message

From: Alain
Subject: Re: object media / spotlight aberration
Date: 23 Sep 2006 11:28:25
Message: <45155299$1@news.povray.org>
Thomas de Groot nous apporta ses lumieres en ce 23/09/2006 04:20:
> I changed your little scene a bit, just to make it more intuitive for me.
> I don't know what happens, but it has to do imo with the relative, combined 
> positions of camera, media sphere, and spotlight. I don't think that the 
> spotlight code itself is the culprit. Try this with the scene below, only 
> switching the camera z-position between -70 (no aberration) and -80 
> (aberration in one of the spheres).
> 
> Thomas
> 
>
With the camera at -70 the media spheres are both outside the line of sight to 
the spot_light cone.
Placing the camera at 0*x and one of the spheres at <0,20,-63> and the aberation 
apears. At that location the sphere is in front of where the light encounter the 
ground and should NOT have any interaction with the spot_light, as the light has 
been completely intercepted by the ground. The sphere is also way in front of 
the spot_light cone. It may be some aberation in the spot_light code.
In my view, it's a bug.

-- 
Alain
-------------------------------------------------
No matter how good she looks,
some other guy is sick and tired of putting up with her shit.
	Men's Room, Linda's Bar and Grill, Chapel Hill , NC


Post a reply to this message

From: Kenneth
Subject: Re: object media / spotlight aberration
Date: 23 Sep 2006 21:55:00
Message: <web.4515e42b55cb690689cb42c20@news.povray.org>
"Thomas de Groot" <t.d### [at] internlnet> wrote:
> I changed your little scene a bit, just to make it more intuitive for me.
> I don't know what happens, but it has to do imo with the relative, combined
> positions of camera, media sphere, and spotlight. I don't think that the
> spotlight code itself is the culprit. Try this with the scene below, only
> switching the camera z-position between -70 (no aberration) and -80
> (aberration in one of the spheres).
>
> Thomas
>

Hi, Thomas, sorry for the delay in answering (it has been  *busy* two days
for me.)

Thanks for posting your code.  I put a looks_like sphere into your
spotlight., then took a look at the scene from the top. Alain is right
about the positioning of the media spheres, they're both "behind" the
location of the light, outside the cone.  BUT, you're also right, in that
one of the spheres DOES show the aberration if the camera is moved back
slightly...due to that sphere now falling between the camera and the light
cone. Which points up how difficult it is to actually *produce* this effect
on purpose--the camera/media sphere/light all have to be in a particular
alignment to show the effect.  Which is probably why I had never noticed
this behavior before (or if I did, I never made the connection between all
three items.) Pretty crazy, huh.

Ken


Post a reply to this message

From: Kenneth
Subject: Re: object media / spotlight aberration
Date: 23 Sep 2006 22:05:00
Message: <web.4515e6bd55cb690689cb42c20@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:

> Some facts from experimenting:

> 4) camera re-positioning has no effect

Sorry if I confused anybody.  I didn't mean to imply that the camera can be
moved ANYWHERE to still show the effect; just nudging it a bit here and
there ( to see if that made a difference, which it doesn't.) The effect is
only visible when the media spheres are positioned in-between the
camera and the light cone.

Ken


Post a reply to this message

From: Kenneth
Subject: Re: object media / spotlight aberration
Date: 23 Sep 2006 22:15:00
Message: <web.4515e97f55cb690689cb42c20@news.povray.org>
Alain <ele### [at] netscapenet> wrote:

>
> ...The translate at the end apply to ALL
> coordinates: location AND point_at. A rotate or scale at the same place would
> also apply to both location and point_at.

Wow, something *else* I didn't realize. (Arrrgh! Details, details.) Perhaps
I should have; a light is an "object", after all. Dare I say that such a
detail is not made altogether clear in the POV docs? But then again, I
guess we shouldn't be spoon-fed *everything*...  ;-)

Thanks, Alain.

Ken


Post a reply to this message

From: Kenneth
Subject: Re: object media / spotlight aberration
Date: 23 Sep 2006 22:45:01
Message: <web.4515f0eb55cb690689cb42c20@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:

> Well, I'm amazed. That simple trick eliminated the problem....

And Alain wrote:

>  Not good! Now the light is placed at <-36,36,-36> and
> point_at <-36,36,-36>, and it don't light the scene any more....
>

I'm embarassed to say that, in my happiness that the distortion had
disappeared, I had neglected to notice that the light was no longer shining
(!)  Duh. This explains it. But in the interim, I thought that the problem
was *still* in the ordering of the spotlight's terms, so I plugged in the
spotlight example given in the docs  (in 2.2.4.2) instead. But the cone
distortion reappeared.

I'm beginning to sense that this problem is deeper than *just* the ordering
of terms in the spotlight. Accordingly, I'd like to apologize to the POV
team for my earlier remarks. I'm sure they are working on this conundrum.
If it were easy to fix, it would have been by now.

Three cheers for the POV team!  :-)

Ken


Post a reply to this message

From: Tim Attwood
Subject: Re: object media / spotlight aberration
Date: 23 Sep 2006 22:54:43
Message: <4515f373$1@news.povray.org>
> If I may ask: How did you happen to come by this bit of information? Is
> there perhaps a source of similar info on the 'net that I should be 
> looking
> at?
Just a wild guess...


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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