POV-Ray : Newsgroups : povray.newusers : Glass reflection Server Time
2 Jul 2024 11:13:33 EDT (-0400)
  Glass reflection (Message 1 to 9 of 9)  
From: tomcool
Subject: Glass reflection
Date: 18 Nov 2010 16:05:01
Message: <web.4ce5941b28167adf937bbe0b0@news.povray.org>
Hello, I'm stuck on a problem concerning the reflection of objects which use
either the basic povray "Glass" texture or a custom one.

here are four pictures to describe the problem :
http://img690.imageshack.us/gal.php?g=vitre2.png

The camera is located inside a house (and is looking outside).

As you can see on the first 2 pictures (one with the custom glass, the other one
with the basic glass), we can see the street by the left window, but through the
other window, there is like a bug that makes it behave like a perfect mirror on
the left part of it( I'm not sure about that).
The third picture shows that this problems depends on the angle between the
camera and the window. The problems doesn't appear if you look at the window
directly (last picture).
I insist on the fact that it happens for all the windows in the street, it only
depends on the angle.

Please don't ask about how the windows are constructed, there can't be a problem
with that because there are all built with the same macro which places
window-panes and this macro works perfectly if you look at it directly.

This is the code for the custom glass texture (which is not mine):

#declare Window_Glass =
texture{
  pigment{ rgbf<0.98,0.98,0.98,0.8>}
    finish {
    specular 0.7
    roughness 0.001
    ambient 0
    diffuse 0
    reflection {
      0.2, 1.0
      fresnel on
    }
    conserve_energy
  }
} // end of texture

If dosen't really matter if this texture is good or not, the problem occurs with
the basic Glass texture too.

I hope you understand the problem, I don't know if this is normal but I haven't
found a topic about that. Thank you for your replies.


Post a reply to this message

From: Warp
Subject: Re: Glass reflection
Date: 18 Nov 2010 16:44:27
Message: <4ce59e3b@news.povray.org>
tomcool <nomail@nomail> wrote:
> Please don't ask about how the windows are constructed, there can't be a problem
> with that because there are all built with the same macro which places
> window-panes and this macro works perfectly if you look at it directly.

  What you are seeing is called "total internal reflection" (google for it).
However, TIR shouldn't appear on a pane of glass like a window. I don't know
why it's happening in your case, but it almost surely is because of how you
are creating the glass panes. There must be something odd in how you are
creating them.

-- 
                                                          - Warp


Post a reply to this message

From: tomcool
Subject: Re: Glass reflection
Date: 18 Nov 2010 17:20:00
Message: <web.4ce5a61bce4dd363937bbe0b0@news.povray.org>
Thanks for the information. I'm going to explain precisely how the windows are
built :

I have a macro that creates one window-pane (the size is a parameter of the
macro), then I have another macro who uses the first one  and build the window
with the total size of the window and the number of window-panes as parameters.
I'll check if I find anything weird in it and post the code If I don't.


Post a reply to this message

From: Warp
Subject: Re: Glass reflection
Date: 18 Nov 2010 17:37:47
Message: <4ce5aaba@news.povray.org>
tomcool <nomail@nomail> wrote:
> Thanks for the information. I'm going to explain precisely how the windows are
> built :

> I have a macro that creates one window-pane (the size is a parameter of the
> macro), then I have another macro who uses the first one  and build the window
> with the total size of the window and the number of window-panes as parameters.
> I'll check if I find anything weird in it and post the code If I don't.

  It's not really how you instantiate them, but their shape. Is the window
pane just a box, or is it something else? If you are eg. using a plane
instead, that might cause some problems.

-- 
                                                          - Warp


Post a reply to this message

From: tomcool
Subject: Re: Glass reflection
Date: 18 Nov 2010 17:50:01
Message: <web.4ce5acbdce4dd363937bbe0b0@news.povray.org>
well the pane is basic, only boxes : (sorry for french code )

               //width         height        thickness
#macro Carreau(largeurCarreau,hauteurCarreau,epaisseurCarreau)
    union{

        //glass part
        box
        {
        <epaisseurCarreau,epaisseurCarreau,epaisseurCarreau/2>
<largeurCarreau-epaisseurCarreau,hauteurCarreau,epaisseurCarreau/2+0.001>
        texture{Window_Glass}
        }

        //down solid part
        box
        {<0,0,0>
        <largeurCarreau,epaisseurCarreau,epaisseurCarreau>
        }

        //up solid part
        box
        {<0,0,0>
        <largeurCarreau,epaisseurCarreau,epaisseurCarreau>
        translate<0,hauteurCarreau,0>
        }

        //right solid part
        box
        {<0,0,0>
        <hauteurCarreau,epaisseurCarreau,epaisseurCarreau>
        rotate<0,0,90>
        translate<largeurCarreau,0,0>
        }

        //left solid part
        box
        {<0,0,0>
        <hauteurCarreau,epaisseurCarreau,epaisseurCarreau>
        rotate<0,0,90>
        translate<epaisseurCarreau,0,0>
        }
    }
#end


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Glass reflection
Date: 18 Nov 2010 18:46:14
Message: <4ce5bac6$1@news.povray.org>
tomcool wrote:

> well the pane is basic, only boxes

Not sure if this is related to your problem but try
to avoid the coincident surfaces (the outer sides of
your glass are exactly on the inner sides of the frame,
try making the glass a bit smaller).

Also, what is the interior block applied to the Carreau
later? I assume you have one as you use fresnel reflection.
Note that min/max reflection, ior, and viewing angle then
determine how strong the reflection is.


Post a reply to this message

From: Alain
Subject: Re: Glass reflection
Date: 18 Nov 2010 22:57:17
Message: <4ce5f59d$1@news.povray.org>

> Hello, I'm stuck on a problem concerning the reflection of objects which use
> either the basic povray "Glass" texture or a custom one.
>
> here are four pictures to describe the problem :
> http://img690.imageshack.us/gal.php?g=vitre2.png
>
> The camera is located inside a house (and is looking outside).
>
> As you can see on the first 2 pictures (one with the custom glass, the other one
> with the basic glass), we can see the street by the left window, but through the
> other window, there is like a bug that makes it behave like a perfect mirror on
> the left part of it( I'm not sure about that).
> The third picture shows that this problems depends on the angle between the
> camera and the window. The problems doesn't appear if you look at the window
> directly (last picture).
> I insist on the fact that it happens for all the windows in the street, it only
> depends on the angle.
>
> Please don't ask about how the windows are constructed, there can't be a problem
> with that because there are all built with the same macro which places
> window-panes and this macro works perfectly if you look at it directly.
>
> This is the code for the custom glass texture (which is not mine):
>
> #declare Window_Glass =
> texture{
>    pigment{ rgbf<0.98,0.98,0.98,0.8>}
>      finish {
>      specular 0.7
>      roughness 0.001
>      ambient 0
>      diffuse 0
>      reflection {
>        0.2, 1.0
>        fresnel on
>      }
>      conserve_energy
>    }
> } // end of texture
>
> If dosen't really matter if this texture is good or not, the problem occurs with
> the basic Glass texture too.
>
> I hope you understand the problem, I don't know if this is normal but I haven't
> found a topic about that. Thank you for your replies.
>
>
>

Apparently, your glass "pane" extend everywhere inside the room!
Any message about the camera been unside a non hollow object?

The glass obviously have an ior, and when the angle is broad enough, 

A strong clue to that is the curved nature of the reflective part and 
the relfection that also affect the second window viewed in the reflection.




Alain


Post a reply to this message

From: tomcool
Subject: Re: Glass reflection
Date: 19 Nov 2010 07:25:00
Message: <web.4ce66c4ece4dd363c63d0a300@news.povray.org>
It seems that the problem is fixed thanks to your advices :

http://yfrog.com/ehvitre5p

apparently the fact that the glass part is a box was the cause of the problem :
the box doesn't have an IOR factor so it behaves like a normal object, not like
a reflecting one. I added the interior part in the code of the glass part :

        box
        {
        <epaisseurCarreau,epaisseurCarreau,epaisseurCarreau/2>

<largeurCarreau-epaisseurCarreau,hauteurCarreau,epaisseurCarreau/2+0.001>
        texture{Window_Glass}
        interior { ior 1.8}
        //I don't know much about the value of the Ior but it works now
        }

Thank you for your help!


Post a reply to this message

From: Warp
Subject: Re: Glass reflection
Date: 19 Nov 2010 15:13:52
Message: <4ce6da80@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> tomcool wrote:

> > well the pane is basic, only boxes

> Not sure if this is related to your problem but try
> to avoid the coincident surfaces (the outer sides of
> your glass are exactly on the inner sides of the frame,
> try making the glass a bit smaller).

  Coincident surfaces is definitely something which might trigger the
total internal reflection.

-- 
                                                          - Warp


Post a reply to this message

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