POV-Ray : Newsgroups : povray.newusers : Parse warning on refraction : Re: Parse warning on refraction Server Time
18 Jun 2024 08:17:31 EDT (-0400)
  Re: Parse warning on refraction  
From: Cousin Ricky
Date: 17 Jun 2013 18:05:00
Message: <web.51bf86d6201eece978641e0c0@news.povray.org>
"gharryh" <h.a### [at] harry-arendsnl> wrote:
> I have some texture defs that are using refraction.
> How should i rewrite these defs to please the render machine.
> [code]
> #declare acrylic =
> texture {
>     pigment { White filter .9}
>     finish {
>         specular 1
>         roughness .005
>         reflection .1
>         ambient 0
>         diffuse 0
>         refraction 1
>         ior 1.4
>     }
> }
> [/code]

This is very, very old syntax.  I don't even know what the refraction statement
means in this context, but this old post by C. Lipka suggests that nowadays it's
just dead code:

> - "refraction" is actually not necessary; it's just a relic from old times (I
> wonder where you got that from; it's not even mentioned in the online help
> anymore as far as I can tell). The amount of refracted light is nowadays
> controlled by the transmit & filter components of the pigment.
http://news.povray.org/povray.general/message/%3Cweb.49b8626c69fc1a9c801985dd0%40news.povray.org%3E/

The ior should be removed completely from the finish AND the texture, and put
inside an interior.  A texture and an interior may be combined in a material:

[code]
#declare Acrylic = material
{ texture {
      pigment { White filter .9}
      finish {
          specular 1
          roughness .005
          reflection .1
          ambient 0
          diffuse 0
       /* refraction 1  Remove these
          ior 1.4       two lines. */
      }
  }
  interior { ior 1.4 }
}
[/code]

To apply this to an object, use the material statement:

[code]
object { MyObject material { Acrylic } }
[/code]


Post a reply to this message

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