POV-Ray : Newsgroups : povray.newusers : Thickness of Transparent Objecs / Index of Refraction Server Time
14 Nov 2024 00:17:16 EST (-0500)
  Thickness of Transparent Objecs / Index of Refraction (Message 1 to 10 of 10)  
From: Takuya Arai
Subject: Thickness of Transparent Objecs / Index of Refraction
Date: 22 Sep 1999 20:03:34
Message: <37e96e56@news.povray.org>
I posted this to comp.graphics.rendering.raytracing but I thought I'd post 
this here too.

I have a really basic question of how POVRay handles light going through a
transparent object.  For example, say I made a chunk of rock with some edges 
so it has a vaguely crystal look and made it into a reddish ruby color and 
transparent (or translucent...can't remember the proper term).
                     
Obviously POVRay will calculate the index of refraction of the light going in. 
I think you can change that too.  However, my question is, how does POVRay 
calculate the thickness?  If the rock is hollow in the middle then the light 
wouldn't bend as much when it shines through as it would if it was solid.  
Does POVRay assume it's a solid?  Is it dependent on something?  It's really 
not that big of a deal but I'd like to know more for the academic standpoint 
for now.
                     
I made a quick and dirty render.  Essentially a sword in a stone type thing 
and made the stone that ruby chunk so I can see the tip of the sword inside 
the rock.  Obvioulsy there's distortion because of the ridges on the outside 
of the ruby but I'm wondering just how accurate the bending of the blade is.  
If you want, it's at:
                     
http://members.stratos.net/tima/images
                     
and it's the file swordinstone.jpg
                     
Anyway, if any of you can shed some light on this subject, I'd really 
appreciate it.  If you reply to this, please also send me a copy via e- mail 
since I dont' read this group too often.
                     
Thank you in advance for any help.
                     
Tim


Post a reply to this message

From: Ken
Subject: Re: Thickness of Transparent Objecs / Index of Refraction
Date: 22 Sep 1999 20:20:13
Message: <37E97191.A83EADD8@pacbell.net>
Takuya Arai wrote:
> 
> I posted this to comp.graphics.rendering.raytracing but I thought I'd post
> this here too.
> 
> I have a really basic question of how POVRay handles light going through a
> transparent object.  For example, say I made a chunk of rock with some edges
> so it has a vaguely crystal look and made it into a reddish ruby color and
> transparent (or translucent...can't remember the proper term).
> 
> Obviously POVRay will calculate the index of refraction of the light going in.
> I think you can change that too.  However, my question is, how does POVRay
> calculate the thickness?  If the rock is hollow in the middle then the light
> wouldn't bend as much when it shines through as it would if it was solid.
> Does POVRay assume it's a solid?  Is it dependent on something?  It's really
> not that big of a deal but I'd like to know more for the academic standpoint
> for now.
> 
> I made a quick and dirty render.  Essentially a sword in a stone type thing
> and made the stone that ruby chunk so I can see the tip of the sword inside
> the rock.  Obvioulsy there's distortion because of the ridges on the outside
> of the ruby but I'm wondering just how accurate the bending of the blade is.
> If you want, it's at:
> 
> http://members.stratos.net/tima/images
> 
> and it's the file swordinstone.jpg
> 
> Anyway, if any of you can shed some light on this subject, I'd really
> appreciate it.  If you reply to this, please also send me a copy via e- mail
> since I dont' read this group too often.
> 
> Thank you in advance for any help.
> 
> Tim
> 

 Think of it this way. If you have a standard POV-Ray box primitive and
apply an ior value to it Pov will treat it as a solid object. If we take
an example of a box created by six individual pieces, each with a known
thickness, then apply and ior value to it, Pov will handle the index of
refraction of each panel of the box but not the center of it. A good
example of this would be a drinking glass. It is a solid material where
the outer glass portion is, but the inside is hollow, where the liquid
goes. Pov will calculate the ior for the glass but not the hollow space
between it's walls.
  In the case of your "sword in a stone" Pov appears to be handling it
as one solid object which I presume is what you want. If you intentionally
hollowed out the inside of the stone and gave it's walls a finite thickness
the sword itself would appear differently in different areas of the stone.

-- 
Ken Tyler

See my 1000+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Takuya Arai
Subject: Re: Thickness of Transparent Objecs / Index of Refraction
Date: 22 Sep 1999 20:55:23
Message: <37e97a7b@news.povray.org>
In article <37E97191.A83EADD8@pacbell.net>, Ken <tyl### [at] pacbellnet> wrote:
> Think of it this way. If you have a standard POV-Ray box primitive and
>apply an ior value to it Pov will treat it as a solid object. If we take
>an example of a box created by six individual pieces, each with a known
>thickness, then apply and ior value to it, Pov will handle the index of
>refraction of each panel of the box but not the center of it. A good
>example of this would be a drinking glass. It is a solid material where
>the outer glass portion is, but the inside is hollow, where the liquid
>goes. Pov will calculate the ior for the glass but not the hollow space
>between it's walls.

Hm...now is there a way to create an "inside" in a box made from six 
individual pieces?  I could see something like that if I made a more complex 
shapes from primitives.

>  In the case of your "sword in a stone" Pov appears to be handling it
>as one solid object which I presume is what you want. If you intentionally
>hollowed out the inside of the stone and gave it's walls a finite thickness
>the sword itself would appear differently in different areas of the stone.

I forgot to meantion that I made the stone in sPatch.  Is it still treating 
the stone as a solid object?  Since the stone itself is just made up of unions 
of a buch of bicubic patches....or is the act of using a union make it a solid 
object without a hollow inside?  Or am I missing the point entirely???

Thanks for the insight though.  It does make sense that POV Ray would treat a 
primitive as a solid rather than a thin walled hollow object.

Tim


Post a reply to this message

From: Chimera S  Grafi
Subject: Re: Thickness of Transparent Objecs / Index of Refraction
Date: 22 Sep 1999 23:41:40
Message: <37e9a174@news.povray.org>
Basic idea is to think of the surfaces of objects as being the ior
calculation point I think might be the way to describe it.  A plane will
refract like a box if you think about it yet not have another side, interior
yes.  Except for certain things like plane, polygon, triangle, bicubic
patch, the entrance and exit of a surface is considered solid up until
meeting another surface of same interior refraction (not other objects, same
object only).  The bicubic mesh from sPatch should be the same when another
part of its surface is met and exited.  Since there are always chances for
bugs with such things I do not know if all meshes work as expected.
I've heard many descriptions of the workings, I'm just not perfectly clear
on it.

--
/* Chimera */

Takuya Arai <tim### [at] stratosnet> wrote in message
news:37e97a7b@news.povray.org...
| In article <37E97191.A83EADD8@pacbell.net>, Ken <tyl### [at] pacbellnet>
wrote:
| > Think of it this way. If you have a standard POV-Ray box primitive and
| >apply an ior value to it Pov will treat it as a solid object. If we take
| >an example of a box created by six individual pieces, each with a known
| >thickness, then apply and ior value to it, Pov will handle the index of
| >refraction of each panel of the box but not the center of it. A good
| >example of this would be a drinking glass. It is a solid material where
| >the outer glass portion is, but the inside is hollow, where the liquid
| >goes. Pov will calculate the ior for the glass but not the hollow space
| >between it's walls.
|
| Hm...now is there a way to create an "inside" in a box made from six
| individual pieces?  I could see something like that if I made a more
complex
| shapes from primitives.
|
| >  In the case of your "sword in a stone" Pov appears to be handling it
| >as one solid object which I presume is what you want. If you
intentionally
| >hollowed out the inside of the stone and gave it's walls a finite
thickness
| >the sword itself would appear differently in different areas of the
stone.
|
| I forgot to meantion that I made the stone in sPatch.  Is it still
treating
| the stone as a solid object?  Since the stone itself is just made up of
unions
| of a buch of bicubic patches....or is the act of using a union make it a
solid
| object without a hollow inside?  Or am I missing the point entirely???
|
| Thanks for the insight though.  It does make sense that POV Ray would
treat a
| primitive as a solid rather than a thin walled hollow object.
|
| Tim


Post a reply to this message

From: Nieminen Juha
Subject: Re: Thickness of Transparent Objecs / Index of Refraction
Date: 23 Sep 1999 06:36:20
Message: <37ea02a4@news.povray.org>
Takuya Arai <tim### [at] stratosnet> wrote:
: I think you can change that too.  However, my question is, how does POVRay 
: calculate the thickness?  If the rock is hollow in the middle then the light 
: wouldn't bend as much when it shines through as it would if it was solid.  
: Does POVRay assume it's a solid?  Is it dependent on something?  It's really 
: not that big of a deal but I'd like to know more for the academic standpoint 
: for now.

  Povray only handles (mathematical) surfaces, not solid 3D objects.
  The algorithm for refraction is pretty simple: First the ray is "outside".
When the ray hits the surface, another ray is shot from there (varying its
direction depending on the ior) and this ray will be "inside". When the
ray hits the surface of the same object again, the new ray will be again
"outside".

  New users often don't realize that objects are only surfaces and nothing
more.

-- 
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: Takuya Arai
Subject: Re: Thickness of Transparent Objecs / Index of Refraction
Date: 23 Sep 1999 08:15:15
Message: <37ea19d3@news.povray.org>
In article <37ea02a4@news.povray.org>, Nieminen Juha <war### [at] cctutfi> wrote:

>  Povray only handles (mathematical) surfaces, not solid 3D objects.
>  The algorithm for refraction is pretty simple: First the ray is "outside".
>When the ray hits the surface, another ray is shot from there (varying its
>direction depending on the ior) and this ray will be "inside". When the
>ray hits the surface of the same object again, the new ray will be again
>"outside".

Ah ha.  So it does handle it like a solid 3D object then.  Okay, that's 
cool...and I assume it works just the same even if you're using bicubic 
patches too then right?

>  New users often don't realize that objects are only surfaces and nothing
>more.

I knew that, but I wasn't sure if it would consider the inside of an object as 
a hollow space.  In another words, I wasn't sure if it would artificially put 
a thickness to a surface I guess.

Thank you.

Tim


Post a reply to this message

From: Ken
Subject: Re: Thickness of Transparent Objecs / Index of Refraction
Date: 23 Sep 1999 08:17:33
Message: <37EA19D2.D7B151B7@pacbell.net>
Takuya Arai wrote:

> Ah ha.  So it does handle it like a solid 3D object then.  Okay, that's
> cool...and I assume it works just the same even if you're using bicubic
> patches too then right?

Yes and triangles too.

-- 
Ken Tyler

See my 1000+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Peter Popov
Subject: Re: Thickness of Transparent Objecs / Index of Refraction
Date: 23 Sep 1999 15:44:18
Message: <1VTqN4P4v3hy=r=I9ZwYlfD3xy=o@4ax.com>
On Thu, 23 Sep 1999 00:01:08 GMT, tim### [at] stratosnet (Takuya Arai)
wrote:

>Obviously POVRay will calculate the index of refraction of the light going in. 
>I think you can change that too.  However, my question is, how does POVRay 
>calculate the thickness?  If the rock is hollow in the middle then the light 
>wouldn't bend as much when it shines through as it would if it was solid.  
>Does POVRay assume it's a solid?  Is it dependent on something?  It's really 
>not that big of a deal but I'd like to know more for the academic standpoint 
>for now.

POV calculates refraction based on the laws of physics. When the ray
crosses the boundary between two media (in the real-world sense of it,
not the POV media feature!) with different IORs, it bends. So when it
enters a gem with a bubble, for example, it will bend upon entering
the gem, travel linearly through it and bend upon exitting the gem. If
it hits the bubble before it leaves the gem, it will bend, then when
it hits the gem it will bend again etc. Does this answer your
question?


Peter Popov
ICQ: 15002700


Post a reply to this message

From: Nieminen Juha
Subject: Re: Thickness of Transparent Objecs / Index of Refraction
Date: 24 Sep 1999 03:37:29
Message: <37eb2a39@news.povray.org>
Takuya Arai <tim### [at] stratosnet> wrote:
: Ah ha.  So it does handle it like a solid 3D object then.

  Well, yes and no.
  Povray handles objects as if they were solid for: a) refraction, and
b) fog/media.
  For anything else objects are just surfaces (for example when texturing).

  Note that the keyword 'hollow' doesn't affect refraction in any way. It's
