Surfaces can be decorated with texture tiling and/or texture painting
using one or more sample textures, such as BTFs. In a described
implementation of texture tiling, a patch-based BTF synthesis algorithm
is utilized. In an example embodiment, a mesh of a target surface is
re-sampled to produce a dense mesh such that there is a one-to-one
correspondence between vertices of the dense mesh and pixels of an image.
Patch matching is then employed with a working image that corresponds to
a working patch. In an example embodiment, the patch matching is
effectuated using translations and rotations of the sample texture. In a
described implementation of texture painting, irregular feature(s) of a
sample texture are synthesized onto a target surface. In an example
embodiment, user-specified constraints as to a desired foreground feature
of a sample texture and an intended foreground region of a targeted
surface are factored into a graphcut operation.