POV-Ray : Newsgroups : povray.general : How are pixels colored off in POV? : Re: How are pixels colored off in POV? Server Time
1 Aug 2024 18:20:59 EDT (-0400)
  Re: How are pixels colored off in POV?  
From: Slime
Date: 9 Jun 2005 23:05:47
Message: <42a9038b$1@news.povray.org>
> I get the feeling that you don't really understand how raytracing works.
> POV-Ray shoots a ray from the camera location for every pixel.  That ray
will
> hit zero or more objects, but since it's an infinitely thin ray, it can
not ever
> half-hit an object.


I'd just like to reiterate this in a little more detail. You seem to believe
that POV-Ray takes the objects in your scene and projects them onto the
image one at a time. However, what actually happens is that for each *pixel*
in the scene, a "ray" is shot into the scene, and it is determined what
object the ray collides with. If there is no object in that direction, the
background color is used; otherwise, lighting on the object surface is
calculated and the resulting color is used. The pixel is then assigned that
color.

Since the rays are shot through the centers of pixels, a pixel will be
"colored off" if the object "projects" through the center of that pixel. (It
would be possible to have a complicated object that filled an entire pixel
but had a small hole right at the center of the pixel; then the pixel would
not be colored by the object.)

As you've noticed, this causes jagged edges ("aliasing"), and as others have
said, this problem can be reduced with "anti-aliasing". For more information
on anti-aliasing, see
http://www.povray.org/documentation/view/3.6.1/223/#s02_01_02_08_04 ; the
settings shown there can be typed into the command line textbox at the top
of the POV-Ray for Windows editor.

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


Post a reply to this message

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