POV-Ray : Newsgroups : povray.beta-test.binaries : Re: problem with anti-aliasing? Server Time
31 Oct 2024 19:37:01 EDT (-0400)
  Re: problem with anti-aliasing? (Message 1 to 5 of 5)  
From: Bill Brehm
Subject: Re: problem with anti-aliasing?
Date: 21 Feb 2002 03:39:15
Message: <3c74b233@news.povray.org>
Hi,

I forgot to mention that when I rendered the file in both 3.1 and 3.5.11
with anti-aliasing turned off, the two images are almost (but not exactly)
identical. I don't think I need to upload those images, unless someone asks.

Bill

"Bill Brehm" <bbr### [at] netzeronet> wrote in message
news:3c739448@news.povray.org...
> Hi,
>
> I rendered the same image with 3.1 and 3.5.11. The image from 3.5 looks
like
> something is wrong with the anti-aliasing. Or has something changed that
I'm
> not aware of that affects the image?
>
> The file:
>
> //
> // Persistence Of Vision
> // Synthetic Fiducial for Matrox and
> //
>
> #version 3.1
> global_settings { assumed_gamma 2.2 }
> global_settings { ambient_light 0.1 }
>
> #include "colors.inc"
> #include "textures.inc"
>
> background { color SteelBlue }
>
> #declare Tiny = 0.001;
>
> // Lighting declarations
>
> #declare ledoffset = .125;
>
> #declare ringleds = 60;
> #declare ringlightdiameter = 5.5;
> #declare ringlightdiffuserthickness = 5/32;
> #declare ringlightthickness = 0.5;
> #declare ringlightheight = 0.25;
>
> #declare onaxisledsx = 8;
> #declare onaxisledsy = 8;
> #declare onaxissizex = 4.620998;
> #declare onaxissizey = 4.620998;
> #declare onaxisdiffuserthickness = 0.125;
>
> #declare Led = light_source{
>   <0,0,0>
>   color White * 0.05
>   /*looks_like {
>     union {
>       sphere{ <0,0,0>, 0.09375}
>       cylinder{ <0,0,0>, <0,-0.25,0> 0.09375}
>     }
>     pigment {color Red}
>   }*/
> }
>
> #declare RingDiffuser = difference {
>   cylinder {
>     <0, 0, -ringlightthickness / 2>,
>     <0, 0, ringlightthickness / 2>,
>     ringlightdiameter / 2
>   }
>   cylinder {
>     <0, 0, -ringlightthickness / 2 - 0.001>,
>     <0, 0, ringlightthickness / 2 + 0.001>,
>     (ringlightdiameter - ringlightdiffuserthickness) / 2
>   }
>   texture {
>     Glass3
>     pigment { rgbf <1, 1, 1, 0.5> }
>   }
> }
>
> #declare RingLight = union {
>   #local Count = 0;
>   #while(Count < ringleds)
>     object { Led rotate <0, 0, 90> translate <(ringlightdiameter/2 +
> ledoffset), 0, 0> rotate <0, 0, (360/ringleds * Count)>}
>     #local Count = Count + 1;
>   #end
>
>   object {RingDiffuser}
> }
>
> #declare OnAxisDiffuser = box {
>   <-onaxissizex / 2, -onaxissizey / 2, 0>,
>   <onaxissizex / 2, onaxissizey / 2, -onaxisdiffuserthickness>
>   texture {
>     Glass3
>     pigment { rgbf <1, 1, 1, 0.5> }
>   }
> }
>
> #declare OnAxisLight = union {
>   #local XCount = 0;
>   #while(XCount < onaxisledsx)
>     #local YCount = 0;
>     #while(YCount < onaxisledsy)
>       #local xposition = (XCount - (onaxisledsx - 1) / 2) * (onaxissizex /
> onaxisledsx);
>       #local yposition = (YCount - (onaxisledsy - 1) / 2) * (onaxissizey /
> onaxisledsy);
>       #local zposition = -ledoffset;
>
>       object { Led rotate <90, 0, 0> translate <xposition, yposition,
> zposition> }
>       #local YCount = YCount + 1;
>     #end
>     #local XCount = XCount + 1;
>   #end
>
>   object {OnAxisDiffuser}
> }
>
> // Size of Strip
> #declare StripL = 4.8;
> #declare StripW = 3.55;
>
> // Center of Strip is bottom center
> // Strip length is in Y axis in Z plane, ie at the position it would be
> loaded
>
> // Body is the Dark Green Plastic Bit
> #local StripBodyL = StripL;
> #local StripBodyW = StripW;
> #local StripBodyH = 1.000;
> #local StripMaskH = 0.050;
>
> #local StripBodyTexture =
>   texture {
>     pigment { color red 0.18 green 0.27 blue 0.30 }
> //    finish  { Phong_Glossy }
>   }
>
> #local StripMaskTexture =
>   texture {
>     pigment { color red 0.18 green 0.27 blue 0.30 }
>     finish  { Phong_Glossy }
>   }
>
> #local StripBody = box {
>   <-StripBodyL/2, -StripBodyW/2, StripBodyH>,
>   <StripBodyL/2, StripBodyW/2, 0>
>   texture {
>     StripBodyTexture
>   }
> }
>
> #local StripMask = box {
>   <-StripBodyL/2, -StripBodyW/2, 0>,
>   <StripBodyL/2, StripBodyW/2, -StripMaskH>
>   texture {
>     StripMaskTexture
>   }
> }
>
> // Fiducial constants [mm]
> #local StripFiducialThickness = 0.050;
>
> #local StripFiducialDiameter = 1.000;
> #local StripFiducialStreetWidth = 0.125 * StripFiducialDiameter;
> #local StripFiducialClearance = 0.400;
>
> #local StripFiducialTexture = texture {Gold_Metal}
>
> // Round crosshair fiducial declaration
>
> #local StripFiducial = difference {
>   cylinder {
>     <0, 0, 0>
>     <0, 0, -StripFiducialThickness>
>     StripFiducialDiameter / 2
>   }
>   box {
>     <-StripFiducialDiameter / 2 - Tiny, StripFiducialStreetWidth /
> 2, -StripFiducialThickness - Tiny>
>     <StripFiducialDiameter / 2 + Tiny, -StripFiducialStreetWidth / 2,
Tiny>
>   }
>   box {
>     <StripFiducialStreetWidth / 2, -StripFiducialDiameter / 2 -
> Tiny, -StripFiducialThickness - Tiny>
>     <-StripFiducialStreetWidth / 2, StripFiducialDiameter / 2 + Tiny,
Tiny>
>   }
>   texture {StripFiducialTexture}
> }
>
> // Camera declaration and instantiation
>
> /*#declare lens_dist = function(x, y, z, a, b) {
>    (x + a * x * sqrt(x*x + y*y) + b * x^3 * sqrt(x*x + y*y) ) ^ 2 +
>    (y + a * y * sqrt(x*x + y*y) + b * y^3 * sqrt(x*x + y*y) ) ^ 2
> } */
>
> #declare a_factor = 0.65;
> #declare b_factor = 0.1;
>
> #declare HFOV = 5.00;
> #declare VFOV = HFOV * 3 / 4;
>
> #declare cameraheight = 10.000;
>
> camera {
>   orthographic
>   location <0, 0, 0>
>   right <HFOV, 0, 0>
>   up <0, VFOV, 0>
>   sky <0, 1, 0>
>   direction <0, 0, cameraheight>
>   look_at <0, 0, 1>
>   translate <0, 0, -cameraheight>
> }
>
> #local ArrayMax = 121;
> #local XPos = array[ArrayMax]
> #local YPos = array[ArrayMax]
> #local Scale = array[ArrayMax]
> #local Rotate = array[ArrayMax]
> #local XPos[0] = 0.0;           // force arrays to be floats
> #local YPos[0] = 0.0;
> #local Scale[0] = 0.0;
> #local Rotate[0] = 0.0;
>
> // Lighting and device instantiations
>
> // Note: lighting is defined in inches and the strip is defined in
> millimeters
>
> //object {RingLight translate (<0, 0, -(ringlightthickness / 2 +
> ringlightheight)>)}
> object {OnAxisLight translate (<0, 0, -20>)}
>
> //sphere {<0, 0, 0> 0.1 pigment {Red}}
>
> #local i = int(clock * ArrayMax + 0.5);
>
> #declare Strip = difference {
>   union {
>     object {StripBody }
>     difference {    // !!! fix this
>       object {StripMask }
>       cylinder {
>         <0, 0, Tiny>
>         <0, 0, -StripMaskH - Tiny>
>         (StripFiducialDiameter + StripFiducialClearance) / 2
>         //translate StripFiducialPosition
>       }
>     }
>     object {StripFiducial scale <Scale[i], Scale[i], 1> rotate <0, 0,
> Rotate[i]> translate <XPos[i], YPos[i], 0>}
>   }
> }
>
> object {Strip}
>
> The local ini file:
>
> ;Initial_Frame = 1
> ;Final_Frame = 121
> ;Subset_Start_Frame = 1
> ;Subset_End_Frame = 1
> ;Cyclic_Animation = True
> ;Quality = 2
>
> Antialias = on
> Sampling_Method = 2
> Antialias_Depth = 4
> ;Antialias_Threshold = 0.3
> Jitter = off
>
> Both renders were set to 640x480 AA 0.3.
>
> Thanks,
>
> Bill
>
>
>
>
>
>
>
>
>


