POV-Ray : Newsgroups : povray.general : variable refraction Server Time
31 Oct 2024 19:27:22 EDT (-0400)
  variable refraction (Message 1 to 8 of 8)  
From: Richard
Subject: variable refraction
Date: 27 Jan 2000 16:27:39
Message: <3890E367.572DF8C2@mindspring.com>
I was modeling a glass bottle I keep on my desk a few days ago and
realized that there was one aspect of it that I have been unable to
produce in POV:  the different densities of the glass.  Hopefully you
will know what I am talking about.  The bottle that I have is not of
consistent thickness, so the refraction is not uniform.  Short of
modeling the thing out of blobs, does anyone know how to simulate the
different densities of the glass?  Or possibly add a feaure that will
add ior_map abilities or something like that -- kinda like a color map
only with ior values if there isn't already a way to do this.  Thanks.


Post a reply to this message

From: Chris Huff
Subject: Re: variable refraction
Date: 27 Jan 2000 16:42:37
Message: <chrishuff_99-437136.16431727012000@news.povray.org>
In article <3890E367.572DF8C2@mindspring.com>, ric### [at] geocitiescom 
wrote:

> I was modeling a glass bottle I keep on my desk a few days ago and
> realized that there was one aspect of it that I have been unable to
> produce in POV:  the different densities of the glass.  Hopefully you
> will know what I am talking about.  The bottle that I have is not of
> consistent thickness, so the refraction is not uniform.  Short of
> modeling the thing out of blobs, does anyone know how to simulate the
> different densities of the glass?  Or possibly add a feaure that will
> add ior_map abilities or something like that -- kinda like a color map
> only with ior values if there isn't already a way to do this.  Thanks.

The cause of the waviness isn't different ior's to the glass, it is the 
varying thickness(which is different from the density). Try using a 
normal on the glass, something like a squashed bozo will make a ripply 
effect:
normal {bozo 0.1 scale < 1, 0.15, 1>}
POV currently does not have a way to calculate variable refraction, 
since that would require sampling the ray in several steps through the 
object or tracing curved rays. Someone might write a patch to do this 
someday, but none currently exist. And it would be the wrong solution to 
this problem anyway.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Bob Hughes
Subject: Re: variable refraction
Date: 27 Jan 2000 16:44:08
Message: <3890bc28@news.povray.org>
'texture_map' comes to mind, but only for in POV-Ray 3.02 and earlier.  Can't be
done in version 3.1* far as I know.  If you're willing to go back to that
version then maybe you could get a reasonable placement of differing finishes
(refraction) using a pattern like onion or gradient or something.
The ability to mix 'interior' into a pattern doesn't seem to exist since the
'material_map' (which would have been the material pattern template) isn't a map
at all for 'material {}'.
Understand that?  Or not...?
Now if someone else defies what I just said I'd be more than happy to listen.

Bob

"Richard" <dai### [at] mindspringcom> wrote in message
news:3890E367.572DF8C2@mindspring.com...
| I was modeling a glass bottle I keep on my desk a few days ago and
| realized that there was one aspect of it that I have been unable to
| produce in POV:  the different densities of the glass.  Hopefully you
| will know what I am talking about.  The bottle that I have is not of
| consistent thickness, so the refraction is not uniform.  Short of
| modeling the thing out of blobs, does anyone know how to simulate the
| different densities of the glass?  Or possibly add a feaure that will
| add ior_map abilities or something like that -- kinda like a color map
| only with ior values if there isn't already a way to do this.  Thanks.
|


Post a reply to this message

From: Simon de Vet
Subject: Re: variable refraction
Date: 27 Jan 2000 16:48:35
Message: <3890BD85.E7A95150@istar.ca>
Chris Huff wrote:

