POV-Ray : Newsgroups : povray.general : Refraction patterns : Re: Refraction patterns Server Time
5 May 2024 01:59:19 EDT (-0400)
  Re: Refraction patterns  
From: William F Pokorny
Date: 1 Oct 2019 09:17:39
Message: <5d9351f3$1@news.povray.org>
On 10/1/19 6:36 AM, IGM wrote:
> Hello,
> media { density {} } allows a 3D distribution of absorbace. This will change
> each ray intensity. Is it possible to have a 3D distribution of the refractive
> index? This would allow the bending of each ray _inside_ the material. At the
> moment, in povray, bending of rays is possible only on the surface, through the
> real geometry of the object or through the normal {} command.
> 
> An example of the possible effects of ior 3D patterns is the "Fata Morgana" (
> https://en.wikipedia.org/wiki/Fata_Morgana_(mirage) ) and other atmospheric
> effects. Also ancient or low quality real glasses show this effect. GRIN lenses
> are another example.
> 
> How would you produce a non-uniform distribution of the refractive index, in the
> absence of a interior {ior density {}} command?
> 
> Thanks
> igmar
> 
Short answer, no. Today there is not a way to do this except by creating 
lots of surfaces with differing interior IORs - and that's mostly not 
practical(1).

---
Answering a similar question some time back, Christoph hinted it might 
be doable as a feature, but I'm not sure what he had in mind.

In github comments I've mentioned the idea of supporting interiors apart 
from the surface intersections. In other words, interiors (and so IORs) 
would be specified by containing shapes (or by patterns/functions) 
different from those defining the surface intersections. The aim being 
better ways to define things like a glass full of juice without the 
coincident surface / surface ordering issues that we fight today. But, 
I've only gotten as far as thought experiments and some scribbling on 
paper. Such a feature would still depend upon many surfaces - but would 
allow for IOR distributions by function/pattern.

Bill P.

(1) - I think some sort of ray stepping is necessary for real 
distributed/variable IOR support. It would be slow. Something where all 
rays shot are of only short, definable, lengths. A chain ray-jumps end 
to end adjusting direction at each step by a sampled IOR.  Moving from 
camera to surface, surface to surface, light to surface. Doing this in 
conjunction with media sampling, say... I don't know how practical it 
would be to do or use in the end.

Parts of a stepped approach could probably be gotten to with animation, 
the v38 user-defined camera and  code to handle the ray steps (each 
steps IOR adjustment) for limited situations - maybe. Faking whatever 
effect your after some other way very likely easier.


Post a reply to this message

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