// Burmese and/or Indian Python snake skin texture // Bill Walker "Bald Eagle" - 2016 // based on the diamond cubic crystal network of 4 tetrahedra per cube // Many thanks to the POV-Ray community and POV-Team for continued // inspiration, instruction, and support #version 3.7; global_settings {assumed_gamma 1.0} #include "colors.inc" #include "textures.inc" #declare CubeSize = 10; // number of iterations of x, y, z cubic cells camera { // shift camera to approximate middle of x-z face to fill view location look_at } light_source {<40, 30, -20> White shadowless} light_source {<5.25, 5.25, 5.25> White shadowless} background {Black} #declare T1 = // based on a solid crackle texture from Friedrich Lohmueller // Could use a shinier finish and more complex normals // perhaps a layered texture // definitely some iridescence texture { pigment {crackle scale 1.5 turbulence 0.35 color_map { [0.04 color Black] [0.06 color Black] [0.16 color rgb <0.2, 0.2, 0.0>] [0.32 color rgb <0.6, 0.6, 0.0>] [1.00 color rgb <0.9, 0.9, 0.9>] } // end of color_map scale 10 } // end of pigment normal {bumps 0.75 scale 0.02} finish {diffuse 0.9 specular 0.6 phong 1} rotate <0, -30, 0> translate <0.01, 0.04, 0.00> scale 0.2 } // end of texture #declare Sph = 0.25; // radius of blob's sphere of influence #declare Cyl = 0.1; // radius of cylinder's axis of influence // and hemispherical end caps #declare Strength = 0.02; // blob strength #declare Shorten = 0.05; // adjustment to cylinder lengths #declare CellSize = 1; // #declare Sph = Sph*CellSize; // //--------------------------------------------------- #macro DiamondCubicBlob2 (Corner, S) #declare Quarter = blob {threshold 0.01 // center sphere {<0.25, 0.25, 0.25>*CellSize, Sph, S} // Left Front Bottom sphere {<0, 0, 0>, Sph, S } cylinder {<0, 0, 0>, (<0.25, 0.25, 0.25>-Shorten)*CellSize, Cyl, S} // Right Rear Bottom sphere { <0.5, 0, 0.5>*CellSize, Sph, S } cylinder {(<0.5, 0, 0.5>-)*CellSize, (<0.25, 0.25, 0.25>+)*CellSize, Cyl, S} // Right Front Top sphere { <0.5, 0.5, 0>*CellSize, Sph, S } cylinder {(<0.5, 0.5, 0>-)*CellSize, (<0.25, 0.25, 0.25>+)*CellSize, Cyl, S} // Left Rear Top sphere { <0, 0.5, 0.5>*CellSize, Sph, S } cylinder {(<0, 0.5, 0.5>-<0, Shorten, Shorten>)*CellSize, (<0.25, 0.25, 0.25>+<0, Shorten, Shorten>)*CellSize, Cyl, S} } // end blob Quarter union { // need better code to fully blob together all Quarters object {Quarter} object {Quarter translate <0.5, 0.5, 0>*CellSize} object {Quarter translate <0, 0.5, 0.5>*CellSize} object {Quarter translate <0.5, 0, 0.5>*CellSize} //threshold 1 translate Corner } #end // end macro DiamondCubicBlob #declare Step = 1; union { #for (Z, 0, CubeSize, Step) #for (Y, 0, CubeSize*4, Step) #for (X, 0, CubeSize*4, Step) #local Coordinate = *CellSize; DiamondCubicBlob2 (Coordinate, Strength) // need better code to fully blob together all unit cells #end // end for X #end // end for Y #end // end for Z scale <1.5, 1, 0.05> // z-compression gives "skin" effect, x-stretching simulates scales double_illuminate texture {T1} } // end union // The end result would be perfect if it were seamlessly tilable