POV-Ray : Newsgroups : povray.advanced-users : Photons and the 'normal' statement Server Time
23 Nov 2024 20:55:09 EST (-0500)
  Photons and the 'normal' statement (Message 1 to 6 of 6)  
From: Blake Eggemeyer
Subject: Photons and the 'normal' statement
Date: 4 Sep 2012 14:15:01
Message: <web.50464440ef6dbe98b1a390a80@news.povray.org>
I am attempting to create a pane of glass that refracts light as though it were
a prism.

Consider this attempt that didn't work.

object{
  box{<10,1/2,10>, -<10,1/2,10> }
  texture{T_Glass3}
  interior{ ior 1.5 dispersion 2.4 dispersion_samples 150  caustics 0.4 }
  normal{function{0.1*z}}
  photons{target refraction on reflection on}
}

I have tried many different settings and the problem seems to be in the normal
statement.

I want the stars on the other side of the glass to be dispersed along the z
direction similar to this attempt http://goo.gl/i2gfS

This is the closest I have gotten, using bumps in the normal statement
http://goo.gl/OfEIq

I want the faces of the pane of glass to behave as if they are pointed in a
specific direction.... how do i do this?


Post a reply to this message

From: Warp
Subject: Re: Photons and the 'normal' statement
Date: 4 Sep 2012 14:42:49
Message: <50464ba9@news.povray.org>
Blake Eggemeyer <i.l### [at] gmailcom> wrote:
> I am attempting to create a pane of glass that refracts light as though it were
> a prism.

> Consider this attempt that didn't work.

> object{
>   box{<10,1/2,10>, -<10,1/2,10> }
>   texture{T_Glass3}
>   interior{ ior 1.5 dispersion 2.4 dispersion_samples 150  caustics 0.4 }
>   normal{function{0.1*z}}
>   photons{target refraction on reflection on}
> }

> I have tried many different settings and the problem seems to be in the normal
> statement.

> I want the stars on the other side of the glass to be dispersed along the z
> direction similar to this attempt http://goo.gl/i2gfS

> This is the closest I have gotten, using bumps in the normal statement
> http://goo.gl/OfEIq

> I want the faces of the pane of glass to behave as if they are pointed in a
> specific direction.... how do i do this?

Is there a reason you don't make an actual prism-shaped object?

-- 
                                                          - Warp


Post a reply to this message

From: Blake Eggemeyer
Subject: Re: Photons and the 'normal' statement
Date: 4 Sep 2012 15:05:00
Message: <web.50464f9267423a87b1a390a80@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Blake Eggemeyer <i.l### [at] gmailcom> wrote:
> > I am attempting to create a pane of glass that refracts light as though it were
> > a prism.
>
> > Consider this attempt that didn't work.
>
> > object{
> >   box{<10,1/2,10>, -<10,1/2,10> }
> >   texture{T_Glass3}
> >   interior{ ior 1.5 dispersion 2.4 dispersion_samples 150  caustics 0.4 }
> >   normal{function{0.1*z}}
> >   photons{target refraction on reflection on}
> > }
>
> > I have tried many different settings and the problem seems to be in the normal
> > statement.
>
> > I want the stars on the other side of the glass to be dispersed along the z
> > direction similar to this attempt http://goo.gl/i2gfS
>
> > This is the closest I have gotten, using bumps in the normal statement
> > http://goo.gl/OfEIq
>
> > I want the faces of the pane of glass to behave as if they are pointed in a
> > specific direction.... how do i do this?
>
> Is there a reason you don't make an actual prism-shaped object?
>
> --
>                                                           - Warp
Yes, this is a smaller part of a project. The camera won't always be
perpendicular to the glass, as it is in the second example. It must have the
same effect, but be thin. I have tried something in the manner of a fresnel
lens, but the lines were too visible.

I think this is primarily a hole in my understanding of the normal statement.


Post a reply to this message

From: clipka
Subject: Re: Photons and the 'normal' statement
Date: 5 Sep 2012 11:10:10
Message: <50476b52$1@news.povray.org>
Am 04.09.2012 20:11, schrieb Blake Eggemeyer:
> I am attempting to create a pane of glass that refracts light as though it were
> a prism.

Try a mesh, and specify the normals explicitly.


Post a reply to this message

From: Alain
Subject: Re: Photons and the 'normal' statement
Date: 5 Sep 2012 17:51:42
Message: <5047c96e$1@news.povray.org>

> I am attempting to create a pane of glass that refracts light as though it were
> a prism.
>
> Consider this attempt that didn't work.
>
> object{
>    box{<10,1/2,10>, -<10,1/2,10> }
>    texture{T_Glass3}
>    interior{ ior 1.5 dispersion 2.4 dispersion_samples 150  caustics 0.4 }
>    normal{function{0.1*z}}
>    photons{target refraction on reflection on}
> }
>
> I have tried many different settings and the problem seems to be in the normal
> statement.
>
> I want the stars on the other side of the glass to be dispersed along the z
> direction similar to this attempt http://goo.gl/i2gfS
>
> This is the closest I have gotten, using bumps in the normal statement
> http://goo.gl/OfEIq
>
> I want the faces of the pane of glass to behave as if they are pointed in a
> specific direction.... how do i do this?
>
>

The problem with your solution is that the same normal affect both faces 
of your box.
Change it as follow:

difference{
   box{<10,1/2,10>, -<10,0,10> }
   box{<10.1, 0.4,10.1><-10.1, 0.1, -10.1> pigment{rgbt 1} 
normal{function{0.1*z}}}
   pigment{rgbt 1}// Fully transparent pigment.
   interior{ ior 1.5 dispersion 2.4 dispersion_samples 150  caustics 0.4 }
   photons{target refraction on reflection on}
}

This way, one face of your box have a normal while the other don't.
I replaced the glass texture to a plain rgbt 1 pigment. We don't need 
the added highlights and reflection here.

This is not the way I'd do that.

I'd make an actual thin rism with your actual interior.

prism{4 20 <10,0><-10,-0.5><-10,0.5><10,0>
     pigment{rgbt 1}
     interior{ ior 1.5 dispersion 2.4 dispersion_samples 150}
     photons{target refraction on reflection on}
     translate -10*y
     rotate <90,90,0>
    }


it on the X-Z plane.

Reverse that rotation to have it point toward +Z.

Anyway, you should NOT use caustics in this case. It's ok to simulate 
the caustics on a pool's bottom, it's realy poor in any other situation.



Alain


Post a reply to this message

From: Blake Eggemeyer
Subject: Re: Photons and the 'normal' statement
Date: 20 Sep 2012 15:10:00
Message: <web.505b697e67423a876b0953c0@news.povray.org>
So it has taken me a while, but I tried the thin prism idea and it works pretty
well.
Thanks for the help all

When this project is more completed ill post the results.


Post a reply to this message

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