POV-Ray : Newsgroups : povray.newusers : tile texture : Re: tile texture Server Time
5 Nov 2024 01:20:37 EST (-0500)
  Re: tile texture  
From: Ron Parker
Date: 20 Apr 2001 12:46:44
Message: <slrn9e0pvl.1fg.ron.parker@fwi.com>
On Thu, 19 Apr 2001 17:52:02 +0200, Sander wrote:
>Who can help me with the building of a texture (macro) that has the look 
>of the image in pbi? I have not the slightest idea where to begin... :(

Somehow my newsreader unsubscribed me from a bunch of groups, including this
one, but I noticed a thread in pbi about this subject and thought I had to
join the whatever-it-is going on here.  Thus, here's my entry into the fray.
Note that while it takes the same parameters as John's macro, it has problems
with mortar pigments that aren't solid colors.  That could be fixed, but at
the expense of making the macro approximately twice as long (or using a 
layered texture, which I consider cheating.)

#macro Herringbone( Brick, Mortar, Thick )
  #local Gz=pigment {
    gradient z
    pigment_map {
      [Thick/2 Mortar][Thick/2 Brick][.5-Thick/2 Brick][.5-Thick/2 Mortar]
    }  
  }
    
  #local Onebrick=pigment {
    gradient x 
    pigment_map {
      [Thick/2 Mortar]
      [Thick/2 Gz]
      [1-Thick/2 Gz]
      [1-Thick/2 Mortar]
    }
  }
  
  gradient x
  pigment_map {
    [.5 Onebrick scale .5]
    [.5 Onebrick scale .5 rotate 90*y translate <.5,0,.25>]
    [.75 Onebrick scale .5 rotate 90*y translate <.5,0,.25>]
    [.75 Onebrick scale .5 rotate 90*y translate <.75,0,.5>]
  }
  warp {repeat x}
  warp {repeat .25*z offset -.25*x}
  scale 2
#end

plane {y 0 
  pigment {Herringbone(pigment{bozo scale .3}, pigment{color rgb .6}, .1)} 
  finish {ambient 1}
}
camera {location 10*y sky z look_at 0}


-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

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