POV-Ray : Newsgroups : povray.text.scene-files : Refraction bug(?) this time Server Time
29 Jul 2024 02:21:57 EDT (-0400)
  Refraction bug(?) this time (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: =Bob
Subject: Refraction bug(?) this time
Date: 2 Dec 1998 22:41:01
Message: <3666084d.0@news.povray.org>
Here it is.
The planes refraction apparently jumps over into the sphere, which is shown 
floating halfway in the watery looking plane surface.
The sphere itself is simply an invisible rgbf 1 pigment, a modest finish 
without any reflection and with no refraction enabled in it.
The plane does have an ior; and an inverse keyword, which I tried before and 
after the interior statement with the same result.

// Refraction bug?
// refraction seems to jump into an external object
// which itself does not have an ior
// 98.91, bob hughes

// when 1 (inverse used) refraction jumps into sphere, 2 does not
#declare RB = 1  //use 1 or 2

light_source { 0*x color rgb 1 }
camera {location <0,5,-9> look_at <0,3,0>}

// strange sphere (no refraction used)
sphere {<0,0,0>,3
  hollow on
 pigment {rgbf<1,1,1,1>} normal {wrinkles .1}
  finish {ambient 0 diffuse 0 reflection 0 reflection_exponent 0}
 translate 3*y
}

// strange plane (refraction can jump into sphere)
plane {y,3
 hollow on
 texture {pigment {rgbf <1,1,1,.5>}
  normal {wrinkles .5 turbulence .5 ramp_wave}
   finish {phong 1 phong_size 100
//please note that reflection is turned off completely
   reflection 0 reflection_exponent 1
   }
  }
 
 interior {ior 1.23}

#switch (RB)
 #case (1)
   inverse  // the culprit? or is it simply a refraction bug alone
 #break
 #case (2)
   //no inverse used
 #end
}

// base plane
plane {y,0 hollow on
 texture {pigment {rgb<0,1,0>}
  finish {ambient .15 diffuse .85 phong .3 phong_size 123}}
}

sky_sphere	// evening
{
  pigment
  {
    gradient y
color_map { [0.0 color rgb<0.9,0.5,0.475>] [1.0 color rgb<0.2,0.45,0.65>] }
  }
}
//END

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.html
=Bob


Post a reply to this message

From: Ken
Subject: Re: Refraction bug(?) this time
Date: 2 Dec 1998 22:49:14
Message: <3666099E.F39058D8@pacbell.net>
=Bob wrote:

> Here it is.
> The planes refraction apparently jumps over into the sphere, which is shown
> floating halfway in the watery looking plane surface.
> The sphere itself is simply an invisible rgbf 1 pigment, a modest finish
> without any reflection and with no refraction enabled in it.
> The plane does have an ior; and an inverse keyword, which I tried before and
> after the interior statement with the same result.
>
> // Refraction bug?
> // refraction seems to jump into an external object
> // which itself does not have an ior
> // 98.91, bob hughes

Have you stopped to consider that when you use the inverse
keyword on the plane, with your camera located where it is,
the sphere is inside a solid object ( i.e. the plane) ?

Ken Tyler


Post a reply to this message

From: Nathan Kopp
Subject: Re: Refraction bug(?) this time
Date: 2 Dec 1998 23:18:08
Message: <36660FC3.9D17DED0@Kopp.com>
> // refraction seems to jump into an external object
> // which itself does not have an ior
> // 98.91, bob hughes
> 
> // when 1 (inverse used) refraction jumps into sphere, 2 does not

Actually, this is technically not true.  The sphere DOES have an IOR... it is
1.0 by default.  Because this is the same as the air (empty space), when
you don't use inverse, you don't see any effect.  However, when you do
use the inverse, as Ken mentioned, the camera is inside the water plane, so
there is a change in IOR values when the light beam passes from the water
(ior 1.23) into the sphere (ior 1.0).  Therefore, POV calculates the
refraction angle properly.

-Nathan


Post a reply to this message

From: =Bob
Subject: Re: Refraction bug(?) this time
Date: 2 Dec 1998 23:48:08
Message: <36661808.0@news.povray.org>
I think I get you.
Except for the fact that, what I'm thinking about is, since there is no csg 
taking place and all the objects are set to hollow (meaning the sphere 
hollowness should be unchanged regardless) why then isn't it still just a 
totally invisible object? It ought to be as a container object should be for 
media and not ever become visible when an external object encounters it.
I remind you of the fact that *all* objects are set to hollow and inversing 
any would still make for all hollow (or is this the thing, hollow turns 
off???). Reason of course being that the outside of any is already hollow 
anyway, and setting them to hollow is like making the entire scene hollow.
Right? or am I still not convincing anyone?

Message <36660FC3.9D17DED0@Kopp.com>, Nathan Kopp  typed...
>
>> // refraction seems to jump into an external object
>> // which itself does not have an ior
>> // 98.91, bob hughes
>> 
>> // when 1 (inverse used) refraction jumps into sphere, 2 does not
>
>Actually, this is technically not true.  The sphere DOES have an IOR... it is
>1.0 by default.  Because this is the same as the air (empty space), when
>you don't use inverse, you don't see any effect.  However, when you do
>use the inverse, as Ken mentioned, the camera is inside the water plane, so
>there is a change in IOR values when the light beam passes from the water
>(ior 1.23) into the sphere (ior 1.0).  Therefore, POV calculates the
>refraction angle properly.
>
>-Nathan

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.html
=Bob


Post a reply to this message

From: Ken
Subject: Re: Refraction bug(?) this time
Date: 3 Dec 1998 00:14:00
Message: <36661D7A.C1C15D85@pacbell.net>
Forgetting your thoughts on the hollow key word instead
lets look at the different objects here and their properties.
If we took a box, instead of the plane, and assigned it
a refractive ior value. Inside of this box we place a sphere
with the value you ascribed of rgbf 1. As you have
mentioned by itself floating in air the object is technicaly
invisible. When you place the sphere inside the box on the
other hand it would be treated as something akin to an air
pocket inside a glass cube. The rays calculated for the space
in the cube will be different than those for the rest of the box
object. While technicaly this is an invalid model but it suffices
to illustrate the point.
  The hollow keyword is necessary for pov to understand
exactly what is inside and what is out. If you wanted to
place a media inside the box and not the sphere pov gets
confused as to whose surface normal belongs to who. The
hollow keyword sets this conditionaly but has no other effect
on solid objects. In effect the object is really still solid. Only
the way the objects interior is treated is different when media
effects are being calculated.

Ken Tyler

=Bob wrote:

> I think I get you.
> Except for the fact that, what I'm thinking about is, since there is no csg
> taking place and all the objects are set to hollow (meaning the sphere
> hollowness should be unchanged regardless) why then isn't it still just a
> totally invisible object? It ought to be as a container object should be for
> media and not ever become visible when an external object encounters it.
> I remind you of the fact that *all* objects are set to hollow and inversing
> any would still make for all hollow (or is this the thing, hollow turns
> off???). Reason of course being that the outside of any is already hollow
> anyway, and setting them to hollow is like making the entire scene hollow.
> Right? or am I still not convincing anyone?
>
> Message <36660FC3.9D17DED0@Kopp.com>, Nathan Kopp  typed...
> >
> >> // refraction seems to jump into an external object
> >> // which itself does not have an ior
> >> // 98.91, bob hughes
> >>
> >> // when 1 (inverse used) refraction jumps into sphere, 2 does not
> >
> >Actually, this is technically not true.  The sphere DOES have an IOR... it is
> >1.0 by default.  Because this is the same as the air (empty space), when
> >you don't use inverse, you don't see any effect.  However, when you do
> >use the inverse, as Ken mentioned, the camera is inside the water plane, so
> >there is a change in IOR values when the light beam passes from the water
> >(ior 1.23) into the sphere (ior 1.0).  Therefore, POV calculates the
> >refraction angle properly.
> >
> >-Nathan
>
> --
>  omniVERSE: beyond the universe
>   http://members.aol.com/inversez/POVring.html
> =Bob


Post a reply to this message

From: =Bob
Subject: Re: Refraction bug(?) this time
Date: 3 Dec 1998 00:31:44
Message: <36662240.0@news.povray.org>
I know exactly what you mean now.
It's the different-surface concept, such as the well known water in a glass 
type paradox.
Refraction has been put into the air, simply put, as was said. The sphere then 
is an intersecting surface despite its own composition where no refraction 
exists thus causing the bent rays at that surface. Still plane interior, as it 
were, encompassing the sphere.
Makes perfect sense too. Only wish I had thought of it before myself, but 
maybe others reading here will be enlightened as well.
And damn good thing I didn't send in a genuine bug report to the POV Team!

  :)

Message <36661D7A.C1C15D85@pacbell.net>, Ken  typed...
>
>  Forgetting your thoughts on the hollow key word instead
>lets look at the different objects here and their properties.
>If we took a box, instead of the plane, and assigned it
>a refractive ior value. Inside of this box we place a sphere
>with the value you ascribed of rgbf 1. As you have
>mentioned by itself floating in air the object is technicaly
>invisible. When you place the sphere inside the box on the
>other hand it would be treated as something akin to an air
>pocket inside a glass cube. The rays calculated for the space
>in the cube will be different than those for the rest of the box
>object. While technicaly this is an invalid model but it suffices
>to illustrate the point.
>  The hollow keyword is necessary for pov to understand
>exactly what is inside and what is out. If you wanted to
>place a media inside the box and not the sphere pov gets
>confused as to whose surface normal belongs to who. The
>hollow keyword sets this conditionaly but has no other effect
>on solid objects. In effect the object is really still solid. Only
>the way the objects interior is treated is different when media
>effects are being calculated.
>
>Ken Tyler
>
>=Bob wrote:
>
>> I think I get you.
>> Except for the fact that, what I'm thinking about is, since there is no csg
>> taking place and all the objects are set to hollow (meaning the sphere
>> hollowness should be unchanged regardless) why then isn't it still just a
>> totally invisible object? It ought to be as a container object should be 
for
>> media and not ever become visible when an external object encounters it.
>> I remind you of the fact that *all* objects are set to hollow and inversing
>> any would still make for all hollow (or is this the thing, hollow turns
>> off???). Reason of course being that the outside of any is already hollow
>> anyway, and setting them to hollow is like making the entire scene hollow.
>> Right? or am I still not convincing anyone?
>>
>> Message <36660FC3.9D17DED0@Kopp.com>, Nathan Kopp  typed...
>> >
>> >> // refraction seems to jump into an external object
>> >> // which itself does not have an ior
>> >> // 98.91, bob hughes
>> >>
>> >> // when 1 (inverse used) refraction jumps into sphere, 2 does not
>> >
>> >Actually, this is technically not true.  The sphere DOES have an IOR... it 
is
>> >1.0 by default.  Because this is the same as the air (empty space), when
>> >you don't use inverse, you don't see any effect.  However, when you do
>> >use the inverse, as Ken mentioned, the camera is inside the water plane, 
so
>> >there is a change in IOR values when the light beam passes from the water
>> >(ior 1.23) into the sphere (ior 1.0).  Therefore, POV calculates the
>> >refraction angle properly.
>> >
>> >-Nathan
>>
>> --
>>  omniVERSE: beyond the universe
>>   http://members.aol.com/inversez/POVring.html
>> =Bob
>
>
>

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.html
=Bob


