POV-Ray : Newsgroups : povray.beta-test : Philosophical objection to fog distance=0 Server Time
30 Jul 2024 16:14:12 EDT (-0400)
  Philosophical objection to fog distance=0 (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
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>


> 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>

<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

<<< Previous 10 Messages Goto Initial 10 Messages

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