home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / include / metals.inc < prev    next >
Text File  |  1997-12-12  |  13KB  |  271 lines

  1. #ifdef(Metals_Inc_Temp)
  2. // do nothing
  3. #else
  4. #declare Metals_Inc_Temp=version
  5. #version 3.0
  6.  
  7. #ifdef(View_POV_Include_Stack)
  8. #   debug "including metals.inc\n"
  9. #end
  10.  
  11. /*
  12.               Persistence of Vision Raytracer Version 3.0
  13.                Metallic pigments, finishes, and textures.
  14.  
  15.  
  16. *****************************************************************************
  17.                            BASIC METAL COLORS
  18. *****************************************************************************
  19.  Note: Describing metallic textures is difficult, at best.  The reflectivity
  20.  and other qualities make them highly dependant on lighting and surroundings.
  21.  
  22.  The following notes are intended as a rough guide only.
  23.  P_Brass1: Dark brown bronze.
  24.  P_Brass2: Somewhat lighter brown than Brass4. Old penny, in soft finishes.
  25.  P_Brass3: Used by Steve Anger's Polished_Brass. Slightly coppery.
  26.  P_Brass4: A little yellower than Brass1.
  27.  P_Brass5: Very light bronze, ranges from med tan to almost white.
  28.  
  29.  P_Copper1: bronze-like.  Best in finish #C.
  30.  P_Copper2: slightly brownish copper/bronze.  Best in finishes #B-#D.
  31.  P_Copper3: reddish-brown copper.  Best in finishes #C-#E.
  32.  P_Copper4: pink copper, like new tubing.  Best in finishes #C-#E.
  33.  P_Copper5: Bronze in softer finishes, gold in harder finishes.
  34.  
  35.  P_Chrome1: 20% Gray. Used in Steve Anger's Polished_Chrome.
  36.  P_Chrome2: Slightly blueish 60% gray. Good steel w/finish #A
  37.  P_Chrome3: 50% neutral gray.
  38.  P_Chrome4: 75% neutral gray.
  39.  P_Chrome5: 95% neutral gray.
  40.  
  41.  P_Silver1: Yellowish silverplate.  Somewhat tarnished looking.
  42.  P_Silver2: Not quite as yellowish as Silver1 but more so than Silver3.
  43.  P_Silver3: Reasonably neutral silver.
  44.  P_Silver4: REDUNDANT (unused)
  45.  P_Silver5: REDUNDANT (unused)
  46.  
  47. */
  48.  
  49. #include "golds.inc"
  50.  
  51. #declare P_Brass1    = color rgb <0.30, 0.20, 0.10>
  52. #declare P_Brass2    = color rgb <0.50, 0.35, 0.25>
  53. #declare P_Brass3    = color rgb <0.58, 0.42, 0.20>
  54. #declare P_Brass4    = color rgb <0.65, 0.50, 0.25>
  55. #declare P_Brass5    = color rgb <0.70, 0.55, 0.40>
  56.  
  57. #declare P_Copper1   = color rgb <0.40, 0.20, 0.15>
  58. #declare P_Copper2   = color rgb <0.50, 0.25, 0.15>
  59. #declare P_Copper3   = color rgb <0.60, 0.30, 0.15>
  60. #declare P_Copper4   = color rgb <0.70, 0.25, 0.15>
  61. #declare P_Copper5   = color rgb <0.65, 0.35, 0.15>
  62.  
  63. #declare P_Chrome1   = color rgb <0.20, 0.20, 0.20>
  64. #declare P_Chrome2   = color rgb <0.39, 0.41, 0.43>
  65. #declare P_Chrome3   = color rgb <0.50, 0.50, 0.50>
  66. #declare P_Chrome4   = color rgb <0.75, 0.75, 0.75>
  67. #declare P_Chrome5   = color rgb <0.95, 0.95, 0.95>
  68.  
  69. #declare P_Silver1   = color rgb <0.94, 0.93, 0.80>
  70. #declare P_Silver2   = color rgb <0.94, 0.93, 0.85>
  71. #declare P_Silver3   = color rgb <0.94, 0.93, 0.90>
  72. #declare P_Silver4   = color rgb <0.95, 0.91, 0.91>              
  73. #declare P_Silver5   = color rgb <0.91, 0.95, 0.91>   
  74.  
  75. //*****************************************************************************
  76. //                           BASIC METAL FINISHES
  77. //*****************************************************************************
  78.  
  79. // F_MetalA  :  Very soft and dull.  
  80. // F_MetalB  :  Fairly soft and dull.
  81. // F_MetalC  :  Medium reflectivity. Holds color well.
  82. // F_MetalD  :  Highly hard and polished. High reflectivity.   
  83. // F_MetalE  :  Very highly polished & reflective.
  84.  
  85. #declare F_MetalA  =
  86. finish {
  87.     ambient 0.35
  88.     brilliance 2
  89.     diffuse 0.3
  90.     metallic
  91.     specular 0.80
  92.     roughness 1/20
  93.     reflection 0.1
  94. }
  95.  
  96. #declare F_MetalB  = 
  97. finish {
  98.     ambient 0.30
  99.     brilliance 3
  100.     diffuse 0.4
  101.     metallic
  102.     specular 0.70
  103.     roughness 1/60
  104.     reflection 0.25
  105. }
  106.  
  107. #declare F_MetalC  =
  108. finish {
  109.     ambient 0.25
  110.     brilliance 4
  111.     diffuse 0.5
  112.     metallic
  113.     specular 0.80
  114.     roughness 1/80
  115.     reflection 0.5
  116. }
  117.  
  118. #declare F_MetalD  =
  119. finish {
  120.     ambient 0.15
  121.     brilliance 5
  122.     diffuse 0.6
  123.     metallic
  124.     specular 0.80
  125.     roughness 1/100
  126.     reflection 0.65
  127. }
  128.  
  129. #declare F_MetalE  =
  130. finish {
  131.     ambient 0.1
  132.     brilliance 6
  133.     diffuse 0.7
  134.     metallic
  135.     specular 0.80
  136.     roughness 1/120
  137.     reflection 0.8
  138. }
  139.  
  140. //*****************************************************************************
  141. //                           METAL TEXTURES
  142. //*****************************************************************************
  143.  
  144. //                              BRASSES
  145. #declare T_Brass_1A = texture { pigment { P_Brass1 } finish { F_MetalA  } }
  146. #declare T_Brass_1B = texture { pigment { P_Brass1 } finish { F_MetalB  } }
  147. #declare T_Brass_1C = texture { pigment { P_Brass1 } finish { F_MetalC  } }
  148. #declare T_Brass_1D = texture { pigment { P_Brass1 } finish { F_MetalD  } }
  149. #declare T_Brass_1E = texture { pigment { P_Brass1 } finish { F_MetalE  } }
  150.  
  151. #declare T_Brass_2A = texture { pigment { P_Brass2 } finish { F_MetalA  } }
  152. #declare T_Brass_2B = texture { pigment { P_Brass2 } finish { F_MetalB  } }
  153. #declare T_Brass_2C = texture { pigment { P_Brass2 } finish { F_MetalC  } }
  154. #declare T_Brass_2D = texture { pigment { P_Brass2 } finish { F_MetalD  } }
  155. #declare T_Brass_2E = texture { pigment { P_Brass2 } finish { F_MetalE  } }
  156.  
  157. #declare T_Brass_3A = texture { pigment { P_Brass3 } finish { F_MetalA  } }
  158. #declare T_Brass_3B = texture { pigment { P_Brass3 } finish { F_MetalB  } }
  159. #declare T_Brass_3C = texture { pigment { P_Brass3 } finish { F_MetalC  } }
  160. #declare T_Brass_3D = texture { pigment { P_Brass3 } finish { F_MetalD  } }
  161. #declare T_Brass_3E = texture { pigment { P_Brass3 } finish { F_MetalE  } }
  162.  
  163. #declare T_Brass_4A = texture { pigment { P_Brass4 } finish { F_MetalA  } }
  164. #declare T_Brass_4B = texture { pigment { P_Brass4 } finish { F_MetalB  } }
  165. #declare T_Brass_4C = texture { pigment { P_Brass4 } finish { F_MetalC  } }
  166. #declare T_Brass_4D = texture { pigment { P_Brass4 } finish { F_MetalD  } }
  167. #declare T_Brass_4E = texture { pigment { P_Brass4 } finish { F_MetalE  } }
  168.  
  169. #declare T_Brass_5A = texture { pigment { P_Brass5 } finish { F_MetalA  } }
  170. #declare T_Brass_5B = texture { pigment { P_Brass5 } finish { F_MetalB  } }
  171. #declare T_Brass_5C = texture { pigment { P_Brass5 } finish { F_MetalC  } }
  172. #declare T_Brass_5D = texture { pigment { P_Brass5 } finish { F_MetalD  } }
  173. #declare T_Brass_5E = texture { pigment { P_Brass5 } finish { F_MetalE  } }
  174.  
  175. //                           COPPERS & BRONZES
  176. #declare T_Copper_1A = texture { pigment { P_Copper1 } finish { F_MetalA  } }
  177. #declare T_Copper_1B = texture { pigment { P_Copper1 } finish { F_MetalB  } }
  178. #declare T_Copper_1C = texture { pigment { P_Copper1 } finish { F_MetalC  } }
  179. #declare T_Copper_1D = texture { pigment { P_Copper1 } finish { F_MetalD  } }
  180. #declare T_Copper_1E = texture { pigment { P_Copper1 } finish { F_MetalE  } }
  181.                                            
  182. #declare T_Copper_2A = texture { pigment { P_Copper2 } finish { F_MetalA  } }
  183. #declare T_Copper_2B = texture { pigment { P_Copper2 } finish { F_MetalB  } }
  184. #declare T_Copper_2C = texture { pigment { P_Copper2 } finish { F_MetalC  } }
  185. #declare T_Copper_2D = texture { pigment { P_Copper2 } finish { F_MetalD  } }
  186. #declare T_Copper_2E = texture { pigment { P_Copper2 } finish { F_MetalE  } }
  187.                                            
  188. #declare T_Copper_3A = texture { pigment { P_Copper3 } finish { F_MetalA  } }
  189. #declare T_Copper_3B = texture { pigment { P_Copper3 } finish { F_MetalB  } }
  190. #declare T_Copper_3C = texture { pigment { P_Copper3 } finish { F_MetalC  } }
  191. #declare T_Copper_3D = texture { pigment { P_Copper3 } finish { F_MetalD  } }
  192. #declare T_Copper_3E = texture { pigment { P_Copper3 } finish { F_MetalE  } }
  193.                                            
  194. #declare T_Copper_4A = texture { pigment { P_Copper4 } finish { F_MetalA  } }
  195. #declare T_Copper_4B = texture { pigment { P_Copper4 } finish { F_MetalB  } }
  196. #declare T_Copper_4C = texture { pigment { P_Copper4 } finish { F_MetalC  } }
  197. #declare T_Copper_4D = texture { pigment { P_Copper4 } finish { F_MetalD  } }
  198. #declare T_Copper_4E = texture { pigment { P_Copper4 } finish { F_MetalE  } }
  199.                                            
  200. #declare T_Copper_5A = texture { pigment { P_Copper5 } finish { F_MetalA  } }
  201. #declare T_Copper_5B = texture { pigment { P_Copper5 } finish { F_MetalB  } }
  202. #declare T_Copper_5C = texture { pigment { P_Copper5 } finish { F_MetalC  } }
  203. #declare T_Copper_5D = texture { pigment { P_Copper5 } finish { F_MetalD  } }
  204. #declare T_Copper_5E = texture { pigment { P_Copper5 } finish { F_MetalE  } }
  205.  
  206. //                           CHROMES & STEELS  
  207. #declare T_Chrome_1A = texture { pigment { P_Chrome1 } finish { F_MetalA  } }
  208. #declare T_Chrome_1B = texture { pigment { P_Chrome1 } finish { F_MetalB  } }
  209. #declare T_Chrome_1C = texture { pigment { P_Chrome1 } finish { F_MetalC  } }
  210. #declare T_Chrome_1D = texture { pigment { P_Chrome1 } finish { F_MetalD  } }
  211. #declare T_Chrome_1E = texture { pigment { P_Chrome1 } finish { F_MetalE  } }
  212.                                            
  213. #declare T_Chrome_2A = texture { pigment { P_Chrome2 } finish { F_MetalA  } }
  214. #declare T_Chrome_2B = texture { pigment { P_Chrome2 } finish { F_MetalB  } }
  215. #declare T_Chrome_2C = texture { pigment { P_Chrome2 } finish { F_MetalC  } }
  216. #declare T_Chrome_2D = texture { pigment { P_Chrome2 } finish { F_MetalD  } }
  217. #declare T_Chrome_2E = texture { pigment { P_Chrome2 } finish { F_MetalE  } }
  218.                                            
  219. #declare T_Chrome_3A = texture { pigment { P_Chrome3 } finish { F_MetalA  } }
  220. #declare T_Chrome_3B = texture { pigment { P_Chrome3 } finish { F_MetalB  } }
  221. #declare T_Chrome_3C = texture { pigment { P_Chrome3 } finish { F_MetalC  } }
  222. #declare T_Chrome_3D = texture { pigment { P_Chrome3 } finish { F_MetalD  } }
  223. #declare T_Chrome_3E = texture { pigment { P_Chrome3 } finish { F_MetalE  } }
  224.                                            
  225. #declare T_Chrome_4A = texture { pigment { P_Chrome4 } finish { F_MetalA  } }
  226. #declare T_Chrome_4B = texture { pigment { P_Chrome4 } finish { F_MetalB  } }
  227. #declare T_Chrome_4C = texture { pigment { P_Chrome4 } finish { F_MetalC  } }
  228. #declare T_Chrome_4D = texture { pigment { P_Chrome4 } finish { F_MetalD  } }
  229. #declare T_Chrome_4E = texture { pigment { P_Chrome4 } finish { F_MetalE  } }
  230.                                            
  231. #declare T_Chrome_5A = texture { pigment { P_Chrome5 } finish { F_MetalA  } }
  232. #declare T_Chrome_5B = texture { pigment { P_Chrome5 } finish { F_MetalB  } }
  233. #declare T_Chrome_5C = texture { pigment { P_Chrome5 } finish { F_MetalC  } }
  234. #declare T_Chrome_5D = texture { pigment { P_Chrome5 } finish { F_MetalD  } }
  235. #declare T_Chrome_5E = texture { pigment { P_Chrome5 } finish { F_MetalE  } }
  236.  
  237. //                               SILVERS        
  238. #declare T_Silver_1A = texture { pigment { P_Silver1 } finish { F_MetalA  } }
  239. #declare T_Silver_1B = texture { pigment { P_Silver1 } finish { F_MetalB  } }
  240. #declare T_Silver_1C = texture { pigment { P_Silver1 } finish { F_MetalC  } }
  241. #declare T_Silver_1D = texture { pigment { P_Silver1 } finish { F_MetalD  } }
  242. #declare T_Silver_1E = texture { pigment { P_Silver1 } finish { F_MetalE  } }
  243.                                            
  244. #declare T_Silver_2A = texture { pigment { P_Silver2 } finish { F_MetalA  } }
  245. #declare T_Silver_2B = texture { pigment { P_Silver2 } finish { F_MetalB  } }
  246. #declare T_Silver_2C = texture { pigment { P_Silver2 } finish { F_MetalC  } }
  247. #declare T_Silver_2D = texture { pigment { P_Silver2 } finish { F_MetalD  } }
  248. #declare T_Silver_2E = texture { pigment { P_Silver2 } finish { F_MetalE  } }
  249.                                            
  250. #declare T_Silver_3A = texture { pigment { P_Silver3 } finish { F_MetalA  } }
  251. #declare T_Silver_3B = texture { pigment { P_Silver3 } finish { F_MetalB  } }
  252. #declare T_Silver_3C = texture { pigment { P_Silver3 } finish { F_MetalC  } }
  253. #declare T_Silver_3D = texture { pigment { P_Silver3 } finish { F_MetalD  } }
  254. #declare T_Silver_3E = texture { pigment { P_Silver3 } finish { F_MetalE  } }
  255.                                            
  256. #declare T_Silver_4A = texture { pigment { P_Silver4 } finish { F_MetalA  } }
  257. #declare T_Silver_4B = texture { pigment { P_Silver4 } finish { F_MetalB  } }
  258. #declare T_Silver_4C = texture { pigment { P_Silver4 } finish { F_MetalC  } }
  259. #declare T_Silver_4D = texture { pigment { P_Silver4 } finish { F_MetalD  } }
  260. #declare T_Silver_4E = texture { pigment { P_Silver4 } finish { F_MetalE  } }
  261.                                            
  262. #declare T_Silver_5A = texture { pigment { P_Silver5 } finish { F_MetalA  } }
  263. #declare T_Silver_5B = texture { pigment { P_Silver5 } finish { F_MetalB  } }
  264. #declare T_Silver_5C = texture { pigment { P_Silver5 } finish { F_MetalC  } }
  265. #declare T_Silver_5D = texture { pigment { P_Silver5 } finish { F_MetalD  } }
  266. #declare T_Silver_5E = texture { pigment { P_Silver5 } finish { F_MetalE  } }
  267.  
  268.  
  269. #version Metals_Inc_Temp
  270. #end
  271.