POV-Ray : Newsgroups : povray.newusers : tile texture Server Time
5 Sep 2024 10:27:31 EDT (-0400)
  tile texture (Message 1 to 8 of 8)  
From: Sander
Subject: tile texture
Date: 19 Apr 2001 11:51:44
Message: <MPG.1549280482705584989745@NEWS.POVRAY.ORG>
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... :(
-- 
Regards,  Sander


Post a reply to this message

From: John VanSickle
Subject: Re: tile texture
Date: 19 Apr 2001 16:28:13
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... :(

Since you and I share the same birthday, I'll help you.
A test picture is posted to p.b.i.

Use the macro this way:

object { MyObject
  texture {
    Herringbone(BrickTexture,MortarTexture,MortarWidth)
  }
}

Regards,
John
-- 
ICQ: 46085459

// MACRO CODE FOLLOWS

#macro Herringbone(tS,tM,sW)
// tS is the brick texture
// tM is the texture for the stuff between the bricks
// sW is the width of the mortar

#local tA=texture { gradient x
  texture_map { [.50+sW/2 tM][.50+sW/2 tS][.75-sW/2 tS][.75-sW/2 tM]}
}

#local tB=texture { gradient x
  texture_map { [sW/2 tM][sW/2 tS][.50-sW/2 tS][.50-sW/2 tM]
    [.50+sW/2 tM][.50+sW/2 tS][.75-sW/2 tS][.75-sW/2 tM]
    [.75+sW/2 tM][.75+sW/2 tS][1-sW/2 tS][1-sW/2 tM]
  }
}

#local tC=texture { gradient x
  texture_map { [.75+sW/2 tM][.75+sW/2 tS][1-sW/2 tS][1-sW/2 tM]}
}

#local tD=texture { gradient x
  texture_map { [sW/2 tM][sW/2 tS][.25-sW/2 tS][.25-sW/2 tM]
    [.25+sW/2 tM][.25+sW/2 tS][.75-sW/2 tS][.75-sW/2 tM]
    [.75+sW/2 tM][.75+sW/2 tS][1-sW/2 tS][1-sW/2 tM]
  }
}

#local tE=texture { gradient x
  texture_map { [sW/2 tM][sW/2 tS][.25-sW/2 tS][.25-sW/2 tM]}
}

#local tF=texture { gradient x
  texture_map { [sW/2 tM][sW/2 tS][.25-sW/2 tS][.25-sW/2 tM]
    [.25+sW/2 tM][.25+sW/2 tS][.50-sW/2 tS][.50-sW/2 tM]
    [.50+sW/2 tM][.50+sW/2 tS][1-sW/2 tS][1-sW/2 tM]
  }
}

#local tG=texture { gradient x
  texture_map { [.25+sW/2 tM][.25+sW/2 tS][.50-sW/2 tS][.50-sW/2 tM]}
}

#local tH=texture { gradient x
  texture_map { [.25-sW/2 tS][.25-sW/2 tM]
    [.25+sW/2 tM][.25+sW/2 tS][.50-sW/2 tS][.50-sW/2 tM]
    [.50+sW/2 tM][.50+sW/2 tS][.75-sW/2 tS][.75-sW/2 tM]
    [.75+sW/2 tM][.75+sW/2 tS]
  }
}

gradient z
  texture_map {
    [sW/2 tA][sW/2 tB]
    [.25-sW/2 tB][.25-sW/2 tC]
    [.25+sW/2 tC][.25+sW/2 tD]
    [.50-sW/2 tD][.50-sW/2 tE]
    [.50+sW/2 tE][.50+sW/2 tF]
    [.75-sW/2 tF][.75-sW/2 tG]
    [.75+sW/2 tG][.75+sW/2 tH]
    [1-sW/2   tH][1-sW/2   tA]
  }

#end

// END OF MACRO CODE


Post a reply to this message

From: Sander
Subject: Re: tile texture
Date: 20 Apr 2001 02:33:40
Message: <MPG.1549f6bdce9bb528989747@NEWS.POVRAY.ORG>
In article <3ADF4B20.9384CEA6@erols.com>, John VanSickle says...
> Since you and I share the same birthday, I'll help you.
> A test picture is posted to p.b.i.
> 
> Use the macro this way:
> 
> object { MyObject
>   texture {
>     Herringbone(BrickTexture,MortarTexture,MortarWidth)
>   }
> }
> 
Thank you very much!! We may share our birthday, we do not share the 
ability to cough up a piece of work like you did. Wonderful. I'll try 
and understand how it works. But I have the impression that it is beyond 
me :))
-- 
Regards,  Sander


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: tile texture
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

From: Ron Parker
Subject: Re: tile texture
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

From: John VanSickle
Subject: Re: tile texture
Date: 20 Apr 2001 14:37:07
Message: <3AE0829C.5581EBA7@erols.com>
Ron Parker wrote:
> 
> 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... :(
> 
> 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.)

The reason I didn't use the repeating warps was because I couldn't see a
way to eliminate the discontinuity that would appear in the middle of the
bricks that traverse the border.

Regards,
John
--
ICQ: 46085459


Post a reply to this message

From: Ron Parker
Subject: Re: tile texture
Date: 20 Apr 2001 14:49:36
Message: <slrn9e1162.1ik.ron.parker@fwi.com>
On Fri, 20 Apr 2001 20:40:28 +0200, John VanSickle wrote:
>Ron Parker wrote:
>> 
>> 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... :(
>> 
>> 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.)
>
>The reason I didn't use the repeating warps was because I couldn't see a
>way to eliminate the discontinuity that would appear in the middle of the
>bricks that traverse the border.

There's no such discontinuity in mine, because the bricks all use the same
area of the pigment, as with ABX's bricks.  If you wanted to do it without 
the repeating patterns, you could wrap my macro in pigment_pattern with a 
brick pigment of rgb 1 and a mortar pigment of rgb 0 and then use a 
pigment_map to apply the brick and mortar pigments you really want to use.

That, of course, requires MegaPOV... at least for now.

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


Post a reply to this message

From: John VanSickle
Subject: Re: tile texture
Date: 21 Apr 2001 12:43:19
Message: <3AE1B973.71D6A5F0@erols.com>
Ron Parker wrote:

> That, of course, requires MegaPOV... at least for now.

Ah, John understand!  I only started using it just this past
IRTC round.  It does media better, for starters.

Regards,
John
-- 
ICQ: 46085459


Post a reply to this message

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