POV-Ray : Newsgroups : povray.binaries.images : Dielectric experiments Server Time
13 Nov 2024 01:49:47 EST (-0500)
  Dielectric experiments (Message 1 to 9 of 9)  
From: Robert McGregor
Subject: Dielectric experiments
Date: 8 Feb 2011 22:50:01
Message: <web.4d520c7e32b9a63f94d713cc0@news.povray.org>
According to Wikipedia, Mental Ray's *Dielectric Physical Phenomenon* shader
"uses Fresnel equations to simulate reflectance and transmittance of light
passing through the dielectric interface, as well as using Snell's law to
determine the angle of refraction. In addition Beer's law is used to determine
absorption of rays passing through dielectric materials."

Well, after looking over some basic dielectric equations I came up with this
simple POV-SDL setup for the following basic dielectric material in POV-Ray. The
transparency and reflection of the material automatically tune themselves
according to the material's IOR value:

//------------------------------------------------------------------------------
// Dielectric Ball
/------------------------------------------------------------------------------
global_settings { photons { spacing 0.01 } }

#declare IOR   = 1.33;
#declare REFL  = pow(((1-IOR)/(1+IOR)), 2);
#declare TRANS = 1 - REFL;

sphere { 0, 1
   texture {
      pigment { rgb 0 transmit TRANS }
      finish {
         reflection {0, REFL fresnel on } conserve_energy
         specular REFL roughness 0.005
      }
   }
   interior { ior IOR }
   photons {
      target
      refraction on
      reflection on
      collect off
   }
}

With an IOR at 1.0 the object is completely invisible and reflectionless,
although I see some hint of a photon ring at the invisible sphere's base (so, a
dielectric material might make a good cloaking device, but just like in sci-fi
movies there'll still be the occasional photon ripples to give your position
away).

I found it really interesting that the transmit and reflection values changed so
exponentially, with very quick changes from completely transparent at IOR 1.0 to
50% transparent at IOR 5.83, but it took an astonishing IOR 8000 to get to 0%
transparent and become totally opaque! Regardless, I think the circular photon
ring contracting into a dissipating glow dot is a really cool effect. I'm going
to have to render an animation of this...

Cheers,
Rob
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'dielectric_series.png' (1504 KB)

Preview of image 'dielectric_series.png'
dielectric_series.png


 

From: Dave Blandston
Subject: Re: Dielectric experiments
Date: 9 Feb 2011 00:45:06
Message: <web.4d5228f693e5ac671df6284f0@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> Regardless, I think the circular photon
> ring contracting into a dissipating glow dot is a really cool effect. I'm going
> to have to render an animation of this...

That does sound very interesting!

Regards,
Dave Blandston


Post a reply to this message

From: Thomas de Groot
Subject: Re: Dielectric experiments
Date: 9 Feb 2011 03:19:07
Message: <4d524dfb$1@news.povray.org>
"Dave Blandston" <nomail@nomail> schreef in bericht 
news:web.4d5228f693e5ac671df6284f0@news.povray.org...
> "Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
>> Regardless, I think the circular photon
>> ring contracting into a dissipating glow dot is a really cool effect. I'm 
>> going
>> to have to render an animation of this...
>
> That does sound very interesting!

I didn't *hear* Robert, but it *looks* quite exciting indeed  ;-)

Thomas


Post a reply to this message

From: Ive
Subject: Re: Dielectric experiments
Date: 10 Feb 2011 02:18:23
Message: <4d53913f$1@news.povray.org>
Am 09.02.2011 04:44, schrieb Robert McGregor:
> Well, after looking over some basic dielectric equations I came up with this
> simple POV-SDL setup for the following basic dielectric material in POV-Ray. The
> transparency and reflection of the material automatically tune themselves
> according to the material's IOR value:
>
> //------------------------------------------------------------------------------
> // Dielectric Ball
> /------------------------------------------------------------------------------
> global_settings { photons { spacing 0.01 } }
>
> #declare IOR   = 1.33;
> #declare REFL  = pow(((1-IOR)/(1+IOR)), 2);
> #declare TRANS = 1 - REFL;
>
> sphere { 0, 1
>     texture {
>        pigment { rgb 0 transmit TRANS }
>        finish {
>           reflection {0, REFL fresnel on } conserve_energy
>           specular REFL roughness 0.005
>        }
>     }
>     interior { ior IOR }
>     photons {
>        target
>        refraction on
>        reflection on
>        collect off
>     }
> }
>


Hmm, this does not look right to me - as far as I understand this 
dielectric matter. Sadly Kari Kivisalo seems to be no more around, the 
one that did just *know* such things.
Anyway it reminds me that I've never done any glass objects so thanks 
for the inspiration on that ;)