> In article <3890E367.572DF8C2@mindspring.com>, ric### [at] geocitiescom
> wrote:
>
> > I was modeling a glass bottle I keep on my desk a few days ago and
> > realized that there was one aspect of it that I have been unable to
> > produce in POV:  the different densities of the glass.  Hopefully you
> > will know what I am talking about.  The bottle that I have is not of
> > consistent thickness, so the refraction is not uniform.  Short of
> > modeling the thing out of blobs, does anyone know how to simulate the
> > different densities of the glass?  Or possibly add a feaure that will
> > add ior_map abilities or something like that -- kinda like a color map
> > only with ior values if there isn't already a way to do this.  Thanks.
>
> The cause of the waviness isn't different ior's to the glass, it is the
> varying thickness(which is different from the density). Try using a
> normal on the glass, something like a squashed bozo will make a ripply
> effect:
> normal {bozo 0.1 scale < 1, 0.15, 1>}
> POV currently does not have a way to calculate variable refraction,
> since that would require sampling the ray in several steps through the
> object or tracing curved rays. Someone might write a patch to do this
> someday, but none currently exist. And it would be the wrong solution to
> this problem anyway.

But a right solution for another problem.

I was looking at a test tube in my Chem lab yesterday, and noticed the
ribbons of variable refraction streaming through the liquid.

It would also be nice to simulate heat lines, and mirages in the desert...


Post a reply to this message

From: Chris Huff
Subject: Re: variable refraction
Date: 27 Jan 2000 17:11:11
Message: <chrishuff_99-E3E053.17115227012000@news.povray.org>
In article <3890BD85.E7A95150@istar.ca>, sde### [at] istarca wrote:

> But a right solution for another problem.
> 
> I was looking at a test tube in my Chem lab yesterday, and noticed the
> ribbons of variable refraction streaming through the liquid.
> 
> It would also be nice to simulate heat lines, and mirages in the desert...

I have often noticed this, and have been wondering how it could be 
done...
Probably the best way would be to follow the ray a short 
distance(specified by a parameter) into the object, sample the ior at 
that point(or actually, the rate and direction it is changing), and 
repeat this process. It would probably be as slow as media, and would 
slow media down(since the path media is sampled over would have to 
change due to the variable ior). It might not be extremely difficult to 
implement, but I don't have the math knowledge to do it.

The syntax would be something like this:
variable_ior {sample_spacing, max_sample_depth, PATTERN}

I also think there should be some kind of float_map_wave waveform 
modifier for patterns(like sine_wave, triangle_wave, etc), it would act 
similar to the slope_map. This would allow a high degree of control over 
the values of a pattern, and would almost be necessary for this 
variable_ior thing to be useable. This is one I might be able to 
handle...

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Mark Wagner
Subject: Re: variable refraction
Date: 28 Jan 2000 02:23:36
Message: <389143f8@news.povray.org>
Chris Huff wrote in message ...
>
>I have often noticed this, and have been wondering how it could be
>done...
>Probably the best way would be to follow the ray a short
>distance(specified by a parameter) into the object, sample the ior at
>that point(or actually, the rate and direction it is changing), and
>repeat this process. It would probably be as slow as media, and would
>slow media down(since the path media is sampled over would have to
>change due to the variable ior). It might not be extremely difficult to
>implement, but I don't have the math knowledge to do it.


I've been looking in to this, and handling variable IOR like this would be
MUCH slower than media, since for each step, you would need to do
intersection tests for the ray segment you are working with.  Further, these
steps would need to be much smaller than the steps used in calculating
media, since minor errors in sampling media tend to cancel each other out,
while minor errors in sampling a variable IOR tend to accumulate.  This
would be especially noticable when rendering large-scale phenomena like
mirages, where the errors will result in a blur instead of a mirage.

Mark


Post a reply to this message

From: Nieminen Juha
Subject: Re: variable refraction
Date: 28 Jan 2000 02:30:29
Message: <38914595@news.povray.org>
For the exact same reason non-linear transformations using a ray-marching
technique would be extremely slow...

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Gilles Tran
Subject: Re: variable refraction
Date: 28 Jan 2000 05:13:37
Message: <38916BDB.3494F6B9@inapg.inra.fr>
Richard wrote:

> I was modeling a glass bottle I keep on my desk a few days ago and
> realized that there was one aspect of it that I have been unable to
> produce in POV:  the different densities of the glass.  Hopefully you
> will know what I am talking about.  The bottle that I have is not of
> consistent thickness, so the refraction is not uniform.  Short of
> modeling the thing out of blobs, does anyone know how to simulate the
> different densities of the glass?

Is it a problem of variable ior or of variable thickness ? If the same
effect can be obtained through modelling (using isosurfaces and noise3d
for instance), it could be easier (not easy) to solve.
G.


Post a reply to this message

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