POV-Ray : Newsgroups : povray.advanced-users : Variable IOR issue Server Time
25 Nov 2024 03:20:47 EST (-0500)
  Variable IOR issue (Message 1 to 7 of 7)  
From: Leonardo
Subject: Variable IOR issue
Date: 15 Dec 2003 20:55:02
Message: <web.3fde64febc9e52f427bbadf50@news.povray.org>
Hi.

I'm trying to simulate variable IOR in POV-Ray by putting several cylinders
inside each other. I wanted to make a bullet-trail macro, wich would draw
the effect of heated air when a bullet crosses it. I've created the macro,
and the result is attached.

The basic idea was making the ior fall to 1.0 along the trail, and along the
axis, so the center of the trail would look more heated than the edges. To
achieve it, I've sudbivided the trail in N sub-trails, each made of M
co-axial cylinders. Each subdivision was made by creating cylinders with
distinct ior, the inner the greatest, falling from MaxIOR in the middle, to
1.0 in the edge.
Thus, all I had to do was create the N sub-trails, along the trail's path,
giving different values to MaxIOR, so the heat would drop with the distance
to the bullet.

That can be seen quite well in the picture.
But there are some problems. The max_trace_level variable must be set too
high, and if I set it over 220 it gives me stack overflow :(
Besides, the refraction between two sub-trails is shown, wich gives an
undesired toroidal aspect.

Anyone come up with a solution / idea / sugestion?

Thanx a lot

link to the picture: http://mega.ist.utl.pt/~lmfe/pictures/bullet_trail.png
link to the scene: http://mega.ist.utl.pt/~lmfe/pictures/bullet_trail.pov


Post a reply to this message

From: Patrick Elliott
Subject: Re: Variable IOR issue
Date: 16 Dec 2003 15:33:08
Message: <MPG.1a49175df4510ea698994b@news.povray.org>
In article <web.3fde64febc9e52f427bbadf50@news.povray.org>, 
lmf### [at] megaistutlpt says...
> link to the picture: http://mega.ist.utl.pt/~lmfe/pictures/bullet_trail.png
> link to the scene: http://mega.ist.utl.pt/~lmfe/pictures/bullet_trail.pov
> 
> 

I got a 403 Forbidden on these.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Leonardo
Subject: Re: Variable IOR issue
Date: 16 Dec 2003 16:00:03
Message: <web.3fdf71245be44e5727bbadf50@news.povray.org>
Patrick Elliott wrote:
>
>I got a 403 Forbidden on these.
>

I'm sorry.... it's fixed now :p same links...


Post a reply to this message

From: Tom York
Subject: Re: Variable IOR issue
Date: 17 Dec 2003 12:05:02
Message: <web.3fe08b655be44e572ff34a90@news.povray.org>
Leonardo wrote:

>Anyone come up with a solution / idea / sugestion?

Couldn't you try applying a well-chosen normal pattern to a simple thin box
(aligned with the bullet but facing the camera as far as possible) with a
single ior? I also had this variable ior problem a long time ago, but
controlling the refraction with a normal pattern or more directly by
choosing an appropriately shaped object proved faster and didn't have the
max_trace_level problem. I've used this to generate "heat-wave" type
distortions in a horizon line and simulate odd lenses.


Post a reply to this message

From: Leonardo
Subject: Re: Variable IOR issue
Date: 17 Dec 2003 13:30:01
Message: <web.3fe09fc35be44e5727bbadf50@news.povray.org>
Tom York wrote:
>Couldn't you try applying a well-chosen normal pattern to a simple thin box
>(aligned with the bullet but facing the camera as far as possible) with a
>single ior? I also had this variable ior problem a long time ago, but
>controlling the refraction with a normal pattern or more directly by
>choosing an appropriately shaped object proved faster and didn't have the
>max_trace_level problem. I've used this to generate "heat-wave" type
>distortions in a horizon line and simulate odd lenses.
>

Well... I've seen one animation of a heat wave in this newsgroup. The main
problem is that, in my case, the effect of the variable refraction is not
covered in all the camera viewing area. This
means that a box or a plane with a disturbed normal just won't work

I'm wondering if I can simplify the scene, speed up the rendering and
decrease memory, all at once by changing POV's source code, and doing an
alternative method of "refraction". This method would not follow any
physical law, but it would change the direction of the ray by evaluating
some noise at the intersection point. So, the ray direction will be changed
when it passes through the object, making it look "refracted".

In fact, the model isn't very realistic (because no physics are used at
all), but in this case, when the heated air's density is random, it would
not look very strange. Of course, it would need some tweaks, as taking in
account the direction of the ray vs. the normal to make it more realistic,
and maybe the distance the ray travels through the refracting object.

This is a model wich came up in my simple mind, so any sugestions are
largely welcome.
I apologize if I wasn't clear enough. Any questions?

Thanks in advance

Leonardo


Post a reply to this message

From: Tom York
Subject: Re: Variable IOR issue
Date: 19 Dec 2003 05:40:01
Message: <web.3fe2d56e5be44e572ff34a90@news.povray.org>
Leonardo wrote:

>Well... I've seen one animation of a heat wave in this newsgroup. The main
>problem is that, in my case, the effect of the variable refraction is not
>covered in all the camera viewing area. This
>means that a box or a plane with a disturbed normal just won't work

Ah, you're worried about seeing the "sharp edges" of the refracting object?

>I'm wondering if I can simplify the scene, speed up the rendering and
>decrease memory, all at once by changing POV's source code, and doing an
>alternative method of "refraction". This method would not follow any
>physical law, but it would change the direction of the ray by evaluating
>some noise at the intersection point. So, the ray direction will be changed
>when it passes through the object, making it look "refracted".

I'm not sure that the refraction calculation is slow compared to calling a
noise function.


Post a reply to this message

From: Leonardo
Subject: Re: Variable IOR issue
Date: 19 Dec 2003 09:15:01
Message: <web.3fe307165be44e5727bbadf50@news.povray.org>
Tom York wrote:
>Ah, you're worried about seeing the "sharp edges" of the refracting object?

Yes, that's exactly what I don't want: sharp edges... and I can't figure it
out how to get rid of them without several cylinders... Maybe it could be
faked by disturbing the normal, so the rays that hit the edges are just
transmitted, but it would require a lot of work finding such
transformation, and it would be camera-position dependant, wich is bad...

>
>I'm not sure that the refraction calculation is slow compared to calling a
>noise function.
>

It would be faster than having 5 or 10 refracting cylinders, one inside each
other. That's what I meant
And it would give better, smoother results, if the noise were applied
correctly... no sharp edges ;)


Post a reply to this message

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