POV-Ray : Newsgroups : povray.general : Black spots in media : Re: Black spots in media Server Time
30 Jul 2024 22:19:21 EDT (-0400)
  Re: Black spots in media  
From: Maxime Marrow
Date: 24 Mar 2008 20:22:02
Message: <47e853ba$1@news.povray.org>
Alain wrote:
> Maxime Marrow nous apporta ses lumieres en ce 2008/03/23 18:13:
>> Alain wrote:
>>> Maxime Marrow nous apporta ses lumieres en ce 2008/03/23 10:32:
>>>> Consider the following POV-Ray code:
>>>>
>>>> #include "functions.inc"
>>>>
>>>> background{1}
>>>>
>>>> camera {
>>>>    location  1.5
>>>>    look_at   0
>>>> }
>>>>
>>>> isosurface{
>>>>  function { f_noise3d(3*x, 3*y, 3*z) - 1/2 }
>>>>
>>>>  max_gradient 4
>>>>
>>>>  hollow
>>>>  pigment { rgbf 1 }
>>>>
>>>>  interior{
>>>>   media{
>>>>    intervals 100
>>>>    absorption 1
>>>>   }
>>>>  }
>>>> }
>>>>
>>>> What is the reason for the black spots and is there a way to avoid 
>>>> them?
>>>>
>>>> Thank you,
>>>> Maxime
>>> Apart from the obvious isue with max_trace_level.
>>
>> Thanks to you and Warp for the max_trace_level suggestion. I changed 
>> the value to 20 and this removed almost all artefacts. Is there way to 
>> remove the remaining artefacts?
>>
>>> You may need to add "all_intersections" to your isosurface. Without 
>>> that, you will miss most surfaces after the first one encountered.
>>
>> Doesn’t this apply only to isosurfaces which are used in CSG operations?
>> If no, can you give an example (not involving CSG) where the omission 
>> of all_intersections results in omission of surfaces?
>>
> Anytime you have transparency.

That's not true. The following POV-Ray code is a counterexample:

global_settings { max_trace_level 20 }

background{1}

camera {
    location  1.5
    look_at   0
}

isosurface{
  function { sin(10*x) + 0.9 }

  max_gradient 10

  hollow
  pigment{ function{ (sin(10*y) - 0.9)*(sin(10*z) - 0.9) > 0 }
           pigment_map{
           [0 rgbf <0.2, 0.2, 0.2, 0.9>]
           [1 rgbf 0.9]
           }
         }

  finish{diffuse 1 ambient 1}

  interior{
   media{
    intervals 1
    samples 10
    absorption 2
   }
  }
}

Maxime


Post a reply to this message

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