POV-Ray : Newsgroups : povray.beta-test : Philosophical objection to fog distance=0 Server Time
11 Oct 2026 14:36:12 EDT (-0400)
  Philosophical objection to fog distance=0 (Message 1 to 20 of 20)  
From: Greg M  Johnson
Subject: Philosophical objection to fog distance=0
Date: 6 Nov 2001 08:43:29
Message: <3BE7E897.FEC8EF6@aol.com>
The following scene file gives a black screen.  IMHO it should give a
green screen. This bug/feature caused me considerable headaches 'till I
figured it out.  Consider for example the difference when the distance
is 1e-6.

  fog {
    distance 0
//    distance 1e-6
    color rgb<0.3, 0.5, 0.2>
  }


Post a reply to this message

From:
Subject: Re: Philosophical objection to fog distance=0
Date: 6 Nov 2001 08:52:18
Message: <iiqfut8231iiqn5odnhj1bd2mtba42pjra@4ax.com>
On Tue, 06 Nov 2001 08:41:43 -0500, "Greg M. Johnson"
<"gregj56590[:-0]"@aol.com> wrote:

> The following scene file gives a black screen.  IMHO it should give a
> green screen.

The behaviour is probably undefined becouse of fog formula from 6.9.3 chapter. 

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Ken
Subject: Re: Philosophical objection to fog distance=0
Date: 6 Nov 2001 09:26:42
Message: <3BE7F340.CC6AC882@pacbell.net>
"Greg M. Johnson" wrote:
> 
> The following scene file gives a black screen.  IMHO it should give a
> green screen. This bug/feature caused me considerable headaches 'till I
> figured it out.  Consider for example the difference when the distance
> is 1e-6.

Philosophical objection?

It does not behave any differently than it did in POV-Ray v3.1g. This
means it is not a bug and this message does not belong in this group.

If you want to discuss feature behavior you might try one of the
other groups on this news server such as povray.general.

Let's keep focused on bug reports, please.

-- 
Ken Tyler - POV-Ray Technical Assistance Group


Post a reply to this message

From:
Subject: Re: Philosophical objection to fog distance=0
Date: 6 Nov 2001 10:08:52
Message: <p0vfutka6fjr50c0rrn9egpqk63c80ibj9@4ax.com>
On Tue, 06 Nov 2001 06:27:12 -0800, Ken <tyl### [at] pacbellnet> wrote:

>Let's keep focused on bug reports, please.

Could it be treated as bug report if I say there is no simple small example for
mesh2 in scene files ? Only within advanced balcony.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Greg M  Johnson
Subject: 3.1g & 3.5 bug report
Date: 6 Nov 2001 10:41:28
Message: <3BE8043C.FB0E9E02@aol.com>
"Włodzimierz ABX Skiba" wrote:

> On Tue, 06 Nov 2001 08:41:43 -0500, "Greg M. Johnson"
> <"gregj56590[:-0]"@aol.com> wrote:
>
> > The following scene file gives a black screen.  IMHO it should give a
> > green screen.
>
> The behaviour is probably undefined becouse of fog formula from 6.9.3 chapter.

This bug-carry-over-from 3.1g could be fixed by changing:

PIXEL_COLOR = exp(-d/D) * OBJECT_COLOR + (1-exp(-d/D)) * FOG_COLOR

to

PIXEL_COLOR = exp(-d/(D+GGG)) * OBJECT_COLOR + (1-exp(-d/(D+GGG))) * FOG_COLOR

Where GGG= an infitesimal, just bigger than the smallest number pov can handle


Post a reply to this message

From:
Subject: Re: 3.1g & 3.5 bug report
Date: 6 Nov 2001 10:59:56
Message: <kv1gut8247bkoa6o7t01pcb8pg2gbt0n27@4ax.com>
On Tue, 06 Nov 2001 10:39:40 -0500, "Greg M. Johnson"
<"gregj56590[:-0]"@aol.com> wrote:

> This bug-carry-over-from 3.1g could be fixed by changing:
> PIXEL_COLOR = exp(-d/D) * OBJECT_COLOR + (1-exp(-d/D)) * FOG_COLOR
> to
> PIXEL_COLOR = exp(-d/(D+GGG)) * OBJECT_COLOR + (1-exp(-d/(D+GGG))) * FOG_COLOR
> Where GGG= an infitesimal, just bigger than the smallest number pov can handle

Balancing between floating point accuracy and division by zero is rather not
very best thing. "The smallest number pov can handle" depends on platform.
Morover why this addition should be done for all values (even large integers)?
It is rather bug in parser which allows even "distance -1".

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Christoph Hormann
Subject: Re: Philosophical objection to fog distance=0
Date: 6 Nov 2001 11:24:45
Message: <3BE80ECD.2628F521@gmx.de>
"Włodzimierz ABX Skiba" wrote:
> 
> Could it be treated as bug report if I say there is no simple small example for
> mesh2 in scene files ? Only within advanced balcony.
> 

