POV-Ray : Newsgroups : povray.newusers : New User Question about Variable Density Fog : Re: New User Question about Variable Density Fog Server Time
2 Jul 2024 11:40:02 EDT (-0400)
  Re: New User Question about Variable Density Fog  
From: Alain
Date: 11 May 2011 22:57:02
Message: <4dcb4c7e@news.povray.org>

> Thank you for posting your code.  My advisor wants me to switch from varible
> scatter to varible IOR, so it should come in very handy.  I wish I had a 2500K
> I7, Hex AMD's only can do so much :)
>

Here, you will have a serious problem. The provided code only work if 
you have a thin object where you can assume the ior stays constant 
across it's thickness.

In your case, you need an ior that will change in a volume.
Now, you can no longer merge the constituent boxes at it makes the 
internal surfaces disapear. You also need to provide a tiny gap between 
the boxes to prevent coincident surfaces artefacts. Also, any ray 
parallel to an axis will always go straight through. You also can have 
problems with total internal reflection whenever you attempt to exit a 
box from any faces not parallel to that from whitch you entered it.

For a variable ior in a volume, you need to follow curved rays. Those 
ray's curvature depends on the 3D gradient along it's path. With the 
stacked boxes method, the gradient is always parallel to one reference 
axis and perpendicular to the other two.
Also, the direction and curvature of that curve can change in a very 
complexe way. That means, in a simple case, 100's of sample points along 
the ray's path, each one of those points will need additional samples to 
find the effective gradient.

A density file can no longer be used as you need a continuous 
transition, while the density file have discreete values.


Anyway, I find it dificult to aprehend the reason why, in this case, you 
may need to use variable ior.


Alain


Post a reply to this message

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