POV-Ray : Newsgroups : povray.general : Unwanted black spots in regular pattern Server Time
24 Nov 2024 11:53:35 EST (-0500)
  Unwanted black spots in regular pattern (Message 1 to 7 of 7)  
From: Jasper
Subject: Unwanted black spots in regular pattern
Date: 10 May 2019 07:25:01
Message: <web.5cd55925b78640a851138a9b0@news.povray.org>
Hello everyone!

I am trying to introduce photometric data files of luminaires (i.e. IESNA .ies
or EULUMDAT .ldt) in Povray to get "correct" lighting distributions. In order to
do so, I combine

(1) a point light source
(2) a sphere with radius 0.01 and spherical mapping of an image map (.png with
the alpha channel used for transparency) which represents the lighting
distribution for different angles.

My camera view is from above, simulating a satellite view (Z-direction is "up")
and assuming a simple planar object in xy. While the above-mentioned method
works in most cases, it seems that for large coordinates (e.g. 1 000 000
translation of both camera and luminaire in the xy plane), it no longer does (it
becomes a regular point source), and some black dots appear in the resulting
image. The strange thing is that it is not the case for translations of, e.g.,
100 000.

Has anyone encountered similar problems and/or knows the reason for this?

Jasper


Post a reply to this message

From: William F Pokorny
Subject: Re: Unwanted black spots in regular pattern
Date: 10 May 2019 08:46:05
Message: <5cd5728d$1@news.povray.org>
On 5/10/19 7:22 AM, Jasper wrote:
> Hello everyone!
> 
> I am trying to introduce photometric data files of luminaires (i.e. IESNA .ies
> or EULUMDAT .ldt) in Povray to get "correct" lighting distributions. In order to
> do so, I combine
> 
> (1) a point light source
> (2) a sphere with radius 0.01 and spherical mapping of an image map (.png with
> the alpha channel used for transparency) which represents the lighting
> distribution for different angles.
> 
> My camera view is from above, simulating a satellite view (Z-direction is "up")
> and assuming a simple planar object in xy. While the above-mentioned method
> works in most cases, it seems that for large coordinates (e.g. 1 000 000
> translation of both camera and luminaire in the xy plane), it no longer does (it
> becomes a regular point source), and some black dots appear in the resulting
> image. The strange thing is that it is not the case for translations of, e.g.,
> 100 000.
> 
> Has anyone encountered similar problems and/or knows the reason for this?
> 
> Jasper
> 

Suspect you are seeing numerical issues of some sort. With POV-Ray today 
a good rule of thumb is to keep everything numerically between say 1e-4 
and 1e5, if you can. You can sometimes achieve better and worse. The 
blob's low end is 1e-2 or so, for example. There is a hard upper range 
limit in the code called MAX_DISTANCE currently at 1e7. Long rays to an 
object tend to be numerically more noisy too - I've only very recently 
come to understand how significant that part is.

That said, you are using a sphere and it's one of the shapes POV-Ray 
will move during parsing when it can rather than 'work' in a normalized 
space with transforms to the actual final location as other objects do.

Something you could try... Immediately after you define your sphere add 
a very small non-symmetrical scale like scale <1+1e-6,1,1+1e-6>. Then do 
your translates as normal. If I'm remembering the code correctly this 
should immediately create a transform internally preventing the movement 
of the sphere. Perhaps this would lead to numerically more stable 
results. I'm interested in whether it helps or not if you do try it!

In any case movements by 1e6 in x and y (can mean 1e6 * sqrt(2) max 
ranges) so your playing up near the +-1e7 hard upper limit there no 
matter what.

Bill P.


Post a reply to this message

From: clipka
Subject: Re: Unwanted black spots in regular pattern
Date: 10 May 2019 08:50:33
Message: <5cd57399$1@news.povray.org>
Am 10.05.2019 um 13:22 schrieb Jasper:

