POV-Ray : Documentation : 1.4.2.1 Using several transparent objects makes them black?
  POV-Ray 3.6 Documentation Online View  
1.4.2 Language Things that don't work as one expects   1.4.2.2 I'm getting color banding in the image

1.4.2.1 Using several transparent objects makes them black?

"When I put several transparent objects one in front of another or inside another, POV-Ray calculates a few of them, but the rest are completely black, no matter what transparency values I give."

Short answer: Try increasing the max_trace_level value in the global_settings block (the default is 5).

Long answer:

Raytracing has a peculiar feature: It can calculate reflection and refraction. Each time a ray hits the surface of an object, the program looks if this surface is reflective and/or refractive. If so, it shoots another ray from this point to the appropriate direction.

Now, imagine we have a glass sphere. Glass reflects and refracts, so when the ray hits the sphere, two additional rays are calculated, one outside the sphere (for the reflection) and one inside (for the refraction). Now the inside ray will hit the sphere again, so two new rays are calculated, and so on and so on...

You can easily see that there must be a maximum number of reflections/refractions calculated, because otherwise POV-Ray would calculate that one pixel forever.

This number can be set with the max_trace_level option in the global_settings block. The default value is 5, which is enough for most scenes. Sometimes it is not enough (specially when there are lots of semitransparent objects one over another) so you have to increase it.

So try something like:

global_settings
{
  max_trace_level 10
}
1.4.2 Language Things that don't work as one expects   1.4.2.2 I'm getting color banding in the image


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