Post a reply to this message

From: Ken
Subject: Re: Refraction bug(?) this time
Date: 3 Dec 1998 06:51:26
Message: <36667A9F.62493D0D@pacbell.net>
I'm glad you were able to read between the lines in my explanation.
I saw through your logic but was having a hard time trying to present
a model you would understand.
   On issues like this I really wish that some of the super raytracing
guru's hung out reguraly on these group. Someone like Chris Young
himself, having worked on the core code and knowing the exact reasons
that things are structered the way they are, could really be a benneift
to the users of the program. While the docs do a fairly good job of describing the
circumstances, they do not always go into suffecient
detail or list a number of examples illustrating all that is needed
to understand all of the nuances of the features.

Oh well ! Wish in one hand and _ _ _ _ in the other...

Ken Tyler


Post a reply to this message

From: Nieminen Mika
Subject: Re: Refraction bug(?) this time
Date: 3 Dec 1998 13:27:41
Message: <3666d81d.0@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
:   Forgetting your thoughts on the hollow key word instead
: lets look at the different objects here and their properties.
: ...

  I have noticed that there is a lot of confusion about hollow/solid
objects, the 'hollow' keyword and whether a 'plane' object is a 2-dimensional
surface or not.
  For example, I remember a sample scene in the official distribution
of povray (at least pov3.0; I haven't checked 3.1) with a wall made this
way:
plane
{ z,100 hollow
}
  There wasn't any reason why that wall plane should be hollow. Obviously
the maker of that sample scene put that keyword to get rid of the
"camera inside non-hollow object" warning.
  (of course the right way to make that wall should be:
plane
{ -z,-100
} )

  I have frequently seen people confused with the plane object. They
obviously think about it as a 2D sheet, with no inside part, with both
sides as outside.
  Another big confusion is the concept 'solid and hollow object' and the
keyword 'hollow'. They don't know that solidness and hollowness have
nothing to do with CSG but only with media. There is also confusion about
the fact that povray actually only models surfaces, not true solid 3D
objects.
  I'm not saying I understand everyting, of course :)
  I'm still a little confused with the 'clipped_by' statement. I don't
know, if you clip off a part of an object, where is the inside and
where the outside of the object, specially at the hole. This will affect
only the media inside the object, of course. I have never tested it. Anyone
know something about this?

-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

From: Ken
Subject: Re: Refraction bug(?) this time
Date: 3 Dec 1998 14:18:13
Message: <3666E357.4309B895@pacbell.net>
Nieminen Mika wrote:

>   I have frequently seen people confused with the plane object. They
> obviously think about it as a 2D sheet, with no inside part, with both
> sides as outside.

Agreed on this one. And what makes it even more confusing isif you apply a solid
texture to the plane and your camera is on
the inside you can still see your scene clearly. Not true though
if you put your camera inside a solid textured box. This makes
it hard to grasp the relationships.

>   I'm not saying I understand everyting, of course :)

Yowser. And I thought I was alone in the dark.

>   I'm still a little confused with the 'clipped_by' statement. I don't
> know, if you clip off a part of an object, where is the inside and
> where the outside of the object, specially at the hole. This will affect
> only the media inside the object, of course. I have never tested it. Anyone
> know something about this?

That is an interesting point. I have a similar confusion about what
happens when you declare a 2D box like :

box{<-1,-1,0>,<1,1,0>}

This will render a single face of a 1x1x0(?) box. Where is the inside
and outside of such an object ? If a take six such 2D faces and
construct a cube from them using a union would I have to apply
the hollow state to get media to work inside ?

The same with disks. Is there a surface normal for the disk object
and how does it effect media ?

Stay tune for the answers to these questions and more in next weeks
dramatic episode of "All my Renders" ! Immediatly following our
show "One Life to Raytrace".

An now a word from our sponsers...

Ken Tyler


Post a reply to this message

From: =Bob
Subject: Re: Refraction bug(?) this time
Date: 3 Dec 1998 15:46:06
Message: <3666f88e.0@news.povray.org>
Well, back to the problem at hand.
I was a believer, for a brief moment or two, that the ior was being dealt with 
correctly according to the laws of POV-Ray then it occured to me...
Why was I never seeing same-such effect when using the other primitives, ie. a 
sphere, causing all "outside" areas to be affected with its ior?
I tried replacing the plane in my example with one and it does not cause the 
refraction to exist outwardly. Who already could have guessed that one? Most 
anybody I suppose.
Now see how the plane is awkwardly doing something other objects do not?
That means a plane (or other things too?) is not following the same principal. 
I understood the nature of them already, that they have inside and outside. 
Guess that's why this caught my attention so much, if other shapes in csg (or 
not, remember my example uses none) did this it would be a disaster since many 
csg-created objects use an inverse to get the right construction.
A plane *is* capable of csg too, as many may know, by keeping the 
inside/outside in mind, same goes for all the other primitives capable of csg.
Okay, carry on...
Btw, it's nice to have people here who can discuss this stuff.
Thanks all.

