POV-Ray : Newsgroups : povray.general : Problems with media density : Re: Problems with media density Server Time
30 Jul 2024 02:14:24 EDT (-0400)
  Re: Problems with media density  
From: Alain
Date: 17 Jan 2010 00:06:05
Message: <4b529abd@news.povray.org>
Le 2010-01-16 08:08, David Given a écrit :
> On 16/01/10 02:29, Reactor wrote:
> [...]
>> Those are artifacts caused by too few samples.  Are you absolutely certain that
>> you did modify the right part of the file?  Because settings samples to 1000
>> would be extremely slow.  I would expect a samples setting of 100 to be more
>> than enough.
>
> Yeah, sorry about that --- I edited my post at the last moment and, of
> course, cocked it up. 1000 samples was indeed *agonisingly* slow, but
> produced identical results to 100, 60 or 30 samples.
>
>>    Can you post more related code and the version you are using?  I have a
>> suspicion involving the use of more than one media per object (sometimes the
>> value specified for samples gets reused inappropriately).
>
> In fact, I'm making progress. I put together an isolated test case that
> I could post here and, naturally, discovered that it wasn't manifesting
> the problem. A bit more investigation revealed that the problem has
> nothing to do with my clouds at all --- it's the *atmosphere*.
>
> My planet's atmosphere is another sphere with a media in it; it's
> running a fairly complicated function to get the Rayleigh density right
> (it's not, but that's another story). The clouds and the atmosphere are
> union'd together. It turns out that there's some very odd interaction
> between the two. Changing the sampling settings on the *atmosphere*
> changes the appearance of the *clouds*.
>
> Are there any gotchas involved in unioning two hollow objects with media
> together? Changing the atmosphere sampling method to 1 or 2 makes the
> clouds look *really* weird, which is not what I was expecting.
>

When you have overlaping media containers, you risk to get the samples 
only according to that of the first media encountered.

Try to see if you can place the containers so that they never overlap. 
If needed, use two containers for the athmosphere, one for the upper 
part and one for the part under the clouds.

 From top to ground:
Outer athmospheric media. Can have a low sample value like 3 to 5.
Small gap with no media.
Container for the clouds media. This one will have a samples of about 30 
to 60.
May be present or not...
Second small gap.
Lower athmospheric media. Again, use a low samples value.

That way, you are always only traveling through one media that can each 
have ther own sample number without interfering with that of the others.



Alain


Post a reply to this message

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