POV-Ray : Newsgroups : povray.general : Not a bug, I must have incorrect expectations Server Time
29 Jul 2024 16:19:18 EDT (-0400)
  Not a bug, I must have incorrect expectations (Message 1 to 6 of 6)  
From: bittramp
Subject: Not a bug, I must have incorrect expectations
Date: 23 Feb 2011 17:25:00
Message: <web.4d658891666c9b25f9c9f2a80@news.povray.org>
Hello,
I am pretty sure this is not a bug and I just have some incorrect expectations
of the materials but I would like to have someone kindly explain this
phenomenon.

I started making an object and have a cube and wanted to position glass boxes
around it's sides.  But I get that static like distortion inside the glass you
normally see when two planes overlap.  I've included the very short code below.
There is a line to rotate the object 1 degree about the y axis.  If you take
that one line out and run again, the distortion is gone.

As a bonus, the distortion only appears in the glassSide object that is rotated
270 degrees.

Am I doing/thinking about something wrong and this is the correct behavior?

Thanks,
BBB


#include "colors.inc"
#include "stones.inc"
#include "glass.inc"
#include "math.inc"
#include "textures.inc"

camera{ location <-2, 2, -3> look_at <0, 0, 0>}

light_source { <0, 20, -20> color White }

#declare glassSide = box { <-1.5, -.5, -1>
        <-1, .5, 1>
}

#declare glassBorder =
union
{
        object { glassSide }
        object { glassSide rotate <0, 270, 0> }
}

union
{
        box { <-1, -1, -1>
                <1, 1, 1>
                pigment { color rgb<0, 0, 1> }
        }
        object
        {
                glassBorder
                pigment { color rgbf<1, 1, 1, 1> } interior {I_Glass} finish{
phong 0.9 phong_size 40 reflection 0.1 }
        }
        scale 1.3
        rotate <0,1,0> /* comment out this line */
}


Post a reply to this message

From: Alain
Subject: Re: Not a bug, I must have incorrect expectations
Date: 23 Feb 2011 18:06:12
Message: <4d6592e4$1@news.povray.org>

> Hello,
> I am pretty sure this is not a bug and I just have some incorrect expectations
> of the materials but I would like to have someone kindly explain this
> phenomenon.
>
> I started making an object and have a cube and wanted to position glass boxes
> around it's sides.  But I get that static like distortion inside the glass you
> normally see when two planes overlap.  I've included the very short code below.
> There is a line to rotate the object 1 degree about the y axis.  If you take
> that one line out and run again, the distortion is gone.
>
> As a bonus, the distortion only appears in the glassSide object that is rotated
> 270 degrees.
>
> Am I doing/thinking about something wrong and this is the correct behavior?
>
> Thanks,
> BBB
>
>
> #include "colors.inc"
> #include "stones.inc"
> #include "glass.inc"
> #include "math.inc"
> #include "textures.inc"
>
> camera{ location<-2, 2, -3>  look_at<0, 0, 0>}
>
> light_source {<0, 20, -20>  color White }
>
> #declare glassSide = box {<-1.5, -.5, -1>
>          <-1, .5, 1>
> }
>
> #declare glassBorder =
> union
> {
>          object { glassSide }
>          object { glassSide rotate<0, 270, 0>  }
> }
>
> union
> {
>          box {<-1, -1, -1>
>                  <1, 1, 1>
>                  pigment { color rgb<0, 0, 1>  }
>          }
>          object
>          {
>                  glassBorder
>                  pigment { color rgbf<1, 1, 1, 1>  } interior {I_Glass} finish{
> phong 0.9 phong_size 40 reflection 0.1 }
>          }
>          scale 1.3
>          rotate<0,1,0>  /* comment out this line */
> }
>
>

You DO have coincident surfaces between the blue box and the transparent 
ones.

Just add "scale 1.0001" to the blue box and the problem disapears.

Also, you should use a merge of the two transparent boxes.




Alain


Post a reply to this message

From: Jim Holsenback
Subject: Re: Not a bug, I must have incorrect expectations
Date: 23 Feb 2011 19:34:51
Message: <4d65a7ab@news.povray.org>
On 02/23/2011 07:06 PM, Alain wrote:
> You DO have coincident surfaces between the blue box and the transparent
> ones.
> 
> Just add "scale 1.0001" to the blue box and the problem disapears.
> 
> Also, you should use a merge of the two transparent boxes.

That ones been asked several times lately, and it's a VFAQ topic on the
Wiki. I had a look and it didn't mention the scale solution so I updated
it to include that as another possible fix ... so next time it's asked
you can refer them if you'd like:

http://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_20


Post a reply to this message

From: bittramp
Subject: Re: Not a bug, I must have incorrect expectations
Date: 23 Feb 2011 20:45:00
Message: <web.4d65b80a691ad14e7d0afb200@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:


> You DO have coincident surfaces between the blue box and the transparent
> ones.
>
> Just add "scale 1.0001" to the blue box and the problem disapears.
>
> Also, you should use a merge of the two transparent boxes.
>
>
>
>
> Alain

Hey, thanks.  I knew about my surfaces.  It just seemed weird that at certain
angles it seemed to be ok.  Which then got me doubting that I knew what I was
doing.  Which I didn't.  But now I do.

Thanks again


Post a reply to this message

From: bittramp
Subject: Re: Not a bug, I must have incorrect expectations
Date: 23 Feb 2011 20:50:00
Message: <web.4d65b91b691ad14e7d0afb200@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:


> Also, you should use a merge of the two transparent boxes.
>
>
>
>
> Alain

Oh, I forgot to ask.  Why a merge?  The two transparent boxes do not have any
shared area.  Which is what I thought a merge helped with.  Is this not the
case?


Post a reply to this message

From: Alain
Subject: Re: Not a bug, I must have incorrect expectations
Date: 24 Feb 2011 13:26:52
Message: <4d66a2ec@news.povray.org>

> Alain<aze### [at] qwertyorg>  wrote:
>
>
>> Also, you should use a merge of the two transparent boxes.
>>
>>
>>
>>
>> Alain
>
> Oh, I forgot to ask.  Why a merge?  The two transparent boxes do not have any
> shared area.  Which is what I thought a merge helped with.  Is this not the
> case?
>
>

Looking at your code again, and effectively, a merge is not needed in 
this case.
I had the impression that the transparent boxes did overlap. Adding some 
colour to them helped showing that there is no overlap.

As to why artefacts appeared or not after a small rotation: You may get 
lucky sometimes and when viewed from a precise direction, you may always 
detect the surfaces in the same order. The ior may, or not, have an effect.



Alain


Post a reply to this message

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