-Ive


Post a reply to this message

From: Nekar Xenos
Subject: Re: Dielectric experiments
Date: 10 Feb 2011 06:59:02
Message: <op.vqorkcapufxv4h@go-dynamite>
Does this mean transparency + ior + fresnel is wrong for glass?
I haven't grasped this dielectric stuff yet. Is there a more simple way to  
explain it?

-Nekar Xenos-


Post a reply to this message

From: Ive
Subject: Re: Dielectric experiments
Date: 10 Feb 2011 16:56:58
Message: <4d545f2a@news.povray.org>
Am 09.02.2011 04:44, schrieb Robert McGregor:
> According to Wikipedia, Mental Ray's *Dielectric Physical Phenomenon* shader
> "uses Fresnel equations to simulate reflectance and transmittance of light
> passing through the dielectric interface, as well as using Snell's law to
> determine the angle of refraction. In addition Beer's law is used to determine
> absorption of rays passing through dielectric materials."
>
> Well, after looking over some basic dielectric equations I came up with this
> simple POV-SDL setup for the following basic dielectric material in POV-Ray. The
> transparency and reflection of the material automatically tune themselves
> according to the material's IOR value:
>

As I had no time this morning here is a more detailed response:


> //------------------------------------------------------------------------------
> // Dielectric Ball
> /------------------------------------------------------------------------------
> global_settings { photons { spacing 0.01 } }
>
> #declare IOR   = 1.33;
> #declare REFL  = pow(((1-IOR)/(1+IOR)), 2);
> #declare TRANS = 1 - REFL;
>
> sphere { 0, 1
>     texture {
>        pigment { rgb 0 transmit TRANS }
>        finish {
>           reflection {0, REFL fresnel on } conserve_energy
>           specular REFL roughness 0.005
>        }
>     }
>     interior { ior IOR }
>     photons {
>        target
>        refraction on
>        reflection on
>        collect off
>     }
> }
>

Sorry, this is pointless. But step by step...

 > #declare REFL  = pow(((1-IOR)/(1+IOR)), 2);