just a fog/media related thing.

:  Okay, that's 
: cool...and I assume it works just the same even if you're using bicubic 
: patches too then right?

  A surface is a surface. The same rule applies to all of them. Ray hits
it -> we are inside; ray hits it again -> we are outside.
  This of course causes problems when the surface is not closed...

  Note that bicubic patches and triangle meshes work ok in refraction, but
not in CSG.

: I knew that, but I wasn't sure if it would consider the inside of an object as 
: a hollow space.

  There is only hollow space inside the objects. To see it, move the camera
inside them.
  They might look like solid when refracting, but they aren't really.

-- 
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: Takuya Arai
Subject: Re: Thickness of Transparent Objecs / Index of Refraction
Date: 26 Sep 1999 20:28:07
Message: <37eeba17@news.povray.org>
In article <1VTqN4P4v3hy=r=I9ZwYlfD3xy=o@4ax.com>, Peter Popov <pet### [at] usanet>
wrote:

>POV calculates refraction based on the laws of physics. When the ray
>crosses the boundary between two media (in the real-world sense of it,
>not the POV media feature!) with different IORs, it bends. So when it
>enters a gem with a bubble, for example, it will bend upon entering
>the gem, travel linearly through it and bend upon exitting the gem. If
>it hits the bubble before it leaves the gem, it will bend, then when
>it hits the gem it will bend again etc. Does this answer your
>question?

Yeah...I have a BS in physics....that makes sense :)  Just wanted to know if 
it did in fact follow those basic laws.

Thanks!

Tim


Post a reply to this message

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