Post a reply to this message

From: Anders K 
Subject: Re: problem with anti-aliasing?
Date: 21 Feb 2002 18:14:48
Message: <3c757f68$1@news.povray.org>
You may want to know that in previous versions of POV-Ray (including 3.1g),
the entire image was erroneously shifted by half a pixel up and right. This
was corrected in 3.5 beta 11. This could be part of your "problem".

Anders

--
light_source{6#local D#macro B(E)#macro A(D)#declare#declare C=mod(E
D);E=(E-C)/D;C#end#while(E)#if(A(8)=7)#declare D=D+2.8;#else#if(C<3)
}cylinder{0(C=<1 2>).2translate<D+C*A(2)A(4)#else}intersection{torus
{1 .2}box{-2y}rotate<1 0C>*90translate<D+1A(2)*2+1#end-2 13>pigment{
rgb x}finish{specular 1}#end#end#end=-8;1B(445000298)B(519053970)B(
483402386)B(1445571258)B(77778740)B(541684549)B(42677491)B(70)}


Post a reply to this message

From: Bill Brehm
Subject: Re: problem with anti-aliasing?
Date: 21 Feb 2002 18:31:38
Message: <3c75835a$1@news.povray.org>
That's odd, because the object rendered in 3.1 with AA is placed exactly at
0, 0 and the camera is looking at 0, 0 and the object is rendered quite
symetrically. Notice the cross at the center of the circle; the pixel colors
representing where the edge lies seem equally bright both left and right,
and top and bottom.

