POV-Ray : Newsgroups : povray.general : Fog and media (once again...) Server Time
2 Aug 2024 20:15:36 EDT (-0400)
  Fog and media (once again...) (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: arbitrary77
Subject: Fog and media (once again...)
Date: 19 Jul 2004 16:50:00
Message: <web.40fc3381157e6158e478aea0@news.povray.org>
Hi,

I've found some older posts about this problem, but no solution so far, and
it's really starting to annoy me. It doesn't seem to be a known bug or
limitation, as far as I could find out. Anyway, here's the problem (using
3.6.0.icl8.win32):

I have a scene with fog, and a hollow transparent container object
containing a media. But strangely enough, the otherwise completely
invisible container object is still casting a shadow, and it only happens
when there is fog. I added a small test scene which shows the problem.

Of course I could make the container "no_shadow", but then the scattering
media won't be shaded correctly any more, and it won't cast any shadow at
all. Using a media fog is slow and looks even worse because of the
intersecting media. A low ground fog, or a ground fog in the z direction is
no option either, because I'd really like the media objects to be affected
by the fog, at a close distance.

Any explanations or ideas?

--

#include "colors.inc"

camera {
  perspective angle 50
  location <0,1,0>
  right x*(image_width/image_height)
  look_at <0,1,1>
}

plane { y, 0 pigment { checker color rgb 1 color rgb 0.95 } }

sphere {
  <0,0,0> 1
  pigment { Clear } hollow
  interior { media { scattering { 1 3 } density { spherical scale 1/3 } } }
  scale <2,0.5,2> translate <0, 2, 8>
}

fog { distance 20 color rgbf<0.7,0.7,0.7,0> }

light_source { <500,1000,-1000> color rgb 1 }


Post a reply to this message

From: arbitrary77
Subject: Re: Fog and media (once again...)
Date: 19 Jul 2004 17:00:00
Message: <web.40fc356db8c23e098e478aea0@news.povray.org>
There's one more thing I'd like to add... it's not really a media problem.
Comment out the interior line in the example, and you'll still see the
shadow of the hollow transparent container sphere, which really shouldn't
be there.


Post a reply to this message

From: gonzo
Subject: Re: Fog and media (once again...)
Date: 19 Jul 2004 23:27:00
Message: <40fc9104$1@news.povray.org>
arbitrary77 wrote:
> Hi,
> 
> I've found some older posts about this problem, but no solution so far, and
> it's really starting to annoy me. 
<snip>
> I have a scene with fog, and a hollow transparent container object
> containing a media. But strangely enough, the otherwise completely
> invisible container object is still casting a shadow, and it only happens
> when there is fog. I added a small test scene which shows the problem.

> Any explanations or ideas?
<snip>
> fog { distance 20 color rgbf<0.7,0.7,0.7,0> }

Try just
fog { distance 20 color rgb<0.7,0.7,0.7> }

It would probably be helpful to note in the docs somewhere that filter 
with fog shouldn't be used with media.

RG


Post a reply to this message

From: Alain
Subject: Re: Fog and media (once again...)
Date: 19 Jul 2004 23:34:15
Message: <40fc92b7$1@news.povray.org>
arbitrary77 nous apporta ses lumieres ainsi en ce 19/07/2004 16:48... :

>Hi,
>
>I've found some older posts about this problem, but no solution so far, and
>it's really starting to annoy me. It doesn't seem to be a known bug or
>limitation, as far as I could find out. Anyway, here's the problem (using
>3.6.0.icl8.win32):
>
>I have a scene with fog, and a hollow transparent container object
>containing a media. But strangely enough, the otherwise completely
>invisible container object is still casting a shadow, and it only happens
>when there is fog. I added a small test scene which shows the problem.
>
>Of course I could make the container "no_shadow", but then the scattering
>media won't be shaded correctly any more, and it won't cast any shadow at
>all. Using a media fog is slow and looks even worse because of the
>intersecting media. A low ground fog, or a ground fog in the z direction is
>no option either, because I'd really like the media objects to be affected
>by the fog, at a close distance.
>
>Any explanations or ideas?
>
>--
>
>#include "colors.inc"
>
>camera {
>  perspective angle 50
>  location <0,1,0>
>  right x*(image_width/image_height)
>  look_at <0,1,1>
>}
>
>plane { y, 0 pigment { checker color rgb 1 color rgb 0.95 } }
>
>sphere {
>  <0,0,0> 1
>  pigment { Clear } hollow
>  interior { media { scattering { 1 3 } density { spherical scale 1/3 } } }
>  scale <2,0.5,2> translate <0, 2, 8>
>}
>
>fog { distance 20 color rgbf<0.7,0.7,0.7,0> }
>
>light_source { <500,1000,-1000> color rgb 1 }
>
>
>
>  
>
The "Clear" pigment is: rgbf 1. Have you tried rgbt 1?

