|
![](/i/fill.gif) |
SharkD <mik### [at] gmail com> wrote:
> I may have asked this before, but what are some good ways to create 2D
> textures that tile?
//==================================================================
#declare PatternFunc =
function { pattern { wood turbulence .5 scale .5 } };
#declare PatternFuncTiledX =
function
{ pattern
{ function
{ (1-x)*PatternFunc(x, y, z) +
x*PatternFunc(x-1, y, z)
}
warp { repeat x }
}
};
#declare PatternFuncTiledY =
function
{ pattern
{ function
{ (1-y)*PatternFunc(x, y, z) +
y*PatternFunc(x, y-1, z)
}
warp { repeat y }
}
};
#declare PatternFuncTiledXY =
function
{ pattern
{ function
{ (1-y)*PatternFuncTiledX(x, y, z) +
y*PatternFuncTiledX(x, y-1, z)
}
warp { repeat y }
}
};
camera { location -z*3 look_at 0 }
plane
{ -z, 0
pigment
{ function { PatternFuncTiledXY(x, y, z) }
color_map { [0 rgb 0] [1 rgb 1] }
}
finish { ambient 1 }
}
//==================================================================
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |