POV-Ray : Newsgroups : povray.binaries.images : POV 3.7 metals.inc; post your textures here : Re: POV 3.7 metals.inc; post your textures here Server Time
31 Jul 2024 04:15:59 EDT (-0400)
  Re: POV 3.7 metals.inc; post your textures here  
From: Ive
Date: 31 Mar 2009 14:15:36
Message: <49d25dc8$1@news.povray.org>
Bill Pragnell wrote:
> This is just what I was thinking of. Are you willing to share these,
> or just the colour data? :) 

Sure. But I have only four more metal materials and here they are:


...snip
/--------------------------------------------------

#macro MaterialBronze(Polish, Dents)
   material {
     texture {
       pigment {rgb <0.5568, 0.3484, 0.1528>}
       N_Pattern(Polish, Dents)
       finish {
         ambient 0  diffuse 1-0.3768
         specular 0  brilliance 2
         reflection {0.0  1.0 fresnel on metallic}
         conserve_energy
       }
     }
     interior {ior 3.1}
   }
#end


#macro MaterialBrass(Polish, Dents)
   material {
     texture {
       pigment {rgb <0.5709, 0.3356, 0.1491>}
       N_Pattern(Polish, Dents)
       finish {
         ambient 0  diffuse 1-0.3702
         specular 0  brilliance 3
         reflection {0.0 1.0 fresnel on metallic}
         conserve_energy
       }
     }
     interior {ior 8.0}
   }
#end


#macro MaterialSteel(Polish, Dents)
   material {
     texture {
       pigment {rgb <0.4412, 0.4137, 0.3727>}
       N_Pattern(Polish, Dents)
       finish {
         ambient 0  diffuse 1-0.4163
         specular 0  brilliance 2.8
         reflection {0.0 1.0 fresnel on metallic}
         conserve_energy
       }
     }
     interior {ior 8.6}
   }
#end


#macro MaterialChrome(Polish, Dents)
   material {
     texture {
       pigment {rgb <0.9310, 0.9265, 0.9221>}
       N_Pattern(Polish, Dents)
       finish {
         ambient 0  diffuse 1-0.9642
         specular 0 brilliance 3
         reflection {0.0 1.0 fresnel on metallic}
         conserve_energy
       }
     }
     interior {ior 15}
   }
#end

/--------------------------------------------------
...snip


Feel free to use them in any way you like. (Note, the diffuse setting is 
quite important in combination with the color itself).


I do not claim there is something "physically" accurate with them - 
especially with the way I did handle the fresnel reflection. In the 
"real world" metals have fresnel reflection but in the "real world" the 
IOR is a complex number and for metals the imaginary part of the IOR is 
the important one. To do some tests with POV is since quite a while on 
my "to do"-list... oh well, if only the "real life" would not need most 
of my time :)


> To be honest, I wasn't even thinking of anything this ambitious - just a basic
> polished finish, maybe some dents, really just to get the basic colours
> consistent and believable. Great work!
> 

BTW, the colors from "metals.inc" in the POV contribution are not so 
bad, I think. The problem is, all of them (and this is also true for 
colors.inc, woods.inc and so on) are created in the early days of 
POV-Ray when everybody used assumed gamma 2.2 (or even assumed gamma was 
not yet introduced, POV simply did work with gamma 2.2). But we had a 
kind of paradigm change regarding the gamma handling and the new beta 
enforces a linear gamma. So to use them they all have to be inverse 
gamma corrected. And wrong gamma correction makes colors not only darker 
or brighter, it changes also the hue.

-Ive


Post a reply to this message

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