Hmm, certainly not a bug, but relevant for this group anyway.  I think the
main reason is that mesh2 is particularly useful for large meshes which
would be too large for the scene file collection.  I had quite a lot of
trouble getting the cloth mesh in balcony down to the current 300k and
this is still quite a lot.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From:
Subject: Re: Philosophical objection to fog distance=0
Date: 6 Nov 2001 11:56:26
Message: <b05gut83dfmig601dqivm42bg43qm2s620@4ax.com>
On Tue, 06 Nov 2001 17:24:45 +0100, Christoph Hormann <chr### [at] gmxde>
wrote:

> Hmm, certainly not a bug, but relevant for this group anyway.  I think the
> main reason is that mesh2 is particularly useful for large meshes which
> would be too large for the scene file collection.

But there could be comparision of mesh with two faces - one with mesh{} and the
same with mesh2{}. Bezier patch is supposed to be generated with external
programs but there is sample for it within scenes/objects.

> I had quite a lot of
> trouble getting the cloth mesh in balcony down to the current 300k and
> this is still quite a lot.

You can remove some space by replacing "0." with "." but I think you have
considered this. I don't know how many signs are there but perhaps you can also
change negative to positive and positive to negative in vertices and normals and
use scale -1.

I think it could be also good idea to make universal macros to generate
face_indices and uv-vectors for grids like yours within standard include files.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Rune
Subject: Re: Philosophical objection to fog distance=0
Date: 6 Nov 2001 12:02:12
Message: <3be81794@news.povray.org>
"Ken" wrote:
> It does not behave any differently than it did in
> POV-Ray v3.1g. This means it is not a bug and this
> message does not belong in this group.

While I agree that this message of Greg's is perhaps more of a feature
request than a bug report (since a distance of 0 may be undefined for good
reasons), I would like to point out that even if something works the same
way in POV-Ray 3.1 it can still be a bug. POV-Ray 3.1 is not entirely
bug-free.

There have been lots of bugs reported here that also were present in POV-Ray
3.1, and AFAIK no Team member has ever complained about that, but on the
contrary they have tried to fix them.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Christoph Hormann
Subject: Re: Philosophical objection to fog distance=0
Date: 6 Nov 2001 12:14:20
Message: <3BE81A6B.547F0694@gmx.de>
"Włodzimierz ABX Skiba" wrote:
> 
> But there could be comparision of mesh with two faces - one with mesh{} and the
> same with mesh2{}. Bezier patch is supposed to be generated with external
> programs but there is sample for it within scenes/objects.

Although the scene file collection is to some extend 'fixed' this might by
a good idea, i will see what i can do.

> You can remove some space by replacing "0." with "." but I think you have
> considered this. I don't know how many signs are there but perhaps you can also
> change negative to positive and positive to negative in vertices and normals and
> use scale -1.

Yes, removing the 0's would reduce size although compression (for the
installation package) will work quite well on them.

> 
> I think it could be also good idea to make universal macros to generate
> face_indices and uv-vectors for grids like yours within standard include files.
> 

I think Ingo has already made such macros, i don't know if they are
already well tested though.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: ingo
Subject: Re: Philosophical objection to fog distance=0
Date: 6 Nov 2001 13:21:58
Message: <Xns9151C500E840Cseed7@povray.org>
in news:3BE81A6B.547F0694@gmx.de Christoph Hormann wrote:

> I think Ingo has already made such macros, i don't know if they are
> already well tested though.

Yes and no and they are still changing.

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: 3.1g & 3.5 bug report
Date: 6 Nov 2001 13:45:48
Message: <3be82fdc@news.povray.org>
"Włodzimierz ABX Skiba" wrote:

> On Tue, 06 Nov 2001 10:39:40 -0500, "Greg M. Johnson"
> <"gregj56590[:-0]"@aol.com> wrote:
>
> > This bug-carry-over-from 3.1g could be fixed by changing:
> > PIXEL_COLOR = exp(-d/D) * OBJECT_COLOR + (1-exp(-d/D)) * FOG_COLOR
> > to
> > PIXEL_COLOR = exp(-d/(D+GGG)) * OBJECT_COLOR + (1-exp(-d/(D+GGG))) * FOG_COLOR
> > Where GGG= an infitesimal, just bigger than the smallest number pov can handle
>
> Balancing between floating point accuracy and division by zero is rather not
> very best thing. "The smallest number pov can handle" depends on platform.
> Morover why this addition should be done for all values (even large integers)?
> It is rather bug in parser which allows even "distance -1".

