// Persistence of Vision Ray Tracer Scene Description File // Vers: 3.5 // File: $Id: Textures.inc,v 1.11 2005/07/26 22:55:34 billh Exp $ // Desc: $Log: Textures.inc,v $ // Desc: Revision 1.11 2005/07/26 22:55:34 billh // Desc: as of saves/Tea-006 // Desc: // Desc: Revision 1.10 2005/07/10 19:55:16 billh // Desc: worked some more on the table // Desc: // Desc: Revision 1.9 2005/06/01 19:19:03 billh // Desc: Spout in prograss // Desc: // Desc: Revision 1.8 2005/05/18 07:30:22 billh // Desc: China => Porcelain // Desc: Handle Bulge/Lip in progress // Desc: // Desc: Revision 1.7 2005/05/11 21:35:58 billh // Desc: as of first post - golden sections in place // Desc: // Desc: Revision 1.6 2005/05/10 18:50:06 billh // Desc: as of saves/Tea-1.png // Desc: // Desc: Revision 1.5 2005/05/08 10:18:27 billh // Desc: Radiosity needs different diffuse settings // Desc: // Desc: Revision 1.4 2005/05/06 21:43:39 billh // Desc: Tea (liquid) looking good, photons screw it up // Desc: // Desc: Revision 1.3 2005/05/02 19:59:59 billh // Desc: just a bit more cream colour // Desc: // Desc: Revision 1.2 2005/05/02 19:57:39 billh // Desc: china material good enough for now // Desc: // Desc: Revision 1.1 2005/05/02 19:03:27 billh // Desc: close - good billiard ball material // Desc: // Date: $Date: 2005/07/26 22:55:34 $ // Auth: $Author: billh $ // #ifndef (TEXTURES_INCLUDED) #declare TEXTURES_INCLUDED = version; #debug "\nentering Textures.inc\n" #include "consts.inc" ////////////// /// Porcelain ////////////// #local C_Porcelain = colour rgb<1.00, 1.00, 0.90>; #local P_Porcelain = pigment { colour C_Porcelain } #local N_Porcelain = normal { average normal_map { [1 bozo 0.1 scale 1/2] [1 bozo 0.1] [1 bozo 0.1 scale 2] } } #local F_Porcelain = finish { #if (RAD) ambient 0 diffuse 1.0 #else ambient 0.2 diffuse 0.55 #end brilliance 1.5 specular 0.7 roughness 0.00025 reflection { 0.75 fresnel on } conserve_energy } #local T_Porcelain = texture { pigment { P_Porcelain } normal { N_Porcelain } finish { F_Porcelain } } #local I_Porcelain = interior { ior 1.53 } #declare M_Porcelain = material { texture { T_Porcelain } interior { I_Porcelain } } /////// /// Tea /////// #local C_TeaInterior = colour rgb <0.905, 0.319, 0.150>; #local C_TeaSurface = colour rgbft <1, 1, 1, 0.5, 0.9>; #local P_TeaSurface = pigment { colour C_TeaSurface } #local F_Tea = finish { #if (RAD) ambient 0 diffuse 0.5 #else ambient 0.2 diffuse 0 #end specular 1.0 roughness 0.001 reflection { 1.00 fresnel on } conserve_energy } #local T_Tea = texture { pigment { P_TeaSurface } finish { F_Tea } } #local I_Tea = interior { ior Water_Ior fade_distance CM(2.85) fade_colour C_TeaInterior // * 0.7 media { absorption 1 density { crackle form <1, 0, 0> turbulence 0.2 scale <1, 3, 1> density_map { [0 colour rgb ((<1, 1, 1> - C_TeaInterior) * 0.5)] [1 colour rgb ((<1, 1, 1> - C_TeaInterior) * 3.0)] } } } } #declare M_Tea = material { texture { T_Tea } interior { I_Tea } } //////////// /// TeaStain //////////// #local P_TeaStainSurface = pigment { colour rgbt } #local F_TeaStain = finish { #if (RAD) ambient 0 diffuse 0.5 #else ambient 0.2 diffuse 0 #end specular 0.2 roughness 0.01 reflection { 0.1 } } #declare T_TeaStain = texture { pigment { P_TeaStainSurface } finish { F_TeaStain } } //////// /// Leaf //////// #local P_Leaf = pigment { colour C_TeaInterior / 4 } #local F_Leaf = finish { #if (RAD) ambient 0 diffuse 1 #else ambient 0.2 diffuse 0.6 #end brilliance 0 specular 0 } #declare T_Leaf = texture { pigment { P_Leaf } finish {F_Leaf } } ///////// /// Table ///////// #local WhitenAmount = 6.0; #macro Whiten(Colour) (1 - (1 - Colour) / WhitenAmount) #end #local PM_Table = pigment_map { [0.00 rgb Whiten(<0.50, 0.50, 1.00>)] [0.33 rgb Whiten(<0.50, 1.00, 0.50>)] [0.66 rgb Whiten(<1.00, 0.50, 0.50>)] [1.00 rgb Whiten(<0.50, 0.50, 1.00>)] } #local FN_TableGrain = function { pattern { wood frequency 5 rotate 15 * x warp { turbulence <0.05, 0.05, 0.60> } translate <47, 50, 30> warp { black_hole , CM(20) falloff 7.0 repeat inverse } translate -<47, 50, 30> translate 6 * x warp { repeat x * 20 offset MM(4) * y } translate -20 * z } } #local FN_TableFineGrain = function { pattern { bozo frequency 2 scale <0.03, 0.03, 0.7> } } #local FN_TableShiny = function { pigment { average pigment_map { [ 2 function { 1 - FN_TableGrain(x,y,z) } ] [ 1 bozo scale 0.1 ] } } } #local FN_TableSpread = function { pigment { function { FN_TableGrain(x,y,z) } pigment_map { [0.0 rgb 0] [0.4 rgb 0] [0.5 rgb 1] [1.0 rgb 1] } } } #local FN_TableP = function { pigment { function { FN_TableSpread(x,y,z).gray } pigment_map { [0.0 function { FN_TableFineGrain(x,y,z) } ] [1.0 function { FN_TableShiny(x,y,z).gray } ] } } } #local FN_TablePN = function { pigment { function { FN_TableSpread(x,y,z).gray } pigment_map { [0.0 function { FN_TableFineGrain(x,y,z) * 0.7 } ] [1.0 function { FN_TableGrain(x,y,z) } ] } } } #local FN_Table = function { pattern { function { FN_TableP(x, y, z).gray } rotate 50 * y } } #local FN_TableN = function { pattern { function { FN_TablePN(x, y, z).gray / 2 } rotate 50 * y } } #local P_Table = pigment { function { FN_Table(x, y, z) } pigment_map { PM_Table } } #local N_Table = normal { function { FN_TableN(x, y, z) } // sine_wave frequency 1 } #local F_Table = finish { #if (RAD) ambient 0 diffuse 1 #else ambient 0.2 diffuse 0.8 #end brilliance 0.8 specular 1.0 roughness 0.0001 } #declare T_Table = texture { pigment { P_Table } normal { N_Table } finish { F_Table } } #debug "\nleaving Textures.inc\n" #version TEXTURES_INCLUDED; #end