|
![](/i/fill.gif) |
"alphaQuad" <alp### [at] earthlink net> wrote:
>
> I am scaling the tile to get an approx 0.4 to 1 tile size (eyeballed), but that
> scales the grout also. It's boggling.
>
> Tile scaling needs ... ? doh!
>
> #declare tileplaid =
> texture {
> pigment { uv_mapping
> gradient x
> pigment_map{
> [1/7 rgb 1][1/7 gradient y
> colour_map{
> [1/7 rgb 1]
> [1/7 rgb <.6,.6,1> ]
> }
> ]
> }
> scale <1/160,1/20,1>*.7
> }
> finish { basic_finish }
> }
The 1/7 value is the grout width value. The tile is 6/7 units and the grout is
1/7 units.
Use declare and math to adust tile/grout sizes:
#declare TilSiz= <xdim,ydim,0>; //tile offsetting (tile size plus grout line)
#declare GrtSiz= gwid; //grout width
texture {
pigment { uv_mapping
gradient x
pigment_map{
[GrtSiz/(TilSiz.x+GrtSiz) rgb 1]
[GrtSiz/(TilSiz.x+GrtSiz) gradient y
colour_map{
[GrtSiz/(TilSiz.y+GrtSiz) rgb 1]
[GrtSiz/(TilSiz.y+GrtSiz) rgb <.6,.6,1> ]
}
]
}
scale TilSiz
}
finish { basic_finish }
}
This way you can make the tiles bigger (change TilSiz) without changing the
grout size, or vice versa.
-tgq
Post a reply to this message
|
![](/i/fill.gif) |