// --- COLOR MAPS ----------------------------------------------------------------------- // MYBROWN #declare MyBrownDarkwoodMapA = colour_map { [ 0.00 0.25 color rgb < 0.504, 0.310, 0.078> * 0.7 color rgb < 0.531, 0.325, 0.090> * 0.8 ] [ 0.25 0.40 color rgb < 0.531, 0.325, 0.090> * 0.8 color rgb < 0.547, 0.333, 0.090> * 0.5 ] [ 0.40 0.50 color rgb < 0.547, 0.333, 0.090> * 0.5 color rgb < 0.504, 0.310, 0.075> * 0.6 ] [ 0.50 0.70 color rgb < 0.504, 0.310, 0.075> * 0.6 color rgb < 0.559, 0.322, 0.102> * 0.4 ] [ 0.70 0.98 color rgb < 0.559, 0.322, 0.102> * 0.4 color rgb < 0.531, 0.325, 0.086> * 0.4 ] [ 0.98 1.00 color rgb < 0.531, 0.325, 0.086> * 0.4 color rgb < 0.504, 0.310, 0.078> * 0.7 ] } #declare MyBrownDarkwoodMapB = colour_map { [ 0.00 0.25 color rgbt < 0.404, 0.210, 0.078, 0.20> * < 0.1, 0.1, 0.1, 1.0 > color rgbt < 0.431, 0.225, 0.090, 0.80> * < 0.1, 0.1, 0.1, 1.0 > ] [ 0.25 0.40 color rgbt < 0.431, 0.225, 0.090, 0.80> * < 0.1, 0.1, 0.1, 1.0 > color rgbt < 0.447, 0.233, 0.090, 0.20> * < 0.1, 0.1, 0.1, 1.0 > ] [ 0.40 0.50 color rgbt < 0.447, 0.233, 0.090, 0.20> * < 0.1, 0.1, 0.1, 1.0 > color rgbt < 0.404, 0.210, 0.075, 0.60> * < 0.1, 0.1, 0.1, 1.0 > ] [ 0.50 0.70 color rgbt < 0.404, 0.210, 0.075, 0.60> * < 0.1, 0.1, 0.1, 1.0 > color rgbt < 0.459, 0.222, 0.102, 0.20> * < 0.1, 0.1, 0.1, 1.0 > ] [ 0.70 0.98 color rgbt < 0.459, 0.222, 0.102, 0.20> * < 0.1, 0.1, 0.1, 1.0 > color rgbt < 0.431, 0.225, 0.086, 0.40> * < 0.1, 0.1, 0.1, 1.0 > ] [ 0.98 1.00 color rgbt < 0.431, 0.225, 0.086, 0.40> * < 0.1, 0.1, 0.1, 1.0 > color rgbt < 0.404, 0.210, 0.078, 0.10> * < 0.1, 0.1, 0.1, 1.0 > ] } // MYYELLOW #declare MyYellowWoodMapA = color_map { [ 0.000, 0.222 color rgb <0.80, 0.67, 0.25> color rgb <0.80, 0.67, 0.25> ] [ 0.222, 0.342 color rgb <0.80, 0.67, 0.25> color rgb <0.60, 0.34, 0.04> ] [ 0.342, 0.393 color rgb <0.60, 0.34, 0.04> color rgb <0.80, 0.67, 0.25> ] [ 0.393, 0.709 color rgb <0.80, 0.67, 0.25> color rgb <0.80, 0.67, 0.25> ] [ 0.709, 0.821 color rgb <0.80, 0.67, 0.25> color rgb <0.53, 0.29, 0.02> ] [ 0.821, 1.000 color rgb <0.53, 0.29, 0.02> color rgb <0.80, 0.67, 0.25> ] } #declare MyYellowWoodMapB = color_map { [ 0.000, 0.120 color rgbt <1.00, 1.00, 1.00, 1.00> color rgbt <0.70, 0.41, 0.11, 0.60> ] [ 0.120, 0.231 color rgbt <0.70, 0.41, 0.11, 0.60> color rgbt <0.70, 0.46, 0.11, 0.60> ] [ 0.231, 0.496 color rgbt <0.70, 0.46, 0.11, 0.60> color rgbt <1.00, 1.00, 1.00, 1.00> ] [ 0.496, 0.701 color rgbt <1.00, 1.00, 1.00, 1.00> color rgbt <1.00, 1.00, 1.00, 1.00> ] [ 0.701, 0.829 color rgbt <1.00, 1.00, 1.00, 1.00> color rgbt <0.70, 0.46, 0.11, 0.60> ] [ 0.829, 1.000 color rgbt <0.70, 0.46, 0.11, 0.60> color rgbt <1.00, 1.00, 1.00, 1.00> ] } // --- GRAINS ----------------------------------------------------------------------- // MYBROWN #declare MyBrownDarkwoodGrainA = pigment { bozo colour_map { MyBrownDarkwoodMapA } turbulence 0.04 scale <0.05 0.05 1> } #declare MyBrownDarkwoodGrainB = pigment { wood colour_map { MyBrownDarkwoodMapB } scale <0.20 0.20 1> turbulence 0.04 rotate <-2, 2, 0> } // MYYELLOW #declare MyYellowWoodGrainA = pigment { wood colour_map { MyYellowWoodMapA } turbulence 0.02 scale 0.1 translate <10, 0, 0> } #declare MyYellowWoodGrainB = pigment { wood colour_map { MyYellowWoodMapB } turbulence 0.01 scale 0.5 translate <10, 0, 0> } // --- TEXTURES ----------------------------------------------------------------------- #declare MyDeck = texture { #if(MyShipTex=off) pigment { color rgb < 0.7294118, 0.6627451, 0.5607843 > } #elseif(MyShipTex=on) pigment { bozo color_map { [ 0.00 color rgb < 0.7294118, 0.6627451, 0.5607843 > * 1.0 ] [ 1.00 color rgb < 0.7294118, 0.6627451, 0.5607843 > * 0.6 ] } turbulence 0.2 scale 5.0 translate < rand(MyRandom)*10, rand(MyRandom)*10, rand(MyRandom)*10 > rotate < rand(MyRandom)*10, rand(MyRandom)*10, rand(MyRandom)*10 > } normal { gradient y 5.0 slope_map { [ 0.000 < 0.0, 0 > ] [ 0.015 < 0.0, 0 > ] [ 0.025 < 1.0, 0 > ] [ 1.000 < 1.0, 0 > ] } rotate < 0.0, 0.0, 90.0 > rotate < 0.0, 90.0, 90.0 > scale 0.4 } finish { crand 0.2 } #end }; // MYBROWN #declare MyBrownDarkwood = texture { pigment{ MyBrownDarkwoodGrainA color_map { MyBrownDarkwoodMapA } } } texture { pigment{ MyBrownDarkwoodGrainB color_map { MyBrownDarkwoodMapB } } } #declare MyBrownSimple = texture { #if(MyShipTex=off) pigment { color rgb < 0.5607843, 0.4392157, 0.3529412 > } #elseif(MyShipTex=on) pigment { bozo color_map { [ 0.00 color rgbt < 0.5607843, 0.4392157, 0.3529412, 0.25 > * < 0.5, 0.5, 0.5, 1.0 > ] [ 0.25 color rgbt < 0.5607843, 0.4392157, 0.3529412, 0.25 > * < 0.4, 0.4, 0.4, 1.0 > ] [ 0.50 color rgbt < 0.3176471, 0.2823529, 0.2588235, 0.25 > * < 0.5, 0.5, 0.5, 1.0 > ] [ 0.75 color rgbt < 0.3176471, 0.2823529, 0.2588235, 0.25 > * < 0.4, 0.4, 0.4, 1.0 > ] [ 1.00 color rgbt < 0.4078431, 0.2862745, 0.1686275, 0.25 > * < 0.5, 0.5, 0.5, 1.0 > ] } turbulence 0.7 scale 2.0 } // interior { ior 0.5 } finish { phong 1.0 phong_size 0.5 reflection { 1.0 fresnel } conserve_energy crand 0.2 } translate < rand(MyRandom)*10, rand(MyRandom)*10, rand(MyRandom)*10 > rotate < rand(MyRandom)*10, rand(MyRandom)*10, rand(MyRandom)*10 > #end } #if(MyShipTex=on) #macro MyBrownSimpleQuoVadis(MyOrientation) #declare MySeeder = seed(now*24*60*60); #declare MyDirection = MyOrientation*<1,2,3>; #declare MyAlignment = MyDirection.x+MyDirection.y+MyDirection.z; #switch(MyAlignment) #case(1) texture { MyBrownDarkwood rotate < 00.0, 90.0, 00.0 > rotate < 00.0, 00.0, 00.0 > scale 0.5+rand(MySeeder)*1.5 translate < rand(MySeeder), rand(MySeeder), rand(MySeeder) > } // X texture { MyBrownSimple } #break #case(2) texture { MyBrownDarkwood rotate < 90.0, 00.0, 00.0 > rotate < 00.0, 00.0, 00.0 > scale 0.5+rand(MySeeder)*1.5 translate < rand(MySeeder), rand(MySeeder), rand(MySeeder) > } // Y texture { MyBrownSimple } #break #case(3) texture { MyBrownDarkwood rotate < 00.0, 00.0, 90.0 > rotate < 00.0, 00.0, 00.0 > scale 0.5+rand(MySeeder)*1.5 translate < rand(MySeeder), rand(MySeeder), rand(MySeeder) > } // Z texture { MyBrownSimple } #break #end #end #elseif(MyShipTex=off) #macro MyBrownSimpleQuoVadis(MyOrientation) texture { MyBrownSimple } #end #end // MYYELLOW #declare MyYellowWood = texture { pigment{ MyYellowWoodGrainA color_map { MyYellowWoodMapA } } } texture { pigment{ MyYellowWoodGrainB color_map { MyYellowWoodMapB } } } #declare MyYellowOnWood = texture { #if(MyShipTex=off) pigment { color rgb < 0.9333333, 0.7078431, 0.3588235 > } #elseif(MyShipTex=on) pigment { bozo color_map { [ 0.00 color rgbt < 0.696, 0.526, 0.270, 0.25 > * < 1.0, 1.0, 1.0, 1.0 > ] [ 1.00 color rgbt < 0.465, 0.354, 0.180, 0.25 > * < 0.7, 0.7, 0.7, 1.0 > ] } turbulence 0.5 scale < 1.0, 3.0, 1.0 > translate < rand(MyRandom)*10, rand(MyRandom)*10, rand(MyRandom)*10 > rotate < rand(MyRandom)*10, rand(MyRandom)*10, rand(MyRandom)*10 > } normal { brick 10.0 brick_size < 0.4, 12.0, 0.4 > mortar 0.01 } finish { crand 0.1 } #end } #if(MyShipTex=on) #declare MyYellowOnWood = texture { MyYellowWood rotate < 90.0, 0.0, 00.0 > rotate < 0.0, 45.0, 0.0 > } texture { MyYellowOnWood } ; #end #declare MyYellowSimple = texture { #if(MyShipTex=off) pigment { color rgb < 0.9333333, 0.7078431, 0.3588235 > } #elseif(MyShipTex=on) pigment { bozo color_map { [ 0.00 color rgbt < 0.696, 0.526, 0.270, 0.15 > * < 1.0, 1.0, 1.0, 1.0 > ] [ 1.00 color rgbt < 0.465, 0.354, 0.180, 0.15 > * < 0.7, 0.7, 0.7, 1.0 > ] } turbulence 0.5 scale 1.0 translate < rand(MyRandom)*10, rand(MyRandom)*10, rand(MyRandom)*10 > rotate < rand(MyRandom)*10, rand(MyRandom)*10, rand(MyRandom)*10 > } finish { crand 0.1 } #end }; #if(MyShipTex=on) #macro MyYellowSimpleQuoVadis(MyOrientation) #declare MySeeder = seed(now*24*60*60); #declare MyDirection = MyOrientation*<1,2,3>; #declare MyAlignment = MyDirection.x+MyDirection.y+MyDirection.z; #switch(MyAlignment) #case(1) texture { MyYellowWood rotate < 00.0, 00.0, 90.0 > rotate < 00.0, 00.0, 00.0 > scale 0.5+rand(MySeeder)*1.5 translate < rand(MySeeder), rand(MySeeder), rand(MySeeder) > } // X texture { MyYellowSimple } #break #case(2) texture { MyYellowWood rotate < 00.0, 00.0, 00.0 > rotate < 00.0, 00.0, 00.0 > scale 0.5+rand(MySeeder)*1.5 translate < rand(MySeeder), rand(MySeeder), rand(MySeeder) > } // Y texture { MyYellowSimple } #break #case(3) texture { MyYellowWood rotate < 00.0, 00.0, 90.0 > rotate < 00.0, 00.0, 00.0 > scale 0.5+rand(MySeeder)*1.5 translate < rand(MySeeder), rand(MySeeder), rand(MySeeder) > } // Z texture { MyYellowSimple } #break #end #end #elseif(MyShipTex=off) #macro MyYellowSimpleQuoVadis(MyOrientation) texture { MyYellowSimple } #end #end