Oh, how about
GGG=1.5*max(smallest_number_for_platform [n])    for all n's?


Post a reply to this message

From: Warp
Subject: Re: 3.1g & 3.5 bug report
Date: 6 Nov 2001 16:12:17
Message: <3be85230@news.povray.org>
The most efficient solution is just to issue an error message if the
distance <= 0.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Greg M  Johnson
Subject: Re: 3.1g & 3.5 bug report
Date: 6 Nov 2001 21:27:30
Message: <3be89c12$1@news.povray.org>
Distance=0 ought to be allowed, imho, and give  100% color of fog.

Warp wrote:

>   The most efficient solution is just to issue an error message if the
> distance <= 0.
>
> --
> #macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
> rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
> ],13),8)-3,10>#end blob{N(array[6]{11117333955,
> 7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Warp
Subject: Re: 3.1g & 3.5 bug report
Date: 7 Nov 2001 06:52:06
Message: <3be92066@news.povray.org>
Greg M. Johnson <"gregj;-)56590\""@aol.c;-)om> wrote:
: Distance=0 ought to be allowed, imho, and give  100% color of fog.

  Wouldn't that be in contradiction with the documentation?

"If the intersection depth equals the fog distance the final color consists
of 64% of the object's color and 36% of the fog's color."

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Greg M  Johnson
Subject: Re: 3.1g & 3.5 bug report
Date: 7 Nov 2001 08:44:05
Message: <3BE93A30.705E85@aol.com>
Warp wrote:

> Greg M. Johnson <"gregj;-)56590\""@aol.c;-)om> wrote:
> : Distance=0 ought to be allowed, imho, and give  100% color of fog.
>
>   Wouldn't that be in contradiction with the documentation?
>
> "If the intersection depth equals the fog distance the final color consists
> of 64% of the object's color and 36% of the fog's color."

IIMSF,  I have no idea what that sentence is saying, but I can make sense of
the equation.
I think that the proposed change to the equation would give an intuitively
pleasing response to what you'd think of if the "visibility were zero" in a
fog.


Post a reply to this message

From: Warp
Subject: Re: 3.1g & 3.5 bug report
Date: 7 Nov 2001 09:17:49
Message: <3be9428d@news.povray.org>
Greg M. Johnson <"gregj56590[:-0]"@aol.com> wrote:
: I think that the proposed change to the equation would give an intuitively
: pleasing response to what you'd think of if the "visibility were zero" in a
: fog.

  I don't understand why is it so difficult to just write a 1e-10 instad
of 0.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Jérôme Grimbert
Subject: Re: 3.1g & 3.5 bug report
Date: 7 Nov 2001 11:45:02
Message: <3BE9655D.3B8AB190@atosorigin.com>
Warp wrote:
> 
> Greg M. Johnson <"gregj56590[:-0]"@aol.com> wrote:
> : I think that the proposed change to the equation would give an intuitively
> : pleasing response to what you'd think of if the "visibility were zero" in a
> : fog.
> 
>   I don't understand why is it so difficult to just write a 1e-10 instad
> of 0.

I agree. Stop tweaking formulae/equation, there is already enough bugs in
them already without adding 'pleasant kludge "because I want it to be 0"'.
Rather protect at parse time: if value is not strictly positive, reports Error
and stop parsing.

Or for the strange people which wants to play with negative fog (what is it, 
I do not know), protect only against 0.0 , if they are really to be pleased.


Post a reply to this message

From:
Subject: Re: 3.1g & 3.5 bug report
Date: 7 Nov 2001 11:54:26
Message: <7ipiut0f8vmn54ngkfub0af7crfhihu92e@4ax.com>
On Wed, 07 Nov 2001 17:46:21 +0100, J�r�me Grimbert
<jer### [at] atosorigincom> wrote:

> Or for the strange people which wants to play with negative fog (what is it, 
> I do not know), protect only against 0.0 , if they are really to be pleased.

I never meet such strange people however if it is not forbiden within formula
then I think there should be gate for negative values. Perhaps in the future
some artistic results could be achived with this. Just like not bounding bouding
object is used sometimes.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Bryan Valencia
Subject: Re: 3.1g & 3.5 bug report
Date: 4 Dec 2001 14:50:06
Message: <3C0D2931.86CA9560@209software.com>
If you want that, just go in paintshop pro and create a one color bitmap.  Why muck
around in POV for a 1 color bitmap?

"Greg M. Johnson" wrote:

> Distance=0 ought to be allowed, imho, and give  100% color of fog.
>
> Warp wrote:
>
> >   The most efficient solution is just to issue an error message if the
> > distance <= 0.
> >
> > --
> > #macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
> > rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
> > ],13),8)-3,10>#end blob{N(array[6]{11117333955,
> > 7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

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