POV-Ray : Newsgroups : povray.text.scene-files : Bricks &Stucco Server Time
1 Nov 2024 13:20:11 EDT (-0400)
  Bricks &Stucco (Message 1 to 1 of 1)  
From: ingo
Subject: Bricks &Stucco
Date: 15 Mar 2000 15:49:50
Message: <8EF8DC135seed7@204.213.191.228>
// Persistence of Vision Ray Tracer Scene Description File
// Vers: 3.1
// Desc: Brick wall & Stucco
// Date: 2000/03/14
// Auth: ingo
//

#version unofficial MegaPov 0.4;

global_settings {assumed_gamma 1.0}

light_source {
   < 500, 500,-500>
   rgb 1
}

camera {
   location  <0.2, 0.0,-25.0>
   look_at   <0.0, 0.0,  0.0>
}

sky_sphere {
   pigment {
      gradient y
      color_map { [0.0, rgb <0,0,0.6>] [1.0, rgb 1] }
   }
}


#declare L2=0.6;              //amount of decay
#declare PWrink= pigment {    //Mortar
   wrinkles
   scale 0.25
   colour_map {
      [0, rgb 0.5]
      [L2, rgb 0.96]
   }
}
#declare Stucco= pigment {    //Stucco
   granite
   scale 0.05
   colour_map {
      [0, rgb 0.96]
      [1, rgb 1]
   }   
}

#declare Tex= pigment {       //Stucco & Mortar
   wrinkles   scale 0.25
   pigment_map {
      [L2, PWrink]
      [L2, Stucco]
   }
}


#declare HF_Stucco=height_field {    //Turn it into a hightfield
   pattern 3000,3000 {               //500,500 for test
      hf_gray_16
      Tex
      warp{reset_children}
   }
   translate -0.5
   rotate <-90,0,0>
   scale <20,20,2>
   pigment {             //Use the mortar to colur up the stucco
      wrinkles
      scale 0.25
      color_map {
         [L2, rgb 0.5]
         [L2, rgb <1,1,0.95>]
      }
      warp {planar y 0}
      translate <-0.5,-0.5,0>
      scale <20,20,2>        
   }
}

//////======================================================

#macro BrickWall(Size,Mortar,Turbulence,Octaves,Lambda,Omega)
   #local Brick= pigment {
      boxed
      scale <Size.x/2,Size.y/2,Size.z/2>
      translate <Size.x/2+Mortar,Size.y/2+Mortar,0>
      warp {repeat x*(Size.x+Mortar)}
      warp {repeat y*(2*(Size.y+Mortar))}
   }
   function {
      pigment {
         gradient y
         warp {repeat y}
         scale <1,2*(Size.y+Mortar),1>
         warp {reset_children}
         pigment_map {
            [0.5, Brick 
                  warp {
                     turbulence Turbulence 
                     octaves Octaves 
                     lambda Lambda 
                     omega Omega
                  }
                  translate <0,-(Mortar/2),0>
            ]
            [0.5, Brick 
                  warp {
                     turbulence Turbulence 
                     octaves Octaves 
                     lambda Lambda 
                     omega Omega
                  }
                  translate <(Size.x/2)+Mortar,(Size.y+(Mortar/2)),0>
            ]
         }
      }
   }
#end

#declare Wall=pigment {
   BrickWall(<4,1,1>,0.2,<0.05,0.1,0>,6,0.5,0.5)
   pigment_map {
      [0, granite 
          scale 0.1 
          colour_map {
            [0, rgb 0][1, rgb 0.3]
          }
      ]
      [0.05, crackle 
             scale <3,1,1> 
             turbulence 0.5  
             colour_map {
               [0, rgb 0.34][1, rgb 0.5]
             }
      ]
   }
   scale 0.04
   rotate -90*x
}

#declare HF_Wall=height_field {
   pattern 3000,3000 {         //500,500, for test
      hf_gray_16
      Wall
   }
   smooth
   translate -0.5
   rotate <-90,0,0>
   scale <33,33,1>
   pigment {
      Wall
      pigment_map {
         [0, rgb 0.6]
         [0.05, wrinkles
                turbulence 0.3
                scale <2,0.3,1> 
                colour_map {
                  [0.0, rgb <0.5,0.3,0.25>]
                  [0.15, rgb <0.5,0.3,0.25>/1.3]
                  [0.3, rgb <0.5,0.3,0.25>]
                  [0.6, rgb <0.6,0.3,0.25>/1.6]
                  [0.8, rgb <0.5,0.3,0.25>]
                  [1.0, rgb <0.5,0.3,0.35>/2]
               }
         ]
      }
      warp {planar y 0}
      translate <-0.5,-0.5,0>
      scale <33,33,1>        
   }
}


object {HF_Stucco}
object {HF_Wall translate <0,0,-0.8>}


-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.