POV-Ray : Newsgroups : povray.newusers : Transparent containers Server Time
2 Jul 2024 11:25:40 EDT (-0400)
  Transparent containers (Message 1 to 3 of 3)  
From: kf42
Subject: Transparent containers
Date: 30 Nov 2010 12:55:01
Message: <web.4cf53751bf9e49d6eaa7546c0@news.povray.org>
Hi all,

I'm trying to use a transparent object to hold some media. Problem is, the
bounding object doesn't stay invisible if it's embedded in media itself. I'd
think this is a common problem, but I only found one relevant thread ("realistic
smoke with high degree of transparency"), and I'm already following all the
guidelines therein.

I attach a minimal example below. In this case the bounding object is empty; the
goal is just to get it to blend into its surroundings. I've tried to fill the
sphere with uniform media to "match up" with the outside, but there is no
density (set by clock, ranging from 0 to 10x the outside density) that works.

Has anybody seen this before?

--------------------------------------------------

#include "colors.inc"

global_settings {
    assumed_gamma 1
}

////////////////////////////////////////
// World

camera {
    location <-2, 2, -10>
    look_at <0, 0, 0>
}

light_source {<-10,20,-15>, White}

// Backstop to prevent infinite ray errors
sphere {
    0, 40
    inverse
    pigment {rgb <0.70, 0.70, 0.90>}
    finish {
        diffuse 0.0
        ambient 1.0
    }
}

////////////////////////////////////////
// Haze Test

// The container, which at present contains nothing
sphere {
    <-1, 0, 0>, 5
    no_shadow
    hollow
    pigment {rgbt <1.0, 1.0, 1.0, 1.0>}
    interior {
        // Add a copy of the world haze to the container to compensate?
        media {
            scattering {2, White}
            density {White*clock}
        }
    }
}

// World-filling haze
// Kept separate from the inverse-sphere for improved portability
box {
    <-50, -50, -50>, <50, 50, 50>
    pigment {rgbt <1.0, 1.0, 1.0, 1.0>}
    no_shadow
    hollow
    interior {
        media {
            scattering {2, White}
            density {White*0.1}
        }
    }
}


Post a reply to this message

From: clipka
Subject: Re: Transparent containers
Date: 30 Nov 2010 19:26:57
Message: <4cf59651$1@news.povray.org>
Am 30.11.2010 18:48, schrieb kf42:
> Hi all,
>
> I'm trying to use a transparent object to hold some media. Problem is, the
> bounding object doesn't stay invisible if it's embedded in media itself. I'd
> think this is a common problem, but I only found one relevant thread ("realistic
> smoke with high degree of transparency"), and I'm already following all the
> guidelines therein.
>
> I attach a minimal example below. In this case the bounding object is empty; the
> goal is just to get it to blend into its surroundings. I've tried to fill the
> sphere with uniform media to "match up" with the outside, but there is no
> density (set by clock, ranging from 0 to 10x the outside density) that works.
>
> Has anybody seen this before?

It's a typical effect with media in fully-transparent containers.

Actually what you see is /not/ the container itself, but rather the 
outline of the media - which obviously coincides with the container 
unless you implement some density gradient falling off to zero as it 
approaches the container.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Transparent containers
Date: 30 Nov 2010 19:54:02
Message: <4cf59caa$1@news.povray.org>
kf42 wrote:

> I attach a minimal example below. In this case the bounding object is empty; the
> goal is just to get it to blend into its surroundings. I've tried to fill the
> sphere with uniform media to "match up" with the outside, but there is no
> density (set by clock, ranging from 0 to 10x the outside density) that works.

FWIW, it seems to behave better with isotropic scattering (type 1)


Post a reply to this message

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