POV-Ray : Newsgroups : povray.beta-test : the lowest pixel getting dimmed Server Time
30 Jul 2024 10:25:57 EDT (-0400)
  the lowest pixel getting dimmed (Message 13 to 22 of 22)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Rune
Subject: Re: the lowest pixel getting dimmed
Date: 23 Dec 2001 08:09:08
Message: <3c25d774@news.povray.org>
"Thorsten Froehlich" wrote:
> It hasn't been a problem for 15 years, so I would
> say it isn't a bug but standard behavior of POV-Ray.

It has been a problem for many, but maybe not big enough a problem for
anyone to make a patch to fix it.

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


Post a reply to this message

From: KalleK
Subject: Re: the lowest pixel getting dimmed
Date: 23 Dec 2001 09:02:47
Message: <3c25e407@news.povray.org>
> This is expected because now the transparency (for the alpha channel) it
> taking into account when doing anti-aliasing.

OK. :-)


Post a reply to this message

From: Anders K 
Subject: Re: the lowest pixel getting dimmed
Date: 27 Dec 2001 21:56:53
Message: <3c2bdf75$1@news.povray.org>
> > It hasn't been a problem for 15 years, so I would
> > say it isn't a bug but standard behavior of POV-Ray.

I disagree. By definition, the camera is supposed to be centered on the
look_at point, but it isn't. For most scenes, the half pixel doesn't matter
very much, but for things which require to-the-pixel accuracy, the current
behavior is *very* annoying. And a lot more scenes require this accuracy
than one would think at first glance. For an example, look no further than
Insert > Scene Templates > Orthographic Scene.

> It has been a problem for many, but maybe not big enough a problem for
> anyone to make a patch to fix it.

I actually described how to fix it for 3.1g. See my earlier thread, "Camera
is off by half a pixel".

Anders


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: the lowest pixel getting dimmed
Date: 28 Dec 2001 12:29:31
Message: <3c2cabfb@news.povray.org>
In article <3c2bdf75$1@news.povray.org> , "Anders K." 
<and### [at] prostard2gcom> wrote:

> I disagree. By definition, the camera is supposed to be centered on the
> look_at point, but it isn't. For most scenes, the half pixel doesn't matter
> very much, but for things which require to-the-pixel accuracy, the current

If you want it centered, one very simple solution is to add one pixel to the
width and height of the image.

> behavior is *very* annoying. And a lot more scenes require this accuracy
> than one would think at first glance. For an example, look no further than
> Insert > Scene Templates > Orthographic Scene.

I think orthographic camera scenes are the only place where this may matter
in a very few scenes.  Of course, the above solution will still work fine.

    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: Anders K 
Subject: Re: the lowest pixel getting dimmed
Date: 28 Dec 2001 15:01:58
Message: <3c2ccfb6$1@news.povray.org>
> If you want it centered, one very simple solution is to add one pixel to
the
> width and height of the image.

What if I don't want to add one pixel to the width and height of the image?
For example, one of my POV-Ray projects is creating a set of tiles for a 2D
game. There are hundreds of tiles, and they are rendered by a single file as
an animation. I don't want to have to go in manually with an image editor to
remove one row and column from every single image. Moving the camera works,
but then I need to change the amount I move it by every time I change the
size of the images, and I'm making two sizes of tiles (32x32 and 48x48).

> I think orthographic camera scenes are the only place where this may
matter
> in a very few scenes.  Of course, the above solution will still work fine.

That doesn't change the fact that the current behavior is simply incorrect,
and it is very easy to fix. I know you're probably worried about backwards
compatibility, but as you pointed out, it only makes a big difference on a
few scenes, and even on those scenes it would be much better to have the
camera in the right place anyway.

Anders

--
light_source{6#macro A(B)#declare C=mod(E B);#declare E=(E-C)/B;C#end
#macro B(E)#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{
-y 2}rotate<-1 0C+1>*90translate<D+1A(2)*2+1#end-2 13>finish{specular
1}pigment{red 1}}#end#end#end#local D=-8;1}B(445000298)B(519053970)B(
483402386)B(1445571258)B(77778740)B(541684549)B(42677491)B(70)


Post a reply to this message

