POV-Ray : Newsgroups : povray.general : photon problem: image of projected image_map is clipped at the corners Server Time
8 Dec 2024 06:18:36 EST (-0500)
  photon problem: image of projected image_map is clipped at the corners (Message 1 to 5 of 5)  
From: Corvin Zahn
Subject: photon problem: image of projected image_map is clipped at the corners
Date: 20 Sep 2010 05:45:00
Message: <web.4c972bdffcc128eac947b6de0@news.povray.org>
Hi,

I have a problem with photons. The following stripped down code simulates a
slide projector:

-------------------------------------------
#include "colors.inc"

global_settings {
  #if (1)   // switch photons on/off
   photons { count 1000000 }
  #end
}

camera { location <0, 0, 200> sky<0,1,0> look_at <0,200,-200> angle 90 }

// projection screen
plane { z, -200 texture { pigment { White } finish{ diffuse 1 ambient 0.1} } }

// slide
polygon {
  5, <0,0,0>, <1,0,0>,<1,1,0>,<0,1,0>,<0,0,0>
  pigment { image_map {jpeg "s7_0.9_320.jpg" interpolate 2 filter all 1.0 } }
  translate <-0.5, 0.2, -0.3>
  photons { target refraction on reflection off collect off }
}

// projector lamp
light_source { <0, 0, 0>  color <1,1,1> }
-------------------------------------------

A point light source projects through a image_map onto a screen.

Without photons the projected image is ok:
http://img838.imageshack.us/i/test4woph.png/

With photons the left and right bottom corners of the image will be clipped:
http://img101.imageshack.us/i/test4wph.png/

The size of clipped corners depends on the y-offset in the translate command.

The povray Version is:
Persistence of Vision(tm) Ray Tracer Version 3.6.1 (Debian  (x86_64-linux-gnu-g+
+ 4.3.3 @ x86_64-pc-linux-gnu))
(the 3.7 beta has the same problem)

Does anyone have an idea, whats wrong?

Many thanks,
Corvin

PS: In the case of questions: I want to simulate a projection system with
mirrors, so I need photons. The offset of the slide in y direction is due to the
projector offset.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: photon problem: image of projected image_map is clipped at the corners
Date: 22 Sep 2010 04:01:25
Message: <4c99b7d5$1@news.povray.org>
Corvin Zahn wrote:

> With photons the left and right bottom corners of the image will be clipped:

I can reproduce the problem under Windows XP using 3.7 beta 39.
It seems to look like the photon shooting simply stopped with
its outward spiraling even though the bounding box was not yet
covered. However, the problem persists when setting autostop to
1.0, enforcing a larger bounding box, or brutally increasing
the photon count. It also persists when replacing the polygon
with a box of some small thickness using ior 1.0.

I think it is a bug, although the photon FAQ mentions that
the photon method is not very well suited for planar objects
with an ior close to 1.0. You might wish to report this
under http://bugs.povray.org/.

As a workaround, splitting the slide object into strips
seems to help, although you may then need a higher photon
count to avoid artefacts:

union
{
   box {<0,0.0,0>, <1,0.1,0.01>}
   box {<0,0.1,0>, <1,0.2,0.01>}
   box {<0,0.2,0>, <1,0.3,0.01>}
   box {<0,0.3,0>, <1,0.4,0.01>}
   box {<0,0.4,0>, <1,0.5,0.01>}
   box {<0,0.5,0>, <1,0.6,0.01>}
   box {<0,0.6,0>, <1,0.7,0.01>}
   box {<0,0.7,0>, <1,0.8,0.01>}
   box {<0,0.8,0>, <1,0.9,0.01>}
   box {<0,0.9,0>, <1,1.0,0.01>}
   ...
}


Post a reply to this message

From: Corvin Zahn
Subject: Re: photon problem: image of projected image_map is clipped at the corners
Date: 23 Sep 2010 06:40:00
Message: <web.4c9b2e0df4c32bf1c947b6de0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:

> I think it is a bug, although the photon FAQ mentions that
> the photon method is not very well suited for planar objects
> with an ior close to 1.0. You might wish to report this
> under http://bugs.povray.org/.

Done

> As a workaround, splitting the slide object into strips
> seems to help, although you may then need a higher photon
> count to avoid artefacts:
>
> union
> {
>    box {<0,0.0,0>, <1,0.1,0.01>}
>    box {<0,0.1,0>, <1,0.2,0.01>}
....

Thanks very much, this workaround seems to work for me too.

Corvin


Post a reply to this message

From: Le Forgeron
Subject: Re: photon problem: image of projected image_map is clipped at the corners
Date: 15 Aug 2011 03:22:31
Message: <4e48c937$1@news.povray.org>
Le 20/09/2010 11:41, Corvin Zahn nous fit lire :
> Does anyone have an idea, whats wrong?
> 

Yes, now I do.

The computation of the shooting cone for rays need some adjustement (and
propably a more serious revision in a next release to rewrite it to
handle some cases).

To make thinks clear, the cone was computed as follow:

 compute the radius of the bounding sphere of the target. (RAD)
 compute the distance between the lightsource and the center of the
bounding sphere. (DIST)

(The bounding sphere is the sphere which contains the bounding box)

The result was a cone of center the lightsource, toward the center of
the bounding sphere. The orthogonal section at that point was a disc of
same radius as the sphere.

Issues:
 a. If the lightsource is inside the sphere, you're stuck.
 b. otherwise, a small part of the sphere is out of the cone
    that part get more and more important as DIST is about RAD.
    (with large DIST/RAD ratio, the issue is nearly invisible, but
    what you encountered was a case where DIST/CASE was low.)

Issue b is fixed by adjusting RAD by 1/sin(acos(DIST/RAD))
Issue a need a better rewrite (to be considered in a later, later release)


Post a reply to this message

From: Le Forgeron
Subject: Re: photon problem: image of projected image_map is clipped at thecorners
Date: 15 Aug 2011 07:24:15
Message: <4e4901df$1@news.povray.org>
Le 15/08/2011 09:22, Le_Forgeron nous fit lire :
> Le 20/09/2010 11:41, Corvin Zahn nous fit lire :
>> Does anyone have an idea, whats wrong?

> Issue b is fixed by adjusting RAD by 1/sin(acos(DIST/RAD))

The careful reader would have fix it by themself: RAD/DIST !

Illustration in attached picture


Post a reply to this message


Attachments:
Download 'con.jpg' (28 KB)

Preview of image 'con.jpg'
con.jpg


 

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