POV-Ray : Newsgroups : povray.general : Weird image Server Time
29 Jul 2024 10:29:49 EDT (-0400)
  Weird image (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Chaanakya
Subject: Weird image
Date: 24 Jul 2012 08:55:00
Message: <web.500e9a44683389ef7f523b7e0@news.povray.org>
Hey guys!  I'm getting a puzzling image from POV-Ray and I thought you guys
might be able to help:

When I render the following POV-Ray source file, I get parts of the inner cube
which are semi-transparent.  I don't think that should be happening.  Take a
look:

#version 3.6;
#include "colors.inc"

global_settings {
  max_trace_level 256
  ambient_light White
  assumed_gamma 1.0
}

camera {
  location <10,0,0>
  look_at <0,0,0>
  //rotate <0,0,-clock*90>
}

light_source {
  <1000,1000,0>
  color White
}

plane {
  y, -10
  pigment { hexagon Green, White, Blue }
}

box {
  <-0.99,-0.99,-0.99>,<0.99,0.99,0.99>
  pigment {
    checker Red, Yellow
  }
}

difference {
  box { <-1.3,-1.3,-1.3>,<1.3,1.3,1.3> }
  box { -1,1 }
  pigment {
    transmit 1
  }
  finish {
    ambient 0
    diffuse 0
    conserve_energy
    reflection {
      1.0
      fresnel on
    }
    specular 0
    roughness 0.001
  }
  interior {
    ior 1.5
  }
}

The ior of the covering box is 1.5, which is that of glass if I'm not mistaken.
So why is there transparency of the inner cube?

Sincerely,

Chaanakya


Post a reply to this message

From: Chaanakya
Subject: Re: Weird image
Date: 24 Jul 2012 16:05:01
Message: <web.500eff56df11dff27f523b7e0@news.povray.org>
"Chaanakya" <nomail@nomail> wrote:
> Hey guys!  I'm getting a puzzling image from POV-Ray and I thought you guys
> might be able to help:
>
> When I render the following POV-Ray source file, I get parts of the inner cube
> which are semi-transparent.  I don't think that should be happening.  Take a
> look:
>
> #version 3.6;
> #include "colors.inc"
>
> global_settings {
>   max_trace_level 256
>   ambient_light White
>   assumed_gamma 1.0
> }
>
> camera {
>   location <10,0,0>
>   look_at <0,0,0>
>   //rotate <0,0,-clock*90>
> }
>
> light_source {
>   <1000,1000,0>
>   color White
> }
>
> plane {
>   y, -10
>   pigment { hexagon Green, White, Blue }
> }
>
> box {
>   <-0.99,-0.99,-0.99>,<0.99,0.99,0.99>
>   pigment {
>     checker Red, Yellow
>   }
> }
>
> difference {
>   box { <-1.3,-1.3,-1.3>,<1.3,1.3,1.3> }
>   box { -1,1 }
>   pigment {
>     transmit 1
>   }
>   finish {
>     ambient 0
>     diffuse 0
>     conserve_energy
>     reflection {
>       1.0
>       fresnel on
>     }
>     specular 0
>     roughness 0.001
>   }
>   interior {
>     ior 1.5
>   }
> }
>
> The ior of the covering box is 1.5, which is that of glass if I'm not mistaken.
> So why is there transparency of the inner cube?
>
> Sincerely,
>
> Chaanakya

My main issue is the transparency of the solid box when the outer box has an IOR
of 1.5 - the solid box should not be even slightly transparent!  Is there
something I'm doing wrong?  Is this a bug?

- Chaanakya


Post a reply to this message

From: clipka
Subject: Re: Weird image
Date: 24 Jul 2012 17:22:31
Message: <500f1217$1@news.povray.org>
Am 24.07.2012 22:02, schrieb Chaanakya:

> My main issue is the transparency of the solid box when the outer box has an IOR
> of 1.5 - the solid box should not be even slightly transparent!  Is there
> something I'm doing wrong?  Is this a bug?

The inner box isn't transparent - it just looks like that because the 
outer box reflects the pattern of the ground.

Rotate the ground plane by y*15 (for instance) to see what I mean.


Post a reply to this message

From: Chaanakya
Subject: Re: Weird image
Date: 24 Jul 2012 18:50:00
Message: <web.500f2580df11dff23eebe80d0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 24.07.2012 22:02, schrieb Chaanakya:
>
> > My main issue is the transparency of the solid box when the outer box has an IOR
> > of 1.5 - the solid box should not be even slightly transparent!  Is there
> > something I'm doing wrong?  Is this a bug?
>
> The inner box isn't transparent - it just looks like that because the
> outer box reflects the pattern of the ground.
>
> Rotate the ground plane by y*15 (for instance) to see what I mean.

Okay.  That makes sense.  But shouldn't the image change if I give it an IOR of
-1.5 (instead of 1.5)?  There's no change in the image.

Thanks for your help!

- Chaanakya


Post a reply to this message

From: Alain
Subject: Re: Weird image
Date: 24 Jul 2012 21:30:50
Message: <500f4c4a$1@news.povray.org>

> clipka <ano### [at] anonymousorg> wrote:
>> Am 24.07.2012 22:02, schrieb Chaanakya:
>>
>>> My main issue is the transparency of the solid box when the outer box has an IOR
>>> of 1.5 - the solid box should not be even slightly transparent!  Is there
>>> something I'm doing wrong?  Is this a bug?
>>
>> The inner box isn't transparent - it just looks like that because the
>> outer box reflects the pattern of the ground.
>>
>> Rotate the ground plane by y*15 (for instance) to see what I mean.
>
> Okay.  That makes sense.  But shouldn't the image change if I give it an IOR of
> -1.5 (instead of 1.5)?  There's no change in the image.
>
> Thanks for your help!
>
> - Chaanakya
>
>

An ior of -1.5! I've tested with negative ior and it gives me a perfect 
mirror. You are beter to use finish{reflection 1}
This makes sence since the ior is the ratio between the speed of light 
in vacuum and it's speed inside the material.
Inside_Light_Speed = c/ior.
A negative ratio means that the direction of the light is reversed.
With an ior of zero, the result is undefined: Divide by zero.

In your sample, you use reflection{1.0 fresnel} (a prefect mirror! ) 
whitch is equivalent to reflection 1. Note the single reflection value.
As you also have conserve_energy, the 100% reflection means that you 
have 0% transmition. In this case, fresnel have no effect, and the ior 
is useless.

To get a correct result, you should use:
finish{reflection{0, 1 fresnel}conserve_energy}
interior{ior Your_ior}





Alain


Post a reply to this message

From: Chaanakya
Subject: Re: Weird image
Date: 24 Jul 2012 22:45:00
Message: <web.500f5ce6df11dff23eebe80d0@news.povray.org>
Alain <kua### [at] videotronca> wrote:
> Le 7/24/2012 6:45 PM, Chaanakya a écrit :
> > clipka <ano### [at] anonymousorg> wrote:
> >> Am 24.07.2012 22:02, schrieb Chaanakya:
> >>
> >>> My main issue is the transparency of the solid box when the outer box has an IOR
> >>> of 1.5 - the solid box should not be even slightly transparent!  Is there
> >>> something I'm doing wrong?  Is this a bug?
> >>
> >> The inner box isn't transparent - it just looks like that because the
> >> outer box reflects the pattern of the ground.
> >>
> >> Rotate the ground plane by y*15 (for instance) to see what I mean.
> >
> > Okay.  That makes sense.  But shouldn't the image change if I give it an IOR of
> > -1.5 (instead of 1.5)?  There's no change in the image.
> >
> > Thanks for your help!
> >
> > - Chaanakya
> >
> >
>
> An ior of -1.5! I've tested with negative ior and it gives me a perfect
> mirror. You are beter to use finish{reflection 1}
> This makes sence since the ior is the ratio between the speed of light
> in vacuum and it's speed inside the material.
> Inside_Light_Speed = c/ior.
> A negative ratio means that the direction of the light is reversed.
> With an ior of zero, the result is undefined: Divide by zero.
>
> In your sample, you use reflection{1.0 fresnel} (a prefect mirror! )
> whitch is equivalent to reflection 1. Note the single reflection value.
> As you also have conserve_energy, the 100% reflection means that you
> have 0% transmition. In this case, fresnel have no effect, and the ior
> is useless.
>
> To get a correct result, you should use:
> finish{reflection{0, 1 fresnel}conserve_energy}
> interior{ior Your_ior}
>
>
>
>
>
> Alain

I was told in this thread
(http://news.povray.org/povray.unix/thread/<web.500560817fd5a6c37f523b7e0@news.povray.org>/)
that I should be fine using

pigment { transmit 1 }
finish { reflection { 1 fresnel on } conserve_energy }
interior { ior -1.5 }

as conserve_energy would ensure that the correct amount of light was
transmitted/reflected.

Also, I was told (and the same message is in the docs) that reflection { 1 } is
the same as reflection { 0,1 } because by default it assumes reflection { 0,n }
where n is the float you give it.

Thanks!

- Chaanakya


Post a reply to this message

From: clipka
Subject: Re: Weird image
Date: 25 Jul 2012 03:21:14
Message: <500f9e6a@news.povray.org>
Am 25.07.2012 03:30, schrieb Alain:

> In your sample, you use reflection{1.0 fresnel} (a prefect mirror! )
> whitch is equivalent to reflection 1. Note the single reflection value.

When the "fresnel" keyword is used, a single reflection value is always 
taken to mean "0, X".


Post a reply to this message

From: clipka
Subject: Re: Weird image
Date: 25 Jul 2012 03:24:03
Message: <500f9f13$1@news.povray.org>
Am 25.07.2012 04:41, schrieb Chaanakya:

> I was told in this thread
>
(http://news.povray.org/povray.unix/thread/<web.500560817fd5a6c37f523b7e0@news.povray.org>/)
> that I should be fine using
>
> pigment { transmit 1 }
> finish { reflection { 1 fresnel on } conserve_energy }
> interior { ior -1.5 }

There was never a mention of negative ior :-P


Post a reply to this message

From: clipka
Subject: Re: Weird image
Date: 25 Jul 2012 03:33:48
Message: <500fa15c$1@news.povray.org>
Am 25.07.2012 00:45, schrieb Chaanakya:

> Okay.  That makes sense.  But shouldn't the image change if I give it an IOR of
> -1.5 (instead of 1.5)?  There's no change in the image.

There is, if you pay close attention. For instance, the total internal 
reflections are gone.

That said, as has been mentioned before a non-positive IOR is physically 
nonsense. (Metals have a complex IOR, but that's an entirely different 
story.)

Try something like 1.0, 0.5 or 2.34567.


Post a reply to this message

From: Chaanakya
Subject: Re: Weird image
Date: 25 Jul 2012 08:30:01
Message: <web.500fe622df11dff27f523b7e0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 25.07.2012 00:45, schrieb Chaanakya:
>
> > Okay.  That makes sense.  But shouldn't the image change if I give it an IOR of
> > -1.5 (instead of 1.5)?  There's no change in the image.
>
> There is, if you pay close attention. For instance, the total internal
> reflections are gone.
>
> That said, as has been mentioned before a non-positive IOR is physically
> nonsense. (Metals have a complex IOR, but that's an entirely different
> story.)
>
> Try something like 1.0, 0.5 or 2.34567.

No natural materials have a negative index of refraction, but metamaterials do -
https://en.wikipedia.org/wiki/Negative_index_metamaterials

Hmmm...I see what you mean.  Okay, so essentially there's no transparency, the
image is just being reflected.  Thanks for clearing that up!


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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