> I am trying to introduce photometric data files of luminaires (i.e. IESNA .ies
> or EULUMDAT .ldt) in Povray to get "correct" lighting distributions. In order to
> do so, I combine
> 
> (1) a point light source
> (2) a sphere with radius 0.01 and spherical mapping of an image map (.png with
> the alpha channel used for transparency) which represents the lighting
> distribution for different angles.
> 
> My camera view is from above, simulating a satellite view (Z-direction is "up")
> and assuming a simple planar object in xy. While the above-mentioned method
> works in most cases, it seems that for large coordinates (e.g. 1 000 000
> translation of both camera and luminaire in the xy plane), it no longer does (it
> becomes a regular point source), and some black dots appear in the resulting
> image. The strange thing is that it is not the case for translations of, e.g.,
> 100 000.
> 
> Has anyone encountered similar problems and/or knows the reason for this?

It is generally a bad idea to place your scene far off-center. The 
reason is that POV-Ray uses floating-point mathematics, which can cover 
a wide range of values, but degrades in (absolute) precision as the 
magnitudes grow. So the further you place your objects away from the 
center, the more you invite artifacts from precision issues (think 
rounding errors).


Post a reply to this message

From: Jasper
Subject: Re: Unwanted black spots in regular pattern
Date: 10 May 2019 09:55:00
Message: <web.5cd58196f746720951138a9b0@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 5/10/19 7:22 AM, Jasper wrote:
> > Hello everyone!
> >
> > I am trying to introduce photometric data files of luminaires (i.e. IESNA .ies
> > or EULUMDAT .ldt) in Povray to get "correct" lighting distributions. In order to
> > do so, I combine
> >
> > (1) a point light source
> > (2) a sphere with radius 0.01 and spherical mapping of an image map (.png with
> > the alpha channel used for transparency) which represents the lighting
> > distribution for different angles.
> >
> > My camera view is from above, simulating a satellite view (Z-direction is "up")
> > and assuming a simple planar object in xy. While the above-mentioned method
> > works in most cases, it seems that for large coordinates (e.g. 1 000 000
> > translation of both camera and luminaire in the xy plane), it no longer does (it
> > becomes a regular point source), and some black dots appear in the resulting
> > image. The strange thing is that it is not the case for translations of, e.g.,
> > 100 000.
> >
> > Has anyone encountered similar problems and/or knows the reason for this?
> >
> > Jasper
> >
>
> Suspect you are seeing numerical issues of some sort. With POV-Ray today
> a good rule of thumb is to keep everything numerically between say 1e-4
> and 1e5, if you can. You can sometimes achieve better and worse. The
> blob's low end is 1e-2 or so, for example. There is a hard upper range
> limit in the code called MAX_DISTANCE currently at 1e7. Long rays to an
> object tend to be numerically more noisy too - I've only very recently
> come to understand how significant that part is.
>
> That said, you are using a sphere and it's one of the shapes POV-Ray
> will move during parsing when it can rather than 'work' in a normalized
> space with transforms to the actual final location as other objects do.
>
> Something you could try... Immediately after you define your sphere add
> a very small non-symmetrical scale like scale <1+1e-6,1,1+1e-6>. Then do
> your translates as normal. If I'm remembering the code correctly this
> should immediately create a transform internally preventing the movement
> of the sphere. Perhaps this would lead to numerically more stable
> results. I'm interested in whether it helps or not if you do try it!
>
> In any case movements by 1e6 in x and y (can mean 1e6 * sqrt(2) max
> ranges) so your playing up near the +-1e7 hard upper limit there no
> matter what.
>
> Bill P.

Hi Bill,

Thank you for your suggestion. However, it doesn't work, even when trying, e.g.,
scale <1+1e-3,1,1+1e-3>. I suspected some numerical issues as well (as a POV-ray
beginner, I also just encountered a section called "CSG Pitfalls" in the
Introduction to POV-Ray, which sounds very similar). In a way, it is not a huge
problem to reduce the coordinates, but found it important to understand why it
doesn't work. Anyway, thank you for the advice:)