From: Rune
Subject: Re: the lowest pixel getting dimmed
Date: 28 Dec 2001 17:27:57
Message: <3c2cf1ed@news.povray.org>
"Anders K." wrote:
> What if I don't want to add one pixel to the width
> and height of the image?

Yes, it's not always a useful solution.

Besides, it actually skews the aspect ratio slightly! ;)

> Moving the camera works, but then I need to change the
> amount I move it by every time I change the size of the
> images, and I'm making two sizes of tiles (32x32 and 48x48).

I've had the exact same problem every time I create logos, icons, cursors,
web graphics etc. It's rather annoying.

And I don't always use orthographic camera for that by the way.

> That doesn't change the fact that the current behavior
> is simply incorrect, and it is very easy to fix. I know
> you're probably worried about backwards compatibility,
> but as you pointed out, it only makes a big difference
> on a few scenes, and even on those scenes it would be
> much better to have the camera in the right place anyway.

I agree.

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


Post a reply to this message

From: Ron Parker
Subject: Re: the lowest pixel getting dimmed
Date: 28 Dec 2001 23:07:48
Message: <slrna2qgco.hao.ron.parker@fwi.com>
On Fri, 28 Dec 2001 15:02:26 -0500, Anders K. wrote:
> an animation. I don't want to have to go in manually with an image editor to
> remove one row and column from every single image. Moving the camera works,

For this was netpbm created.

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Anders K 
Subject: Re: the lowest pixel getting dimmed
Date: 29 Dec 2001 10:48:48
Message: <3c2de5e0$1@news.povray.org>
"Ron Parker" <ron### [at] povrayorg> wrote:
> For this was netpbm created.

Even if this worked, you shouldn't have to work around incorrect behavior.
However, adding one row and column doesn't even work: it scales everything
by <(w+1)/w, (h+1)/h>. And for camera types other than orthographic, moving
the camera doesn't work either, since objects closer to the camera would get
shifted more than objects farther away. Rotating the camera would skew the
whole image unpredictably. So there is no satisfactory workaround.

Anders

--
light_source{6#macro A(B)#declare C=mod(E B);#declare E=(E-C)/B;C#end
#macro B(E)#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{
-y 2}rotate<-1 0C+1>*90translate<D+1A(2)*2+1#end-2 13>finish{specular
1}pigment{red 1}}#end#end#end#local D=-8;1}B(445000298)B(519053970)B(
483402386)B(1445571258)B(77778740)B(541684549)B(42677491)B(70)


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: the lowest pixel getting dimmed
Date: 29 Dec 2001 12:29:50
Message: <3c2dfd8e@news.povray.org>
In article <3c2de5e0$1@news.povray.org> , "Anders K." 
<and### [at] prostard2gcom> wrote:

> However, adding one row and column doesn't even work: it scales everything
> by <(w+1)/w, (h+1)/h>. And for camera types other than orthographic, moving
> the camera doesn't work either, since objects closer to the camera would get
> shifted more than objects farther away. Rotating the camera would skew the
> whole image unpredictably. So there is no satisfactory workaround.

Actually, a quick look at the code suggests that your observation may not be
correct (but I never really cared about this part of the code before)...

    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: Anders K 
Subject: Re: the lowest pixel getting dimmed
Date: 29 Dec 2001 13:17:54
Message: <3c2e08d2@news.povray.org>
> > However, adding one row and column doesn't even work: it scales
everything
> > by <(w+1)/w, (h+1)/h>. And for camera types other than orthographic,
moving
> > the camera doesn't work either, since objects closer to the camera would
get
> > shifted more than objects farther away. Rotating the camera would skew
the
> > whole image unpredictably. So there is no satisfactory workaround.
>
> Actually, a quick look at the code suggests that your observation may not
be
> correct [...]...

How so?

Anders

--
light_source{6#macro A(B)#declare C=mod(E B);#declare E=(E-C)/B;C#end
#macro B(E)#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{
-y 2}rotate<-1 0C+1>*90translate<D+1A(2)*2+1#end-2 13>finish{specular
1}pigment{red 1}}#end#end#end#local D=-8;1}B(445000298)B(519053970)B(
483402386)B(1445571258)B(77778740)B(541684549)B(42677491)B(70)


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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