POV-Ray : Newsgroups : povray.general : Antialiasing before or after clipping... Server Time
3 Aug 2024 08:15:33 EDT (-0400)
  Antialiasing before or after clipping... (Message 33 to 42 of 102)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thorsten Froehlich
Subject: Re: Antialiasing before or after clipping...
Date: 27 Aug 2004 17:38:29
Message: <412fa9d5@news.povray.org>
In article <412f9568@news.povray.org> , "Slime" <fak### [at] emailaddress> wrote:

>> It is a clear correction to previously incorrect behavior.  Previously
>> POV-Ray was broken, it no longer is.
>
> The previous behavior was correct; the current behavior is broken.

That may well be your opinion, but that does not make you statement correct.
Prior to POV-Ray 3.6 what you got when using anti-aliasing was a fancy
averaged blur of every pixel, not different from scaling down an image
rendered without anti-aliasing.  That is not all what anti-aliasing is
about.  This certainly is a nice side effect of an incorrect implementation.

In reality small bright objects do not disappear, ever.  To the contrary.

If you want this behavior, render with twice the resolution and scale down
using some fancy algorithm in your favorite image editing program.  That
gets you the effect you so much desire, no matter how incorrect it is.

Either way, I suggest to end this fruitless discussion.  POV-Ray will not be
damaged the way you ask, no matter how much noise you produce.  The decision
stands as is because it corrects a bug.  If you do not like this correction,
you are free to continue to use POV-Ray 3.5.  Nobody is forcing you to use
POV-Ray 3.6 after all.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Slime
Subject: Re: Antialiasing before or after clipping...
Date: 27 Aug 2004 17:39:35
Message: <412faa17@news.povray.org>
> I think I agree with Thorsten and Christoph that 3.6 behaviour is
> mathematically correct and that 3.5 had a bug/feature.

I admit that a part of me agrees that the clipping is kind of an ugly,
non-mathematically-correct thing to do. But the fact is that it must be done
at some point when the image formats that we're outputting to require it. I
do like the idea of not clipping until just before output because in a way
it *feels* like the right thing to do - not introducing the limitation until
it's actually necessary.

Nonetheless, this "feeling" that clipping before sampling is kind of ugly is
not entirely relevant. I've "felt" a lot in the past that my mathematical
results were right or wrong, and I've often been incorrect.

Clipping *at all* is mathematically incorrect. If a sphere has color rgb 10,
then values of 10 should be written to the output. But obviously that can't
be done if the output format doesn't support it.

So we have to live with the clipping one way or another. We have, at the
point of admitting this, already introduced a certain level of mathematical
incorrectness. Our goal should be to do it in the most useful way.

I have seen no evidence that clipping after averaging samples is any more
"mathematically correct" than clipping beforehand. As I just said, both ways
are slightly incorrect, but we have no choice, we must clip at some point.
What I'm saying now is that there is no evidence that I've seen that one way
is *more correct* than the other.

However, I have seen evidence that clipping after averaging is much less
useful.

If anyone has a concrete reason why clipping after averaging is more
mathematically correct, I'm open to hearing it. If one has already been
mentioned, please point me to it. But I don't believe I have seen a concrete
reason.

In summary, my argument here is that neither method is more mathematically
correct than the other, but the 3.5 method was most certainly more useful.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Rune
Subject: Re: Antialiasing before or after clipping...
Date: 27 Aug 2004 17:45:02
Message: <412fab5e@news.povray.org>
Christoph Hormann wrote:
> I explained the quite in depth in my previous replies.  If anything is
> unclear about what i wrote please ask.

Well, you've said a lot of things, and it's difficult for me to know what
exactly is the core of the problem, but I suppose I just need to take it
quote by quote.

> That is not quite correct, POV-Ray 3.6 had clipping/gamma correction
> before antialiasing with non-adaptive aa (which contained a bug causing
> trouble with gamma correction).  3.6.1 fixed this bug by moving the
> clipping to the very end of the whole process

Gamma correction needed to be moved to after the AA, but it is not clear
here why clipping needed to be moved to after AA too.