Jasper


Post a reply to this message

From: Jasper
Subject: Re: Unwanted black spots in regular pattern
Date: 10 May 2019 09:55:01
Message: <web.5cd5821bf746720951138a9b0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 10.05.2019 um 13:22 schrieb Jasper:
>
> > I am trying to introduce photometric data files of luminaires (i.e. IESNA .ies
> > or EULUMDAT .ldt) in Povray to get "correct" lighting distributions. In order to
> > do so, I combine
> >
> > (1) a point light source
> > (2) a sphere with radius 0.01 and spherical mapping of an image map (.png with
> > the alpha channel used for transparency) which represents the lighting
> > distribution for different angles.
> >
> > My camera view is from above, simulating a satellite view (Z-direction is "up")
> > and assuming a simple planar object in xy. While the above-mentioned method
> > works in most cases, it seems that for large coordinates (e.g. 1 000 000
> > translation of both camera and luminaire in the xy plane), it no longer does (it
> > becomes a regular point source), and some black dots appear in the resulting
> > image. The strange thing is that it is not the case for translations of, e.g.,
> > 100 000.
> >
> > Has anyone encountered similar problems and/or knows the reason for this?
>
> It is generally a bad idea to place your scene far off-center. The
> reason is that POV-Ray uses floating-point mathematics, which can cover
> a wide range of values, but degrades in (absolute) precision as the
> magnitudes grow. So the further you place your objects away from the
> center, the more you invite artifacts from precision issues (think
> rounding errors).

That makes sense! Thank you


Post a reply to this message

From: Norbert Kern
Subject: Re: Unwanted black spots in regular pattern
Date: 10 May 2019 17:25:00
Message: <web.5cd5ebfcf74672093c1c78400@news.povray.org>
"Jasper" <nomail@nomail> wrote:
> Hello everyone!
>
> I am trying to introduce photometric data files of luminaires (i.e. IESNA .ies
> or EULUMDAT .ldt) in Povray to get "correct" lighting distributions. In order to
> do so, I combine
>
> (1) a point light source
> (2) a sphere with radius 0.01 and spherical mapping of an image map (.png with
> the alpha channel used for transparency) which represents the lighting
> distribution for different angles.
>
> My camera view is from above, simulating a satellite view (Z-direction is "up")
> and assuming a simple planar object in xy. While the above-mentioned method
> works in most cases, it seems that for large coordinates (e.g. 1 000 000
> translation of both camera and luminaire in the xy plane), it no longer does (it
> becomes a regular point source), and some black dots appear in the resulting
> image. The strange thing is that it is not the case for translations of, e.g.,
> 100 000.
>
> Has anyone encountered similar problems and/or knows the reason for this?
>
> Jasper


There are other povray limits too - one is the combination of radiosity with
very small normals. Then black spots can occur everywhere in your scene.
Usually it helps to enlarge these small normals bor to delete them.
It would help to see a scene...

Norbert


Post a reply to this message

From: Jasper
Subject: Re: Unwanted black spots in regular pattern
Date: 13 May 2019 07:35:00
Message: <web.5cd9561cf746720951138a9b0@news.povray.org>
> There are other povray limits too - one is the combination of radiosity with
> very small normals. Then black spots can occur everywhere in your scene.
> Usually it helps to enlarge these small normals bor to delete them.
> It would help to see a scene...
>
> Norbert

Hi Norbert,

Currently, I have radiosity turned off. However, I was planning on using it in
the future, so that's a useful hint. Thank you! For a basic scene (only 1 light,
camera and a simple plane), see
http://news.povray.org/povray.binaries.images/thread/%3Cweb.5cd95526b9d0796c51138a9b0%40news.povray.org%3E/

Jasper


Post a reply to this message

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