home *** CD-ROM | disk | FTP | other *** search
/ ANews 3 / AnewsCD3.iso / atari / GRAPHX / POV / 68030.060 / POV31G30 / POVRAY_3.1G / INCLUDE / GOLDS.INC < prev    next >
Text File  |  1999-10-30  |  9KB  |  233 lines

  1. #ifdef(Gold_Inc_Temp)
  2. // do nothing
  3. #else
  4. #declare Gold_Inc_Temp=version;
  5.  
  6. #ifdef(View_POV_Include_Stack)
  7. #   debug "including golds.inc\n"
  8. #end
  9.  
  10. /*
  11.               Persistence of Vision Raytracer Version 3.1
  12.                       Gold textures
  13. */
  14.  
  15. #declare GoldBase = <1.00, 0.875, 0.575>;  // mine again
  16.  
  17. // This set shifts the color toward orange by subtracting
  18. // bluegreen from the base color.
  19. #declare CVect1 = GoldBase  - <0.00, 0.20, 0.40>;
  20. #declare CVect2 = GoldBase  - <0.00, 0.15, 0.30>;
  21. #declare CVect3 = GoldBase  - <0.00, 0.10, 0.20>;
  22. #declare CVect4 = GoldBase  - <0.00, 0.05, 0.1>;
  23. #declare CVect5 = GoldBase  - <0.00, 0.00, 0.00>;
  24.  
  25. // Cast CVect as an rgb vector
  26. #declare P_Gold1    = rgb CVect1;             // back row
  27. #declare P_Gold2    = rgb CVect2;
  28. #declare P_Gold3    = rgb CVect3;
  29. #declare P_Gold4    = rgb CVect4;
  30. #declare P_Gold5    = rgb CVect5;            // front row
  31.  
  32. // Reflection colors, derived from pigment color, "grayed down" a touch.
  33. #declare R_GoldA =  P_Gold1 * 0.30 + 0.25;        // left column (soft)
  34. #declare R_GoldB =  P_Gold2 * 0.35 + 0.25;
  35. #declare R_GoldC =  P_Gold3 * 0.40 + 0.25;
  36. #declare R_GoldD =  P_Gold4 * 0.45 + 0.25;
  37. #declare R_GoldE =  P_Gold5 * 0.50 + 0.25;       // right column (hard)
  38.  
  39.  
  40. // Ambient colors, derived from base color
  41. #declare A_GoldA    =  P_Gold1 * 0.12 + 0.1;      // left column  (soft)
  42. #declare A_GoldB    =  P_Gold2 * 0.10 + 0.1;
  43. #declare A_GoldC    =  P_Gold3 * 0.08 + 0.1;
  44. #declare A_GoldD    =  P_Gold4 * 0.05 + 0.1;
  45. #declare A_GoldE    =  P_Gold5 * 0.02 + 0.1;     // right column (hard)
  46.  
  47. // Diffuse values
  48. // Calculated as 1 - (ambient+reflective+specular values)
  49. #declare D_GoldA    = 1-(((R_GoldA.red+R_GoldA.green+R_GoldA.blue)/3)
  50.                        + ((A_GoldA.red+A_GoldA.green+A_GoldA.blue)/3));
  51. #declare D_GoldB    = 1-(((R_GoldB.red+R_GoldB.green+R_GoldB.blue)/3)
  52.                        + ((A_GoldB.red+A_GoldB.green+A_GoldB.blue)/3));
  53. #declare D_GoldC    = 1-(((R_GoldC.red+R_GoldC.green+R_GoldC.blue)/3)
  54.                        + ((A_GoldC.red+A_GoldC.green+A_GoldC.blue)/3));
  55. #declare D_GoldD    = 1-(((R_GoldD.red+R_GoldD.green+R_GoldD.blue)/3)
  56.                        + ((A_GoldD.red+A_GoldD.green+A_GoldD.blue)/3));
  57. #declare D_GoldE    = 1-(((R_GoldE.red+R_GoldE.green+R_GoldE.blue)/3)
  58.                        + ((A_GoldE.red+A_GoldE.green+A_GoldE.blue)/3));
  59.  
  60. #declare D_GoldA = max(D_GoldA, 0);
  61. #declare D_GoldB = max(D_GoldB, 0);
  62. #declare D_GoldC = max(D_GoldC, 0);
  63. #declare D_GoldD = max(D_GoldD, 0);
  64. #declare D_GoldE = max(D_GoldE, 0);
  65.  
  66.  
  67. // #debug "\nReflection colors:"
  68. // #debug concat("\nR_GoldA=<", str(R_GoldA.red,   5, 5), "," ,
  69. //                              str(R_GoldA.green, 5, 5),"," ,
  70. //                              str(R_GoldA.blue,  5, 5), ">")
  71. // #debug concat("\nR_GoldB=<", str(R_GoldB.red,   5, 5), "," ,
  72. //                              str(R_GoldB.green, 5, 5),"," ,
  73. //                              str(R_GoldB.blue,  5, 5), ">")
  74. // #debug concat("\nR_GoldC=<", str(R_GoldC.red,   5, 5), "," ,
  75. //                              str(R_GoldC.green, 5, 5),"," ,
  76. //                              str(R_GoldC.blue,  5, 5), ">")
  77. // #debug concat("\nR_GoldD=<", str(R_GoldD.red,   5, 5), "," ,
  78. //                              str(R_GoldD.green, 5, 5),"," ,
  79. //                              str(R_GoldD.blue,  5, 5), ">")
  80. // #debug concat("\nR_GoldE=<", str(R_GoldE.red,   5, 5), "," ,
  81. //                              str(R_GoldE.green, 5, 5),"," ,
  82. //                              str(R_GoldE.blue,  5, 5), ">")
  83. //
  84. // #debug "\n\nAmbient colors:"
  85. // #debug concat("\nA_GoldA=<", str(A_GoldA.red,   5, 5), "," ,
  86. //                              str(A_GoldA.green, 5, 5),"," ,
  87. //                              str(A_GoldA.blue,  5, 5), ">")
  88. // #debug concat("\nA_GoldB=<", str(A_GoldB.red,   5, 5), "," ,
  89. //                              str(A_GoldB.green, 5, 5),"," ,
  90. //                              str(A_GoldB.blue,  5, 5), ">")
  91. // #debug concat("\nA_GoldC=<", str(A_GoldC.red,   5, 5), "," ,
  92. //                              str(A_GoldC.green, 5, 5),"," ,
  93. //                              str(A_GoldC.blue,  5, 5), ">")
  94. // #debug concat("\nA_GoldD=<", str(A_GoldD.red,   5, 5), "," ,
  95. //                              str(A_GoldD.green, 5, 5),"," ,
  96. //                              str(A_GoldD.blue,  5, 5), ">")
  97. // #debug concat("\nA_GoldE=<", str(A_GoldE.red,   5, 5), "," ,
  98. //                              str(A_GoldE.green, 5, 5),"," ,
  99. //                              str(A_GoldE.blue,  5, 5), ">")
  100. //
  101. //
  102. // #debug "\n\nDiffuse values:"
  103. // #debug concat("\nD_GoldA = ",str(D_GoldA, 5, 5))
  104. // #debug concat("\nD_GoldB = ",str(D_GoldB, 5, 5))
  105. // #debug concat("\nD_GoldC = ",str(D_GoldC, 5, 5))
  106. // #debug concat("\nD_GoldD = ",str(D_GoldD, 5, 5))
  107. // #debug concat("\nD_GoldE = ",str(D_GoldE, 5, 5))
  108. // #debug "\n"
  109.  
  110. #declare M = 1;    //   Metallic amount
  111.  
  112. //*****Finishes****
  113. // Left column, dullest & darkest
  114. #declare F_MetalA  =
  115. finish {
  116.     brilliance 2
  117.     diffuse D_GoldA
  118.     ambient A_GoldA
  119.     reflection R_GoldA
  120.     metallic M
  121.     specular 0.20
  122.     roughness 1/20
  123. }
  124.  
  125. #declare F_MetalB  =
  126. finish {
  127.     brilliance 3
  128.     diffuse D_GoldB
  129.     ambient A_GoldB
  130.     reflection R_GoldB
  131.     metallic M
  132.     specular 0.30
  133.     roughness 1/60
  134. }
  135.  
  136. #declare F_MetalC  =
  137. finish {
  138.     brilliance 4
  139.     diffuse D_GoldC
  140.     ambient A_GoldC
  141.     reflection R_GoldC
  142.     metallic M
  143.     specular 0.60
  144.     roughness 1/80
  145. }
  146.  
  147. #declare F_MetalD  =
  148. finish {
  149.     brilliance 5
  150.     diffuse D_GoldD
  151.     ambient A_GoldD
  152.     reflection R_GoldD
  153.     metallic M
  154.     specular 0.70
  155.     roughness 1/100
  156. }
  157.  
  158. #declare F_MetalE  =
  159. finish {
  160.     brilliance 6
  161.     diffuse D_GoldE
  162.     ambient A_GoldE
  163.     reflection R_GoldE
  164.     metallic M
  165.     specular 0.80
  166.     roughness 1/120
  167. }
  168.  
  169. //                              GOLDS
  170. #declare T_Gold_1A = texture { pigment { P_Gold1 } finish { F_MetalA } }
  171. #declare T_Gold_1B = texture { pigment { P_Gold1 } finish { F_MetalB } }
  172. #declare T_Gold_1C = texture { pigment { P_Gold1 } finish { F_MetalC } }
  173. #declare T_Gold_1D = texture { pigment { P_Gold1 } finish { F_MetalD } }
  174. #declare T_Gold_1E = texture { pigment { P_Gold1 } finish { F_MetalE } }
  175.  
  176. #declare T_Gold_2A = texture { pigment { P_Gold2 } finish { F_MetalA } }
  177. #declare T_Gold_2B = texture { pigment { P_Gold2 } finish { F_MetalB } }
  178. #declare T_Gold_2C = texture { pigment { P_Gold2 } finish { F_MetalC } }
  179. #declare T_Gold_2D = texture { pigment { P_Gold2 } finish { F_MetalD } }
  180. #declare T_Gold_2E = texture { pigment { P_Gold2 } finish { F_MetalE } }
  181.  
  182. #declare T_Gold_3A = texture { pigment { P_Gold3 } finish { F_MetalA } }
  183. #declare T_Gold_3B = texture { pigment { P_Gold3 } finish { F_MetalB } }
  184. #declare T_Gold_3C = texture { pigment { P_Gold3 } finish { F_MetalC } }
  185. #declare T_Gold_3D = texture { pigment { P_Gold3 } finish { F_MetalD } }
  186. #declare T_Gold_3E = texture { pigment { P_Gold3 } finish { F_MetalE } }
  187.  
  188. #declare T_Gold_4A = texture { pigment { P_Gold4 } finish { F_MetalA } }
  189. #declare T_Gold_4B = texture { pigment { P_Gold4 } finish { F_MetalB } }
  190. #declare T_Gold_4C = texture { pigment { P_Gold4 } finish { F_MetalC } }
  191. #declare T_Gold_4D = texture { pigment { P_Gold4 } finish { F_MetalD } }
  192. #declare T_Gold_4E = texture { pigment { P_Gold4 } finish { F_MetalE } }
  193.  
  194. #declare T_Gold_5A = texture { pigment { P_Gold5 } finish { F_MetalA } }
  195. #declare T_Gold_5B = texture { pigment { P_Gold5 } finish { F_MetalB } }
  196. #declare T_Gold_5C = texture { pigment { P_Gold5 } finish { F_MetalC } }
  197. #declare T_Gold_5D = texture { pigment { P_Gold5 } finish { F_MetalD } }
  198. #declare T_Gold_5E = texture { pigment { P_Gold5 } finish { F_MetalE } }
  199.  
  200. //The following #declares are needed for stage_xz.pov
  201.  
  202. #declare T01 = texture { T_Gold_1A }
  203. #declare T02 = texture { T_Gold_1B }
  204. #declare T03 = texture { T_Gold_1C }
  205. #declare T04 = texture { T_Gold_1D }
  206. #declare T05 = texture { T_Gold_1E }
  207.  
  208. #declare T06 = texture { T_Gold_2A }
  209. #declare T07 = texture { T_Gold_2B }
  210. #declare T08 = texture { T_Gold_2C }
  211. #declare T09 = textu