The thing I'm referring to is that those same edges are very rough and
ragged looking in 3.5.11, but smooth looking in 3.1. Actually, it's not just
the edges, but the black material is less uniformly colored in 3.5.11 and
maybe that's affecting the edge with the yellow material. In fact, the whole
image looks a little bit blurry or softened in 3.1, but quite a bit sharper
in 3.5.11.

So I'm thinking that could be a change in the anti-aliasing, but maybe it's
something else too. (like a different aperature, but I don't have focal
blurring intentionally turned on or off).

Bill


"Anders K." <and### [at] prostard2gcom> wrote in message
news:3c757f68$1@news.povray.org...
> You may want to know that in previous versions of POV-Ray (including
3.1g),
> the entire image was erroneously shifted by half a pixel up and right.
This
> was corrected in 3.5 beta 11. This could be part of your "problem".
>
> Anders
>
> --
> light_source{6#local D#macro B(E)#macro A(D)#declare#declare C=mod(E
> D);E=(E-C)/D;C#end#while(E)#if(A(8)=7)#declare D=D+2.8;#else#if(C<3)
> }cylinder{0(C=<1 2>).2translate<D+C*A(2)A(4)#else}intersection{torus
> {1 .2}box{-2y}rotate<1 0C>*90translate<D+1A(2)*2+1#end-2 13>pigment{
> rgb x}finish{specular 1}#end#end#end=-8;1B(445000298)B(519053970)B(
> 483402386)B(1445571258)B(77778740)B(541684549)B(42677491)B(70)}
>
>
>
>


