POV-Ray : Newsgroups : povray.general : Modelling atmospheric refraction : Modelling atmospheric refraction Server Time
24 Apr 2024 20:34:53 EDT (-0400)
  Modelling atmospheric refraction  
From: Glenn W
Date: 14 May 2018 01:05:01
Message: <web.5af917a3f1832a558e8262e20@news.povray.org>
Hi,

I'm trying to model atmospheric refraction on a globe. My first attempt at this
was to have a sphere centred at the origin representing the earth surface, and
then several concentric spheres that represent the different densities (and
therefore different refractive indices) of air as you gain in altitude:

sphere {
    <0, 0, 0>, EarthRadius
    pigment {

        image_map {
            jpeg "mercator.jpg"
            map_type 1
        }
    }
}

.... and then:

sphere {
 <0, 0, 0>, EarthRadius + 0.050 // 50 metres above the surface
 texture { pigment { color White transmit 1.0 } }
 interior { ior 1.000271 }
}
sphere {
 <0, 0, 0>, EarthRadius + 0.001 // 1 metre above the surface
 texture { pigment { color White transmit 1.0 } }
 interior { ior 1.000293 }
}

I then place the camera a few metres off the ground (that is, between the two
refractive spheres) and point it off into the distance at a tangent to the
sphere - the idea is that this ray will eventually hit the boundary of the
higher sphere, and refract the ray downwards. This should result in an image
where the background mountains appear higher than they truly are in 3D space.
But this setup doesn't give me the results I am expecting. Is there anyone that
has successfully modeled atmospheric refraction before? Failing that, iss there
some way to debug trace a particular ray, showing exactly how it interacts with
these refractive spheres? What happens at the boundary of one of the spheres if
the light is travelling *OUT* of the sphere?

I have attempted to use "difference" spheres, which makes the refractive spheres
into "shells", like layers of an onion - I have a feeling this is where I should
be heading, but again, couldn't get it to work.

Any help appreciated.


Post a reply to this message

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