POV-Ray : Newsgroups : povray.general : Antialiasing before or after clipping... Server Time
3 Aug 2024 08:11:04 EDT (-0400)
  Antialiasing before or after clipping... (Message 71 to 80 of 102)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thorsten Froehlich
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 05:10:21
Message: <4134407d@news.povray.org>
In article <4133696d@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>   It will probably require changing the way POV-Ray handles the rendered
> image. It would need to be able to change previously traced pixels (which
> currently might already have been saved to the destination file) and
> pixels yet to be traced.

Nope, just trace a few (four perhaps) more pixels one pixel off in each
direction.  Would be slower, yes, but also simulate film more accurately.

    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: Warp
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 07:31:45
Message: <413461a1@news.povray.org>
Severi Salminen <sev### [at] not_thissibafi> wrote:
> Question is: should POV-Ray try to simulate an imperfect optical system? 

  POV-Ray is already doing that.
  Antialiasing brings the image closer to what a photograph would look like.
Why stop half-way?

-- 
#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: Warp
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 07:43:05
Message: <41346449@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> Nope, just trace a few (four perhaps) more pixels one pixel off in each
> direction.  Would be slower, yes, but also simulate film more accurately.

  That would be like a kind of blur which scales the samples taken from
outside the current pixel so that only very bright samples will have a
visible effect in the current pixel?

  However, that would not be enough. The brighter the object, the larger
the color bleed. You can't achieve that with just four extra rays. And
even if you used more rays, you would just get graininess, which is not
a nice artifact.

  A simple 2D processing of the pixels would get a nice result fast and
without artifacts, and will probably not look almost at all different
from a raytraced version where you send a million rays around the current
pixel.

-- 
#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: andrel
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 08:19:58
Message: <41346C73.6070705@hotmail.com>
Warp wrote:

> Severi Salminen <sev### [at] not_thissibafi> wrote:
> 
>>Question is: should POV-Ray try to simulate an imperfect optical system? 
> 
> 
>   POV-Ray is already doing that.
>   Antialiasing brings the image closer to what a photograph would look like.
> Why stop half-way?
Because everything in the current implementation can be performed on
a pixel by pixel base, without changing already computed pixels or
influencing things to come. Some solutions would require that
or require postprocessing. Adding a new switch to get old
behaviour begs the question on where that switch should be.
Do we want that on an object by object base or as a global switch.
Some solutions require a rather big extension to the SDL.
Perhaps adding a pointspread function is easiest to implement
because it is close to focal blur, perhaps not. I will let
the POV team decide.

My suggestion would be to wait a couple of weeks and see what
the POV team comes up with. They said that they were working
on it (or at least discussing), so there is no need anymore
for a discussion if a solution would be desirable.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 13:41:44
Message: <4134b858$1@news.povray.org>
Thorsten Froehlich wrote:

> In article <4133a71f$1@news.povray.org> , Tor Olav Kristensen 
> <tor### [at] TOBEREMOVEDhotmailcom>  wrote:
> 
> 
>>I suspect that the colour bleeding around the sun
>>in this photo is caused by inperfections in the
>>camera lens.
> 
> 
> Not necessarily  keep in mind that film also is not infinitely thin.  For
> color film the depth light has to penetrate to reach all three layers is
> about three times the films resolution.  And the light scatters in each
> layer as well.  This creates a natural blur effect at sharp light/dark
> transitions.  I.e. <http://mac.povray.org/rhein.jpg> is (a after two JPEG
> compressions) scan of a positive film and the resolution in the image is
> about 80 lines per millimeter*.  Looking at the two bell towers clearly
> shows a kind of blur. But, the sunlight entered at about a 30 degree angle,
> so even without refraction it did pass at least two pixels.  Add scattering
> and you get exactly the blur effect seen.
...

The sun covers about 0.5 degrees of our field of view:

http://www.google.com/search?q=2*atan%28radius+of+Sun%2FAstronomical+Unit%29+radians+in+degrees


A camera with 35mm film (36 mm x 24 mm) and a normal lens (50mm)
will have a field of view of about 40 degrees:

http://www.google.com/search?q=2*atan%2836%2F%282*50%29%29+radians+in+degrees


Now I assume that the CCD (or film) in the camera that shot the
picture that Warp gave a link to, covers the whole field of view
of the lens. I also assume that the image was shot with a 50 mm
lens and that the image has not been cropped.

http://www.students.tut.fi/~warp/photos/patikka2/35.jpg
(That image is 1136 pixels x 856 pixles.)

If these assumtions are correct, then the image has
1136 pixels / 40 degrees = 28 pixels/degree

