POV-Ray : Newsgroups : povray.advanced-users : Transparent finite patch primitives & fog? Server Time
28 Jul 2024 18:17:39 EDT (-0400)
  Transparent finite patch primitives & fog? (Message 1 to 6 of 6)  
From: T'Crass
Subject: Transparent finite patch primitives & fog?
Date: 30 Nov 2004 08:05:01
Message: <web.41ac6f96fae3e9447d4f02b30@news.povray.org>
when rendering the following little scene...

--------8<--------

plane { y 0 pigment { color rgb <0, 1, 0> } }
disc { <0, 2, 0>, -z, 1 texture {pigment {color rgbt <1, 1, 1, 1> } } }
fog { fog_type 2 distance 5 fog_offset 0 fog_alt 1 color 0.5 }
light_source { <-10, 10, -10> color 1 }
camera { location <0, 1, -5> look_at <0, 1, 0> right
image_width/image_height*x }

--------8<--------

.....the *entirely transparent* disc stands out as "negative image" as though
there was no fog behind it -- which is not really what I expected. However,
this only happens with fog_type 2 (i.e. ground fog) -- when changing
fog_type to 1, the disc renders invisible as it should be (to my
understanding).

Does anybody have an explanation for this behaviour? (The same happens when
using a polygon instead of a disc.) Is it a bug, or is it
just me again not comprehending what all these povray settings *really*
mean...? ;-)

Thanks for any reply --

Torsten


Post a reply to this message

From: Mike Raiford
Subject: Re: Transparent finite patch primitives & fog?
Date: 30 Nov 2004 08:50:14
Message: <41ac7a96$1@news.povray.org>
T'Crass wrote:

> Does anybody have an explanation for this behaviour? (The same happens when
> using a polygon instead of a disc.) Is it a bug, or is it
> just me again not comprehending what all these povray settings *really*
> mean...? ;-)

Discs, Polygons and Triangles don't have an inside and outside, They are 
simply a surface, but they do have a normal. If you change the normal of 
the disc to z instead of -z, you'll get the "camera inside non-hollow 
object" warning. The "inside" of the disc is actually opposite the 
disk's normal.

hth...
-- 
~Mike


Post a reply to this message

From: T'Crass
Subject: Re: Transparent finite patch primitives & fog?
Date: 30 Nov 2004 09:50:00
Message: <web.41ac8819544d48927d4f02b30@news.povray.org>
Hi Mike,

thanks for the reply!

> Discs, Polygons and Triangles don't have an inside and outside, They are
> simply a surface, but they do have a normal. If you change the normal of
> the disc to z instead of -z, you'll get the "camera inside non-hollow
> object" warning. The "inside" of the disc is actually opposite the
> disk's normal.

I see... funny, adding the "hollow" keyword to the disc statement indeed
does help a little (in which case the normal direction doesn't make a
difference any more) -- yet the fog still looks inconsistent behind the
disc. Anyway, do you have a clue why a transparent disc should cast a
shadow?

Regards --

Torsten


Post a reply to this message

From: Slime
Subject: Re: Transparent finite patch primitives & fog?
Date: 30 Nov 2004 10:32:56
Message: <41ac92a8$1@news.povray.org>
> I see... funny, adding the "hollow" keyword to the disc statement indeed
> does help a little (in which case the normal direction doesn't make a
> difference any more) -- yet the fog still looks inconsistent behind the
> disc.

That's because you're using transparent fog, and the transparency is
calculated for each ray (once before the disc, once after it). Use "color
rgb 0.5" instead of just "color 0.5", which is equivalent to "color rgbft
0.5" and probably not what you want. Then the disc looks correct.
(Unfortunately, transparent fog can't be used with transparent objects
without that effect.)

As for the shadow, I have no idea. Increasing the fog distance makes it fade
away, so it's related to the fog, but fog isn't supposed to cast a shadow.
Maybe the shadow ray is actually seeing the fog between the plane and the
disc and that's what's causing the shadow.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: T'Crass
Subject: Re: Transparent finite patch primitives & fog?
Date: 1 Dec 2004 02:50:01
Message: <web.41ad7682544d48927d4f02b30@news.povray.org>
Hi Slime,

> That's because you're using transparent fog, and the transparency is
> calculated for each ray (once before the disc, once after it). Use "color
> rgb 0.5" instead of just "color 0.5", which is equivalent to "color rgbft
> 0.5" and probably not what you want. Then the disc looks correct.

stupid me! Of course I didn't want to imply rgbft...

> As for the shadow, I have no idea. Increasing the fog distance makes it fade
> away, so it's related to the fog, but fog isn't supposed to cast a shadow.
> Maybe the shadow ray is actually seeing the fog between the plane and the
> disc and that's what's causing the shadow.

Specifying "no_shadow" for the disc makes the shadow go away!

Thanks to all of you for your comments --

Torsten


Post a reply to this message

From: Slime
Subject: Re: Transparent finite patch primitives & fog?
Date: 1 Dec 2004 10:10:04
Message: <41addecc$1@news.povray.org>
> Specifying "no_shadow" for the disc makes the shadow go away!

I had thought of that, but I figured that you wanted the disc there for
something like a media container, which might need a shadow.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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