Alain


Post a reply to this message

From: arbitrary77
Subject: Re: Fog and media (once again...)
Date: 20 Jul 2004 05:05:00
Message: <web.40fce026b8c23e09434c1c4e0@news.povray.org>
gonzo <rgo### [at] lansetcom> wrote:

> Try just
> fog { distance 20 color rgb<0.7,0.7,0.7> }
>
> It would probably be helpful to note in the docs somewhere that filter
> with fog shouldn't be used with media.

I read about that, that's why I tried explicitly setting it to 0. If I don't
specify any filter value, it still doesn't render correctly, looks exactly
the same...


Post a reply to this message

From: arbitrary77
Subject: Re: Fog and media (once again...)
Date: 20 Jul 2004 05:10:00
Message: <web.40fce051b8c23e09434c1c4e0@news.povray.org>
Alain <aze### [at] qwertygov> wrote:

> The "Clear" pigment is: rgbf 1. Have you tried rgbt 1?

Yeah, I did... doesn't change anything.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Fog and media (once again...)
Date: 22 Jul 2004 03:11:17
Message: <40ff6895@news.povray.org>
"arbitrary77" <arb### [at] gmxnet> schreef in bericht
news:web.40fc3381157e6158e478aea0@news.povray.org...
> Hi,
>
> I have a scene with fog, and a hollow transparent container object
> containing a media. But strangely enough, the otherwise completely
> invisible container object is still casting a shadow, and it only happens
> when there is fog. I added a small test scene which shows the problem.
>
IMHO it has to do with the fog. As far as I remember (version 3.1) there
always was a problem with fog used in combination with a texture showing
transparant parts (alpha channel or otherwise). With fog, the transparant
parts (container or whatever) become visible under certain light conditions
(agains a bright sky for instance) and I never was able to find a
workaround. Indeed, with media, fog behaves oddly too.
The only recommendation I could give: don't use fog if you want to use
media.

Thomas


Post a reply to this message

From: arbitrary77
Subject: Re: Fog and media (once again...)
Date: 22 Jul 2004 03:40:00
Message: <web.40ff6e0eb8c23e09fa53181f0@news.povray.org>
"Thomas de Groot" <t.d### [at] internlnet> wrote:
> IMHO it has to do with the fog. As far as I remember (version 3.1) there
> always was a problem with fog used in combination with a texture showing
> transparant parts (alpha channel or otherwise).

I started looking at the source code, trying to find out what's going on...

It seems like, when the renderer computes the shadow of a (partly, or
completely) transparent object, it takes into account the fog between the
light source and the shadow. If there is fog, it attenuates the light
coming from the light source, and as a result the shadow becomes a bit
darker. This even happens if the object is completely transparent and
hollow, resulting in a visible shadow when there should be none.

IMHO this is a bug. If fog should attenuate light coming from a light
source, it should happen for the whole scene, not just the shadows of
transparent objects. Either that, or fog shouldn't affect light source rays
at all.

I was able to compile a version which renders the scene in my original post
correctly, but it was a rather quick hack and I'm not sure if it has any
side effects, so I'll look into it some more.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Fog and media (once again...)
Date: 22 Jul 2004 06:34:25
Message: <40ff9831$1@news.povray.org>
In article <web.40ff6e0eb8c23e09fa53181f0@news.povray.org> , "arbitrary77"
<arb### [at] gmxnet> wrote:

> If there is fog, it attenuates the light
> coming from the light source, and as a result the shadow becomes a bit
> darker. This even happens if the object is completely transparent and
> hollow, resulting in a visible shadow when there should be none.
>
> IMHO this is a bug. If fog should attenuate light coming from a light
> source, it should happen for the whole scene, not just the shadows of
> transparent objects. Either that, or fog shouldn't affect light source rays
> at all.

I agree, this is and has been a bug for a long time.  Somehow there was
never enough interest to fix it for some odd reason as it always dropped off
the "to do for this version list"...

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Tim Nikias
Subject: Re: Fog and media (once again...)
Date: 22 Jul 2004 18:05:36
Message: <41003a30$1@news.povray.org>
> I agree, this is and has been a bug for a long time.  Somehow there was
> never enough interest to fix it for some odd reason as it always dropped
off
> the "to do for this version list"...

You should never say that bugs just got dropped from the to-do list. That
sounds Microsoftian Style. Rather say: "The dog ate the to-do list, and we
reassembled it as far as possible."

;-)

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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