POV-Ray : Newsgroups : povray.general : Modelling atmospheric refraction : Re: Modelling atmospheric refraction Server Time
25 Apr 2024 21:28:28 EDT (-0400)
  Re: Modelling atmospheric refraction  
From: Alain
Date: 14 May 2018 19:06:34
Message: <5afa167a$1@news.povray.org>
Le 18-05-14 à 00:59, Glenn W a écrit :
> 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.
> 
> 

Anytime that you encounter a surface between a high and low IOR from the 
high side, you may get total internal reflection. It can happen no 
mather the difference between the 2 IORs if the incident angle is 
shallow enough.

In your case, it will cause bands to appear.

What you need is some support for variable IOR. This is not supported. 
Maybe in some future version, but nowhere near in the future.

A thing that you may try is to use some curved prism somewhere between 
the camera and those distant objects.


Post a reply to this message

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