Message <3666E357.4309B895@pacbell.net>, Ken  typed...
>
>Nieminen Mika wrote:
>
>>   I have frequently seen people confused with the plane object. They
>> obviously think about it as a 2D sheet, with no inside part, with both
>> sides as outside.
>
>Agreed on this one. And what makes it even more confusing isif you apply a 
solid
>texture to the plane and your camera is on
>the inside you can still see your scene clearly. Not true though
>if you put your camera inside a solid textured box. This makes
>it hard to grasp the relationships.
>
>>   I'm not saying I understand everyting, of course :)
>
>Yowser. And I thought I was alone in the dark.
>
>>   I'm still a little confused with the 'clipped_by' statement. I don't
>> know, if you clip off a part of an object, where is the inside and
>> where the outside of the object, specially at the hole. This will affect
>> only the media inside the object, of course. I have never tested it. Anyone
>> know something about this?
>
>That is an interesting point. I have a similar confusion about what
>happens when you declare a 2D box like :
>
>box{<-1,-1,0>,<1,1,0>}
>
>This will render a single face of a 1x1x0(?) box. Where is the inside
>and outside of such an object ? If a take six such 2D faces and
>construct a cube from them using a union would I have to apply
>the hollow state to get media to work inside ?
>
>The same with disks. Is there a surface normal for the disk object
>and how does it effect media ?
>
>Stay tune for the answers to these questions and more in next weeks
>dramatic episode of "All my Renders" ! Immediatly following our
>show "One Life to Raytrace".
>
>An now a word from our sponsers...
>
>Ken Tyler
>

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.html
=Bob


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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