|
 |
1.4.2.5 Why are there strange dark pixels or noise on my CSG object?
This is the typical 'coincident surfaces problem'. This happens when two surfaces are exactly at the same place.
For example:
union
{ box { <-1,0,-1>,<1,-2,1> texture { Texture1 } }
box { <-2,0,-2>,<2,-1,2> texture { Texture2 } }
}
The top surface of the first box is coincident with the top surface of the second box. When a ray hits this area,
POV-Ray has to decide which surface is closest. It cannot, since they are exactly in the same place. Which one it
actually chooses depends on the float number calculations, rounding error, initial parameters, position of the camera,
etc, and varies from pixel to pixel, causing those seemingly "random" pixels.
The solution to the problem is to decide which surface you want to be on top and translate that surface just a bit,
so it protrudes past the unwanted surface. In the example above, if we want, for example, that the second box is at
the top, we will type something like:
union
{ box { <-1,0,-1>,<1,-2,1> texture { Texture1 } }
box { <-2,0.001,-2>,<2,-1,2> texture { Texture2 } }
}
Note that a similar problem appears when a light source is exactly on a surface: POV-Ray cannot calculate
accurately if it is actually inside or outside the surface, so dark (shadowed) pixels appear on every surface that is
illuminated by this light.
|
 |