> Since it is very common (and will become even more common with HDR
> output) to post process these tone mapping effects applying them
> before the antialiasing step is not always an option.

Why is it not an option to clip to the 0-1 range prior to AA in those cases
where the output format is also restricted to the 0-1 range?

> You have failed to bring up any arguments why applying tone
> mapping before antialiasing is more consistent than doing it before file
writing.

You write tone mapping here, but tone mapping is many things as you've
explained yourself. I have never said that *all* tone mapping should be done
prior to AA, only that clipping to the same range as the output format
supports (which may be infinity) should be done before AA. And my argument
for doing this is to avoid the jagged edges. What was your counter-argument
again?

> That's right if you use gamma correction purely for the purpose it is
> intended for (i.e. for compensating the monitor gamma).  A lot of people
> however use it for artistic purposes just like the clipping.

Do you mean that support for incorrect use of gamma correction has higher
priority than the possibility of using bright objects without getting jagged
edges?

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Slime
Subject: Re: Antialiasing before or after clipping...
Date: 27 Aug 2004 17:46:32
Message: <412fabb8@news.povray.org>
> That's right if you use gamma correction purely for the purpose it is
> intended for (i.e. for compensating the monitor gamma).  A lot of people
> however use it for artistic purposes just like the clipping.

As Rune pointed out, if people are using gamma correction for reasons other
than gamma correction, then they're using the wrong tool for the job and
should not be surprised if it doesn't have the correct effect.

If someone wants to create an artistic effect that changes the values of
colors that the camera sees, then they should do this in their scene file.
One way would be to place an object in front of the camera which somehow
filters the color values.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Slime
Subject: Re: Antialiasing before or after clipping...
Date: 27 Aug 2004 18:18:33
Message: <412fb339@news.povray.org>
> > The previous behavior was correct; the current behavior is broken.
>
> That may well be your opinion, but that does not make you statement
correct.

Of course not, which is why I added many paragraphs after that statement to
show why it was correct. It was merely my thesis. =)

> That may well be your opinion, but that does not make you statement
correct.
> Prior to POV-Ray 3.6 what you got when using anti-aliasing was a fancy
> averaged blur of every pixel, not different from scaling down an image
> rendered without anti-aliasing.  That is not all what anti-aliasing is
> about.

I agree that the method through which antialiasing is applied isn't
relevant - whether it's created by rendering a large image and scaling it
down, or through any other method. What *is* relevant is the effect.
Anti-aliasing is, by definition (and by the meaning of the word itself), an
effect to remove aliasing. POV-Ray 3.6's anti-aliasing does not remove
aliasing. Why then is it even called anti-aliasing? It's not doing its job.

> In reality small bright objects do not disappear, ever.  To the contrary.

I wish I understood more about how the human eye works so that I could
better respond to that statement. However, it is important to recognize
that, in the case of stars, a large part of the fact that we can see them is
due to light scattering through the atmosphere as it reaches our eyes. I'm
not sure exactly how tiny the average star would be, but it's probably
smaller than it actually appears. Some stars *are* so far away that the
human eye can't see them. This is probably due to the fact that there is a
limit to the number of photons travelling away from the stars, and with
stars that are far away enough the chances of some of those photons hitting
our eyes is tiny. But all of this has to do with effects that POV-Ray does
not, by default, simulate. Scattering media could be used to make tiny
distant light sources with tiny bright looks_like spheres visible, thus
recreating the appearance of actual stars in the real world. I'm willing to
bet that, if our eyes had resolution comparable to 1024x768, and there were
a really tiny bright object very far away, unaffected by things like light
scattering, we wouldn't be able to see it - no matter how sophisticated our
brain's "anti-aliasing" might be. I think it's very likely that the only
reason we can see far away bright objects is because our eyes have a very
high resolution. Not that our eyes can really be compared to a monitor in
such a simple way.

My point here is that the fact that small bright objects are visible in real
life has nothing to do with samples of light being averaged together, one of
which is much brighter than the others. It's due to a number of other
factors, and POV-Ray 3.6's anti-aliasing is a poor attempt at simulating
those factors with a single calculation.

