POV-Ray : Newsgroups : povray.general : hollow and fog makes box visible Server Time
1 Nov 2024 07:28:10 EDT (-0400)
  hollow and fog makes box visible (Message 1 to 3 of 3)  
From: RogerWilco
Subject: hollow and fog makes box visible
Date: 5 Dec 2004 13:05:00
Message: <web.41b34cb7e5eb11a985d76a290@news.povray.org>
I hope I'm asking this in the right place, but I have a problem and I can't
find a solution. I've tried googling for it and searching these newsgroups.

I have a box where I want to put some interior media inside, so I make it
hollow and transparent. I also have fog in my scene. My problem is that the
fog makes the box visible even though it's hollow and fully transparent.
What am I doing wrong?

This will show my problem using POVray 3.6 for Windows:

camera
{ location  <0.5, 0.3, -2 >
  look_at   <0,0.2,0.4>
  angle 60
}
light_source { <-100,1000,-100> color rgb<1,1,0.8> }
object
{ box
  {<-1, -1, -1>,<1, 1, 1>
    hollow
    pigment { color rgbt <1, 1, 1, 1> }
    rotate 30*y
    translate 7*z
  }
}
fog {fog_type 2 distance 70 color rgbf <0.9,0.9,1,1> fog_offset -0.5 fog_alt
5}


Post a reply to this message

From: Slime
Subject: Re: hollow and fog makes box visible
Date: 5 Dec 2004 14:10:31
Message: <41b35d27@news.povray.org>
color rgbf <0.9,0.9,1,1>

Transparent/filtered fog and transparent objects don't mix.

A ray that hits a solid object behind the box will take a portion of the
fog's color and filter it. A ray that hits the box, hits it again as it
leaves the box, and then hits the object behind the box will take on a
smaller portion of the fog's color and filter it three times. Without the
filtering, the color would add up perfectly to make it look like the ray had
hit the object behind the box in one pass, but with the filtering, the color
doesn't add up right.

It's kind of like, if you had the fog color rgbt <0,0,0,.5>, a ray that
didn't hit a transparent object would be fogged by 50%. But a ray that did
hit a transparent object would be fogged by 50%, and then whatever's
*behind* the object would be fogged by 50% *again*, for a total of only 25%
transparency.

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


Post a reply to this message

From: RogerWilco
Subject: Re: hollow and fog makes box visible
Date: 5 Dec 2004 18:50:00
Message: <web.41b39dcd395363d885d76a290@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:
> color rgbf <0.9,0.9,1,1>
>

Thank you, changing it to rgb<0.9,0.9,1> fixed my problem.


Post a reply to this message

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