POV-Ray : Newsgroups : povray.general : Object inside opaque media : Object inside opaque media Server Time
20 Apr 2024 06:50:53 EDT (-0400)
  Object inside opaque media  
From: Shuffle
Date: 8 Nov 2018 11:05:00
Message: <web.5be45da7691e1337f5ae96220@news.povray.org>
Hi everyone!

I need to place an object inside a (scattering) media and have the media so
dense I cannot see the object from outside the media. But, and that part is
giving me trouble, the media could be any color, including "dark" ones.

What I actually try to achieve is to model a planet with a dense atmosphere.
Like Venus or, in my case, Saturn's moon Titan. The camera will approach the
body and dive into the atmosphere, revealing the terrain only at lower
altitudes.
You can get a pretty good idea of what I'm trying to achieve by following this
link: https://www.youtube.com/watch?v=9L471ct7YDo&t=55s

What I could not find is a way to set the density using a function{} block and
still be able to control the color independently.

Is that feasible? Bonus points if the color can be set using another function or
a color map, but I could manage with a fixed color and use multiple medias.

No matter what I try, I always end up seeing the body through the atmosphere.
Brighter media color seems more opaque, but that is probably just an artifact
and is not desirable anyway.
Maybe my approach is totally wrong?

Here is the most simple scene I could make to demonstrate my problem:

#version 3.7;

global_settings{
    assumed_gamma 1.0
}

camera {
    location <0.0 , 0.0 ,-3.0>
    right x*image_width/image_height
    look_at <0.0 , 0.0 , 0.0>
}
light_source {
    <1000,2000,-2000>
    color rgb 1
}

sphere {
    <0, 0, 0>, 1
    pigment { color red 1 }
}
sphere {
    <0, 0, 0>, 1.15
    pigment { color transmit 1 }
    interior {
        media {
            absorption rgb 20
            scattering { 5, rgb <0.3, 0.2, 0.1> * 10 eccentricity 0.2 }
            density {
                function { 1 }
            }
        }
    }
    hollow
}


Post a reply to this message

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