It could also be pointed out that even with POV-Ray 3.6's antialiasing, many
small bright objects *do* disappear: those which are not hit by the primary
rays, so that supersampling does not occur. 3.6's attempt at simulating the
visibility of distant bright objects is therefore not even very accurate,
and people have to create an exceedingly high number of tiny bright spots in
order to make a much smaller number of pixels white to simulate stars.

None of this addresses the fact that the anti-aliasing is there to remove
aliasing, and not to make tiny bright objects visible. That's not its job.
Its job is to remove aliasing, and it's not doing that.

By the way: tiny, *not* bright objects never disappear either. But they are
not visible in any renderer's output.

> Either way, I suggest to end this fruitless discussion.

You only see the discussion as fruitless because you believe that you are
correct and the people making the "noise" are incorrect. If this discussion
is more than a matter of opinion - that is, if it is based on what is
"correct" and what is "incorrect" - then there is no reason for it to end
until everyone understands what is correct and why. I *am* influenced by log
ic, and if I am presented with a flawless argument that shows me that I am
incorrect, I will stand corrected. I trust you feel the same.

> The decision
> stands as is because it corrects a bug.

I have not seen any evidence that 3.5's anti-aliasing was buggy. It did its
job. If there was a bug with it, then there must be a concrete explanation
for that bug, beyond "it was incorrect." *Why* was it incorrect? As I've
shown, "because it didn't show tiny bright objects" is not an entirely valid
reason. However, "because it doesn't remove aliasing" seems like a very good
reason why 3.6's anti-aliasing is incorrect.

> If you do not like this correction,
> you are free to continue to use POV-Ray 3.5.  Nobody is forcing you to use
> POV-Ray 3.6 after all.

I only argue this point because I want POV-Ray to be the best it can; it is
not for any personal agenda.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Nicolas Calimet
Subject: Re: Antialiasing before or after clipping...
Date: 27 Aug 2004 18:28:06
Message: <412fb576$1@news.povray.org>
> I may
> post a small patch to 3.6.1 which re-enables antialiasing method 2 together
> with focal-blur

	The patch is ready and working -- was actually quite easy to port it
from 3.1g to 3.6.1.  However, before publishing I'd like to investigate
something which relates to adaptive antialiasing (method 2) alone, i.e.
w/o using focal blur.
	I'll try to post something, including linux/windows binaries, over
the week-end.

	- NC


Post a reply to this message

From: Eli
Subject: Re: Antialiasing before or after clipping...
Date: 27 Aug 2004 22:29:10
Message: <412fedf6$1@news.povray.org>
I hardly use the built-in antialiasing. I use the focal blur trick instead, 
although it doesn't work if the aperture is too small.


Post a reply to this message

From: Eli
Subject: Re: Antialiasing before or after clipping...
Date: 27 Aug 2004 22:35:48
Message: <412fef84$1@news.povray.org>
Sounds weird to me that the atmosphere scattering photons causes us to see 
stars that would be invisible otherwise. The atmosphere merely blurs 
providing it reaches our retinas.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Antialiasing before or after clipping...
Date: 28 Aug 2004 04:00:25
Message: <41303b99@news.povray.org>
In article <412fef84$1@news.povray.org> , "Eli" <eli### [at] jehoelnet> wrote:

> Sounds weird to me that the atmosphere scattering photons causes us to see
> stars that would be invisible otherwise. The atmosphere merely blurs
> providing it reaches our retinas.

The ability of the human eye or a real camera to see infinitely small but
very bright objects has nothing to do the atmosphere.  It has to do with
sampling an area compared to sampling points.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: andrel
Subject: Re: Antialiasing before or after clipping...
Date: 28 Aug 2004 05:51:05
Message: <4130553E.3010701@hotmail.com>
Eli wrote:

> Sounds weird to me that the atmosphere scattering photons causes us to see 
> stars that would be invisible otherwise. The atmosphere merely blurs 
> providing it reaches our retinas. 
> 
Correct, astronauts do see stars.

The human eye is able to detect a single photons (if adapted
to darkness). Starlight of the faintest stars is single photons just
often enough to see them.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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