POV-Ray : Newsgroups : povray.newusers : tile texture : Re: tile texture Server Time
5 Nov 2024 01:25:35 EST (-0500)
  Re: tile texture  
From: Wlodzimierz ABX Skiba
Date: 20 Apr 2001 09:54:42
Message: <3ae03fa2@news.povray.org>
John VanSickle wrote in message <3ADF4B20.9384CEA6@erols.com>...
> 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... :(
>
> A test picture is posted to p.b.i.

same my test picture
and here is my solution using repeating warps (first time for me) and layered
textures (first own by me)
code is much shorter I think
I considered repeating of rotated image

#macro TexForSander(MS,L,MC,IN)
  // MC - Mortar color
  // MS - Width of mortar
  // L  - Length of piece
  // IN - Image name
  #local W=(L-MS)/2; // Width of piece
  #local P=2*(MS+L); // Distance of repeating
  #local Img1=texture{pigment{
    image_map{sys IN once}
    rotate x*90
    scale <W/P,1,L/P>
    warp {repeat x}
    warp {repeat z}
    scale P
  }}
  #local Img2=texture{Img1 rotate y*90}
  #local V=MS+W;
  #local U=MS*(1+z);
  texture{pigment{color rgb MC}}
  texture{Img2 translate MS}
  texture{Img2 translate MS+V}
  texture{Img2 translate MS+2*V}
  texture{Img2 translate MS+3*V}
  texture{Img1 translate U+V}
  texture{Img1 translate U+2*V}
  texture{Img1 translate U+3*V}
  texture{Img1 translate U+4*V}
#end

use it for example this way:

plane { y,0 TexForSander(0.05,1,color rgb 0,"back78.bmp") }

I worked on it with megapov but it should work with povray 3.1

ABX


Post a reply to this message

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