Post a reply to this message

From: Anders K 
Subject: Re: problem with anti-aliasing?
Date: 21 Feb 2002 20:20:02
Message: <3c759cc2$1@news.povray.org>
> That's odd, because the object rendered in 3.1 with AA is placed exactly
at
> 0, 0 and the camera is looking at 0, 0 and the object is rendered quite
> symetrically. Notice the cross at the center of the circle; the pixel
colors
> representing where the edge lies seem equally bright both left and right,
> and top and bottom.

This is because the object is exactly centered at (320.5, 239.5), which is
the center of pixel (320, 239). So it will look symmetrical, but it's
centered around the wrong place.

In fact, the 3.5 beta 11 image is also centered at (320.5, 239.5). Did you
set #version to 3.1? That would disable the half-pixel bug fix.

Anders


Post a reply to this message

From: Bill Brehm
Subject: Re: problem with anti-aliasing?
Date: 22 Feb 2002 01:10:45
Message: <3c75e0e5@news.povray.org>
I discovered that the reason is that the anti-aliasing parameters are not
being read the same way in 3.1 and 3.5.11. Maybe it's a bug and maybe it's
intentional. I'll describe it.

For some special purposes, I had added entries in the quickres.ini file. The
first entry below is a standard and the second is what I set up.

[640x480, AA 0.3]
Width=640
Height=480
Antialias=On
Antialias_Threshold=0.3

[768x494, AA 0.3]
Width=768
Height=494
Antialias=On
Sampling_Method=2
Antialias_Depth=4
Antialias_Threshold=0.3

This "bug" was detected at 640x480, but was solved at 768x494. So I looked
deeper.

I have a povray.ini file in the same directory as the fiducial.pov source
file. It also specifies the additional anti-aliasing parameters. 3.1 reads
that file, but 3.5.11 does not. I renamed the file to fiducial.ini; neither
version read it. (This would be what I would prefer to work in both cases,
since I can have more than one .pov in a directory and not force them the
share the same povray.ini file. I don't like having to render the .ini
file.) I added the fiducial.pov name into the .ini file and rendered the
.ini file. 3.5.11 worked and 3.1 complained. I added Input_File_Name =
fiducial.pov into the .ini file, and rendered the .ini file and both
versions work. Of course the bad thing is I have to keep the .ini file open
in the editor and remember to switch from the .pov file to the .ini file
before pressing RUN. That's why I'd prefer that when rendering name.pov, the
renderer looked for name.ini to find any additional parameters.

At any rate, that's what happens. Is this a bug or it is an intentional "new
feature"?

Bill



"Anders K." <and### [at] prostard2gcom> wrote in message
news:3c759cc2$1@news.povray.org...
> > That's odd, because the object rendered in 3.1 with AA is placed exactly
> at
> > 0, 0 and the camera is looking at 0, 0 and the object is rendered quite
> > symetrically. Notice the cross at the center of the circle; the pixel
> colors
> > representing where the edge lies seem equally bright both left and
right,
> > and top and bottom.
>
> This is because the object is exactly centered at (320.5, 239.5), which is
> the center of pixel (320, 239). So it will look symmetrical, but it's
> centered around the wrong place.
>
> In fact, the 3.5 beta 11 image is also centered at (320.5, 239.5). Did you
> set #version to 3.1? That would disable the half-pixel bug fix.
>
> Anders
>
>
>


Post a reply to this message

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