This means that if there were no distortions in the atmosphere,
inside lens or inside the film, then the sun would cover about
28 pixels/degree * 0.5 degrees = 14 pixels.
(See http://home.online.no/~t-o-k/35_Sun.jpg)


The colour bleeding in the image extends somewhere between 77
pixels and 296 pixels from the center of the sun.
(See http://home.online.no/~t-o-k/35_Bleeding.jpg)

If we can agree that the colour bleeding in the image is more
than 200 pixels from the center of the sun, then it will follow
that the radius of the colour bleeding on the film is more than

200 pixels / 1136 pixels * 36 mm = 6.3 mm


I measured a piece of 35 mm film to be about 0.14 mm thick.

6.3 mm / 0.14 mm = 45.3

Now I cannot make myself believe that the internal scattering/
refraction/reflections in the layers of a such a film will
extend as far as 45 times the thickness of the film.

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 14:39:50
Message: <4134c5f6$1@news.povray.org>
In article <4134b858$1@news.povray.org> , Tor Olav Kristensen 
<tor### [at] TOBEREMOVEDhotmailcom>  wrote:

> A camera with 35mm film (36 mm x 24 mm) and a normal lens (50mm)
> will have a field of view of about 40 degrees:
>
> http://www.google.com/search?q=2*atan%2836%2F%282*50%29%29+radians+in+degrees
>
>
> Now I assume that the CCD (or film) in the camera that shot the
> picture that Warp gave a link to, covers the whole field of view
> of the lens.

This is (unless it is a really expensive pro digital camera that you can get
a small new car for) incorrect as CCDs are 1/2" or 3/4", which is much
smaller than film.  This is why you get a tele effect if you use an
inexpensive digital camera with the same lens you used for a film camera.

> I also assume that the image was shot with a 50 mm
> lens and that the image has not been cropped.

A lot of assumptions, aren't this?

> I measured a piece of 35 mm film to be about 0.14 mm thick.

Yes, this pretty much cuts it.

> 6.3 mm / 0.14 mm = 45.3
>
> Now I cannot make myself believe that the internal scattering/
> refraction/reflections in the layers of a such a film will
> extend as far as 45 times the thickness of the film.

Indeed, when overexposing with an extremely bright object like the sun it is
very likely other effects than film scattering will play an important role.
Certainly the lens, but also the atmosphere and even the camera interior
will scatter a real lot of sunlight.

    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: Thorsten Froehlich
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 14:42:03
Message: <4134c67b@news.povray.org>
In article <41346449@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

>   However, that would not be enough. The brighter the object, the larger
> the color bleed. You can't achieve that with just four extra rays.

Certainly not, but you can determine is there is anything very bright
nearby. This would be sufficient to solve the AA, without adding perfectly
realistic color bleeding of course.

    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: Rafal 'Raf256' Maj
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 14:44:01
Message: <Xns9556D3219E0E8raf256com@203.29.75.35>
tho### [at] trfde news:4134c67b@news.povray.org

> Certainly not, but you can determine is there is anything very bright
> nearby. This would be sufficient to solve the AA, without adding
> perfectly realistic color bleeding of course.

But I agree with Warp - postprocessing is only reasonable solutions, since 
other solutions will work severa time slower - because of recalculating 
previously rendered points several time, with is total waste of time IMHO

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Nicolas Calimet
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 16:09:16
Message: <4134daec$1@news.povray.org>
> (unless it is a really expensive pro digital camera that you can get
> a small new car for)

	You mean e.g. the C*n*n 1Ds ?  ;-)

> This is why you get a tele effect if you use an
> inexpensive digital camera with the same lens you used for a film camera.

	Be careful, purists would tell you this is not a "tele" effect
but simply a "crop" effect, as you don't change the caracteristics of
the lens by reducing the captor size.

	- NC


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Antialiasing before or after clipping...
Date: 31 Aug 2004 16:42:05
Message: <4134e29d@news.povray.org>
In article <4134daec$1@news.povray.org> , Nicolas Calimet 
<pov### [at] freefr>  wrote:

>> (unless it is a really expensive pro digital camera that you can get
>> a small new car for)
>
>  You mean e.g. the C*n*n 1Ds ?  ;-)

Except that it also only has a single CCD with 28.7 x 19.1 mm size.

>> This is why you get a tele effect if you use an
>> inexpensive digital camera with the same lens you used for a film camera.
>
>  Be careful, purists would tell you this is not a "tele" effect
> but simply a "crop" effect, as you don't change the caracteristics of
> the lens by reducing the captor size.

For the D1 it is called "Lens focal length conversion factor".  I guess this
is the marketing term for: "Engineering told management that a full-size CCD
sensor would be much more expensive".  Fact is that as with all ICs, for
CCDs the production error also increases with die size.  hence CCDs with
36*24 mm are rather expensive, but there are a few available these days
afaik.

    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

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

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