this is the reflectance when seen *parallel* to the surface normal (or 

get 4% reflection and 96% refraction at this angle.
But when seen from a very swallow angle for *every* IOR reflection gets 
close to 100% and refraction to 0%. Again for glass, when seen from an 

refraction only 1.4%.
Everybody can verify this easily by looking at a *very* swallow angle at 
some glass window. The glass becomes an almost perfect mirror.
In POV-Ray-syntax this would be
reflection (REFL, 1) and definitely not reflection (0, REFL)
but it is completely unnecessary to compute the value for REFL because 
for this purpose we have the keyword fresnel.
reflection (0, 1 fresnel on)
already calculates exactly e.g. 4% reflection for a given IOR of 1.5 and 


The keyword transmit is meant to simulate something like light that 
falls through thin paper or through silk or something like this.
To simulate a dielectric it is much better to use filter. It makes 
things like colored glass possible and makes it also possible to take 
conservation of energy into account and therefor we have the 
conserve_energy keyword. So there is no need to calculate something
like
#declare TRANS = 1 - REFL;
especially since the whole point of fresnel reflection is that the 
relation between reflected and refracted (or transmitted as you did put 
it) rays is not constant but depends on the viewing angle.


A dielectric like window glass within POV-Ray is just as simple as this:

material {
   pigment {rgbf 1}
   finish {
     ambient 0  diffuse 0
     reflection {0, 1 fresnel on} conserve_energy
   }
   interior {ior 1.5}
}



A solution for colored dielectric materials within POV-Ray would be this 
macro:

#macro Dielectric (COLOR, IOR)
   material {
     texture {
       pigment {rgb COLOR filter 1}
       finish {
         ambient 0 diffuse 0
         reflection {0 1 fresnel on}  conserve_energy
       }
     }
     interior {
       ior IOR
       fade_power 1001 fade_distance 1/IOR
       fade_color rgb <pow(COLOR.red,3), pow(COLOR.green,3), 
pow(COLOR.blue,3)>
     }
   }
   photons {
     target
     refraction on
     reflection on
     collect off
   }
#end

It should even be possible to model something like porcelain (with some 
quite high IOR value) but dielectrics like this are more problematic as 
light scattering becomes more important.


Attached is a quick dielectric doodle and the source for it.

Note that the environment is (on purpose) quite boring so we have no 
interesting reflections on that thingies.

-Ive


Post a reply to this message


Attachments:
Download 'dielectricthing.jpg' (95 KB) Download 'us-ascii' (5 KB)

Preview of image 'dielectricthing.jpg'
dielectricthing.jpg

From: Robert McGregor
Subject: Re: Dielectric experiments
Date: 12 Feb 2011 14:10:02
Message: <web.4d56d7e593e5ac6794d713cc0@news.povray.org>
> Sorry, this is pointless. But step by step...

LOL, thanks Ive, I guess I got so caught up in what I was reading about
dielectrics I didn't take into account that POV already does all that, and I was
actually breaking it by redoing it!

Which is pretty funny to me because I already knew this (re: fresnel, etc), but
was somewhat thrown off by Mental Ray jargon and the equations I was looking at
(and the problem compounded by this video: http://vimeo.com/18586657). And yes,
I had the reflection params swapped (doh!). Thanks for setting me straight.
Which left me with a very simple glass material like I would have made had I
avoided all that confusion:

sphere { 0, 1
   texture {
      pigment { rgbt 1 }
      finish { reflection { 0, 1 fresnel on } conserve_energy }
   }
   interior { ior 80000 }
   photons {
      target
      refraction on
      reflection on
      collect off
   }
}

What I did learn from all of this is the rather obvious (in hindsight) fact that
higher reflectivity corresponds to less light transmission, and that a
dielectric material does in fact become "opaque" at around ior=80,000 (at 4
decimal places of accuracy) because the reflectivity hits 100% and light can
no longer pass through. The attached image uses the above material.


-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'dielectric.ior.80000.png' (457 KB)

Preview of image 'dielectric.ior.80000.png'
dielectric.ior.80000.png


 

From: Ive
Subject: Re: Dielectric experiments
Date: 13 Feb 2011 12:10:52
Message: <4d58109c$1@news.povray.org>
Am 12.02.2011 20:06, schrieb Robert McGregor:

> LOL, thanks Ive, I guess I got so caught up in what I was reading about
> dielectrics I didn't take into account that POV already does all that...

;)


> Which is pretty funny to me because I already knew this (re: fresnel, etc), but
> was somewhat thrown off by Mental Ray jargon and the equations I was looking at
> (and the problem compounded by this video: http://vimeo.com/18586657).

that was what I assumed as you have already shown that you do know better ;)


> higher reflectivity corresponds to less light transmission, and that a
> dielectric material does in fact become "opaque" at around ior=80,000 (at 4
> decimal places of accuracy) because the reflectivity hits 100% and light can
> no longer pass through. The attached image uses the above material.

Not so sure about the usefulness of such high values but anyway glass 
(and diamonds for that matter) are actually quite boring dielectrics. My 
favorite personal challenge is still porcelain where the refracted light 
does not simply travel along but gets scattered. I own a tea set made of 
Chinese porcelain (and have made a digital model of some parts of it) 
and I can render it and it might be even be recognized as porcelain but 
yet I do completely fail to capture the *beauty* of the light 
interacting with it.

-Ive


Post a reply to this message

From: Robert McGregor
Subject: Re: Dielectric experiments
Date: 15 Feb 2011 18:00:01
Message: <web.4d5b042193e5ac6794d713cc0@news.povray.org>
Ive <ive### [at] lilysoftorg> wrote:
>
> Not so sure about the usefulness of such high values but anyway glass
> (and diamonds for that matter) are actually quite boring dielectrics. My
> favorite personal challenge is still porcelain where the refracted light
> does not simply travel along but gets scattered. I own a tea set made of
> Chinese porcelain (and have made a digital model of some parts of it)
> and I can render it and it might be even be recognized as porcelain but
> yet I do completely fail to capture the *beauty* of the light
> interacting with it.
>
> -Ive

I've never tried rendering procelain before, that sounds interesting. I have a
few pieces here that I can use as reference, I think I'll give it a shot.

As for the higher IOR values becoming boring, I agree, but I wanted to observe
the changes that occur as the index changes from 1 (completely transparent) to
80,000 (completely solid/reflective) so I made this video and posted it on
Vimeo:

http://www.vimeo.com/19916827

I didn't realize the default Vimeo aspect ratio would distort my shot so much
until after it uploaded, so my orb looks like an egg (I'm re-rendering at the
Vimeo's default 800x480 to fix it).

The refraction and photons are fun to watch, the reflection not so much, so I
used a spline to control the IOR and "speed up" most of the reflection frames. I
was especially suprised by the lens-flare-like photon effect that happens on
that table between IOR 3-4; pretty cool. Enjoy!

Cheers,
Rob

-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'dielectric.pov.txt' (6 KB)

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