POV-Ray : Newsgroups : povray.general : Anti-aliasing option. Server Time
6 Aug 2024 06:22:38 EDT (-0400)
  Anti-aliasing option. (Message 5 to 14 of 14)  
<<< Previous 4 Messages Goto Initial 10 Messages
From: PoD
Subject: Re: Anti-aliasing option.
Date: 9 Jun 2002 10:32:19
Message: <3d0366f3@news.povray.org>
On Sun, 09 Jun 2002 00:50:12 +0930, John VanSickle wrote:

> PoD wrote:
>> 
>> On Sat, 08 Jun 2002 07:29:16 +0930, John VanSickle wrote:
>> 
>> > A number of times I find that I would like certain objects to be
>> > anti-aliased, but not the whole scene, or for some objects to be
>> > anti-aliased at a higher level than the rest of the scene.
>> >
>> > What would be the difficulty in programming anti-aliasing regions,
>> > such that any pixel whose ray was shot into the region would be
>> > anti-aliased at a certain level?   I picture syntax such as:
>> >
>> > antialias {
>> >   box { <-1,1,1>,<2,4,4> }
>> >   depth 3
>> >   precision .1
>> > }
>> > }
>> Technically feasible, I think but I suspect that the edges of the box
>> would often become visible as the antialiasing of the background would
>> change as well.
> 
> Well, if increasing the AA of the background changes the way it looks,
> then maybe that background should have AA as well.
> 
> Regards,
> John
 
But it defeats the purpose of localised AA somewhat if you use the same settings
for the background as for your (possibly small) object.
I'm not saying that it couldn't or shouldn't be done, just that I have a
gut feeling that it would not be useful very often.

PoD.


Post a reply to this message

From: PoD
Subject: Re: Anti-aliasing option.
Date: 9 Jun 2002 10:39:05
Message: <3d036889@news.povray.org>
On Sun, 09 Jun 2002 01:09:43 +0930, Apache wrote:

> Technically a really hard thing to do. If POV-Ray is going to do this,
> it should be able to trace the edges of objects on the screen. Try doing
> this with isosurfaces ;-)
> 
> --
> Apache
> POV-Ray Cloth experiments: http://geitenkaas.dns2go.com/experiments/
> Email: apa### [at] yahoocom
> ICQ: 146690431
 
I don't think it would be that hard.  It's not a matter of detecting
edges of objects, just detecting that a ray has hit a bounding type
object and changing the AA settings.

PoD.


Post a reply to this message

From: Warp
Subject: Re: Anti-aliasing option.
Date: 9 Jun 2002 12:10:55
Message: <3d037e0e@news.povray.org>
PoD <pod### [at] internodeonnet> wrote:
> I don't think it would be that hard.  It's not a matter of detecting
> edges of objects, just detecting that a ray has hit a bounding type
> object and changing the AA settings.

  I think that it would require that if the ray hits the object which has
to be antialieased for the first time in the current line, we have to go
back one pixel and render it again antialiased.
  And thinking about it, it would also require rendering the same pixel in the
previous line again the first time we hit the object vertically.

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


Post a reply to this message

From: Hermann Vosseler
Subject: Re: Anti-aliasing option.
Date: 9 Jun 2002 13:51:16
Message: <3D039344.2010206@web.de>
John VanSickle wrote:
 > What would be the difficulty in programming anti-aliasing regions, 
such that
 > any pixel whose ray was shot into the region would be anti-aliased at a
 > certain level?   I picture syntax such as:
 >
 > antialias {
 >   box { <-1,1,1>,<2,4,4> }
 >   depth 3
 >   precision .1
 > }

Warp wrote:
>   I think that it would require that if the ray hits the object which has
> to be antialieased for the first time in the current line, we have to go
> back one pixel and render it again antialiased.
>   And thinking about it, it would also require rendering the same pixel in the
> previous line again the first time we hit the object vertically.
> 

