POV-Ray : Newsgroups : povray.general : Black spots in media Server Time
23 Dec 2024 22:32:38 EST (-0500)
  Black spots in media (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Maxime Marrow
Subject: Black spots in media
Date: 23 Mar 2008 09:33:58
Message: <47e66a56$1@news.povray.org>
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


Post a reply to this message

From: Warp
Subject: Re: Black spots in media
Date: 23 Mar 2008 10:11:09
Message: <47e6730d@news.povray.org>
Maxime Marrow <max### [at] gmailcom> wrote:
> What is the reason for the black spots and is there a way to avoid them?

  The most common of the reasons: max_trace level.

  Try: global_settings { max_trace_level 12 }

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: Black spots in media
Date: 23 Mar 2008 12:25:15
Message: <47e6927b$1@news.povray.org>
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.

You may need to add "all_intersections" to your isosurface. Without that, you 
will miss most surfaces after the first one encountered.

Maybe the 100 intervals are causing some artefacts.

Try this for your media:

media{ samples 300 absorbtion 1}

This will guive you the same total number of samples as your current setting.
Should be a lot faster to.
Media defaults: method 3, samples 3, intervals 1.
Don't change intervals.
Keep samples larger than 2.
Please read about media sampling method 3, whitch is the default with all 
versions greater than 3.5.

In short, it's always beter to increase the samples that increasing the 
intervals. LOT faster, beter quality, reduction of possible artefacts.


-- 
Alain
-------------------------------------------------
An unbreakable toy is useful for breaking other toys.


Post a reply to this message

From: Maxime Marrow
Subject: Re: Black spots in media
Date: 23 Mar 2008 17:33:41
Message: <47e6dac5@news.povray.org>
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?

> Maybe the 100 intervals are causing some artefacts.
> 
> Try this for your media:
> 
> media{ samples 300 absorbtion 1}

I tried it – the image is visually the same. It seems that the 100 
intervals are not causing artefacts in this scene.

> This will guive you the same total number of samples as your current 
> setting.
> Should be a lot faster to.
> Media defaults: method 3, samples 3, intervals 1.

These values contradict the values in the POV-Ray help (POV-Ray version 
3.6.1c.icl8.win32). The default values for media in the help are: method 
3, samples 1, 1, intervals 10.

> Don't change intervals.
> Keep samples larger than 2.
> Please read about media sampling method 3, whitch is the default with 
> all versions greater than 3.5.
> 
> In short, it's always beter to increase the samples that increasing the 
> intervals. LOT faster, beter quality, reduction of possible artefacts.

Thanks for this advice,
Maxime


Post a reply to this message

From: Tim Attwood
Subject: Re: Black spots in media
Date: 23 Mar 2008 17:52:47
Message: <47e6df3f$1@news.povray.org>
Max_trace_level for the black spots, like Warp said,
and use accuracy 0.000001 with the isosurface
to get rid of the remaining arifacts where the isosurface
hits the containing box, then you can get away with just
media {absorption 1} and the default media sampling.


Post a reply to this message

From: Alain
Subject: Re: Black spots in media
Date: 24 Mar 2008 13:34:30
Message: <47e7f436$1@news.povray.org>
Maxime Marrow nous apporta ses lumieres en ce 2008/03/23 18:13:

>> This will guive you the same total number of samples as your current 
>> setting.
>> Should be a lot faster to.
>> Media defaults: method 3, samples 3, intervals 1.
> 
> These values contradict the values in the POV-Ray help (POV-Ray version 
> 3.6.1c.icl8.win32). The default values for media in the help are: method 
> 3, samples 1, 1, intervals 10.
> 
> 
> Thanks for this advice,
> Maxime

I know that there is a contradiction. The values of samples 1,1 intervals 10 
where valid with version 3.5 when the default was method 1. (at the time, it was 
the only sampling method available)

Now, the default is method 3. Method 3 require at least samples 3 and ignore any 
second samples value: samples 3,7 is the same as samples 3. The default 
intervals also changed from 10 to 1.
With method 3, it's beter to increase samples. Increasing intervals greatly 
increase the rendering time.
If needed, method 3 can dynamicaly create more intervals.

samples 300 // fast.

samples 3 intervals 100 // very slow, no quality gain.

Both have the same final number of samples. The first can give beter results.

-- 
Alain
-------------------------------------------------
At the feast of ego everyone leaves hungry.
	Bentley's House of Coffee and Tea, Tucson, AZ


Post a reply to this message

From: Alain
Subject: Re: Black spots in media
Date: 24 Mar 2008 13:36:48
Message: <47e7f4c0$1@news.povray.org>
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.

-- 
Alain
-------------------------------------------------
   My wife is such a bad cook, if we leave dental floss in the Kitchen the 
roaches hang themselves.
	Rodney Dangerfield


Post a reply to this message

From: John VanSickle
Subject: Re: Black spots in media
Date: 24 Mar 2008 15:06:32
Message: <47e809c8@news.povray.org>
Maxime Marrow wrote:
> 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?

It looks like something that is *designed* to have black spots.

Regards,
John


Post a reply to this message

From: Maxime Marrow
Subject: Re: Black spots in media
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

From: Kenneth
Subject: Re: Black spots in media
Date: 27 Mar 2008 22:40:00
Message: <web.47ec664531f322e978dcad930@news.povray.org>
Maxime Marrow <max### [at] gmailcom> wrote:
> Alain wrote:

>
> > 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?


I agree with your reasoning, and the documentation seems to indicate so as well.
Yet, it does work.  (And IMO, decreasing the isosurface accuracy value makes the
spots worse, not better.) There *might* be a bug involved. Here's a post you
should take a look at, involving the issue of media and isosurfaces. Several of
us out here have been trying to figure out what might be going on. It's a long
post, but read it all the way to the end.

http://news.povray.org/povray.binaries.images/thread/%3Cweb.47dd7cf19ebc6382a5d4a01d0%40news.povray.org%3E/

Ken W.


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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