If we realy wanted such a feature, wouldn't it be better to define
it based on pixel rows/columns, analogous to the "partial render"
feature alredy found in POV?
And then, of course, there could be a preprocessing step
to derive the columns/rows of the bounding box of a given object.

Hermann Vosseler


Post a reply to this message

From: Warp
Subject: Re: Anti-aliasing option.
Date: 9 Jun 2002 14:02:33
Message: <3d039839@news.povray.org>
Yes, I think that this kind of selective antialiasing would need
a 2-pass approach: The first pass would be a regular rendering with 
no antialiasing, which marks pixels as "this pixel and its surrounding
pixels need to be antialiased" and "this pixel is not antialiased".
The second pass would raytrace the required pixels antialiased.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Rune
Subject: Re: Anti-aliasing option.
Date: 9 Jun 2002 14:47:32
Message: <3d03a2c4@news.povray.org>
PoD wrote:
> But it defeats the purpose of localised AA somewhat
> if you use the same settings for the background as
> for your (possibly small) object.

First, it would not always be the case that the background would even
require any AA at all. With soft backgrounds I think that object
specific AA could work pretty seamlessly.

Second, if a little AA was required for the background too, there can
still be a huge difference between low-quality AA and high-quality AA.

I think object-specific AA could work well. The biggest problem as I see
it would be to make bounding objects that were tight enough so that not
too many calculations are wasted...

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


Post a reply to this message

From: John VanSickle
Subject: Re: Anti-aliasing option.
Date: 9 Jun 2002 15:02:12
Message: <3D03A630.9BDD818A@hotmail.com>
Rune wrote:
> 
> I think object-specific AA could work well. The biggest problem as I
> see it would be to make bounding objects that were tight enough so
> that not too many calculations are wasted...

Which is why the user would have to specify a specific aa-bound;
that way the user could be precise in selecting the areas that need
it; he could even select a portion of the object, if it were just
that one portion that was the problem.

Regards,
John


Post a reply to this message

From: John VanSickle
Subject: Re: Anti-aliasing option.
Date: 9 Jun 2002 15:06:18
Message: <3D03A729.E6E3D740@hotmail.com>
Apache wrote:
> 
> Technically a really hard thing to do.
> If POV-Ray is going to do this, it should be able to trace the edges
> of objects on the screen. Try doing this with isosurfaces ;-)

There is no need to trace the edges.  It merely tests to see if the
bounding object covers the pixel currently being traced.  POV-Ray
already uses bounding objects heavily.  If so, the *pixel* is anti-
aliased at a higher level.

Regards,
John


Post a reply to this message

From: John VanSickle
Subject: Re: Anti-aliasing option.
Date: 9 Jun 2002 15:08:14
Message: <3D03A79D.C63D801E@hotmail.com>
Warp wrote:
> 
>   I think that it would require that if the ray hits the object
> which has to be antialieased for the first time in the current line,
> we have to go back one pixel and render it again antialiased.
> And thinking about it, it would also require rendering the same pixel
> in the previous line again the first time we hit the object
> vertically.

This would be an issue with sampling method 2.  Sampling method 1
doesn't worry as much about neighboring pixels.

Regards,
John


Post a reply to this message

From: Hermann Voßeler
Subject: Re: Anti-aliasing option.
Date: 10 Jun 2002 16:31:21
Message: <3D050A47.8090801@webcon.de>
> Warp wrote:
>>  I think that it would require that if the ray hits the object
>>which has to be antialieased for the first time in the current line,
>>we have to go back one pixel and render it again antialiased.
>>And thinking about it, it would also require rendering the same pixel
>>in the previous line again the first time we hit the object
>>vertically.

John VanSickle wrote:
> This would be an issue with sampling method 2.  Sampling method 1
> doesn't worry as much about neighboring pixels.

No, to the contrary: method 1 has to go back if it detects a need of AA.
method 2 always keeps the current and the last generation of pixels
(of a square) and thus is always prepared for kicking in the AA.


Regards,
Hermann


Post a reply to this message

<<< Previous 4 Messages Goto Initial 10 Messages

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