The Persistence of Ignorance

Menu Home
drap-061011-1

Fabric textures with ArahWeave

MegaPOV 1.2, Oct-2006
arahne-fabrics.zip (1264 K)

The experiments with ArahWeave have at last given some fruits, in the form of an include file to create fabric textures with POV-Ray, using as maps the images generated by this wonderful weaving program.

ArahWeave, even on the demo version, allows saving the fabric simulations designed with it as an image file. The best for a map would be an image of the fabric weave without shading nor interpolation (which can be done to some extent with the full version), but we can also use some tweaking on the simulation to flatten the output image.

This include file operates with two images generated with ArahWeave. First we need an indexed image to use it as a texture map, to give different colors and finishes to each yarn. To obtain this image, after designing our cloth with ArahWeave, we can get ride of the lustre of the yarns to avoid the shadowing (yarns properties can be accesed with F5). We should also select the best simulation, and save it as a 8-bit PNG with 300dpi or more depending on the size of the tile. The resulting image can be loaded into ArahPaint ,or any other image manipulation program, to convert it to indexed format and reduce the number of colors (the most apropiated for use as texture map with POV-Ray).

The second image we need is a bump map to use as normal with POV-Ray, so we can simulate the threading to some degree. This can be the same image for the texture map, but it looks better if we prepare with ArahWeave a second version of the fabric, changing the yarn colors to white and the background to black.

Optionally, we can generate a third image with the regular simulation, to use it as an image map to select yarns colors from it. But we can use also the texture map image if the colors are appropiated. Or we can use no image at all, and simply assign procedural colors to the yarns on the texture map, wich is much more fun... of course.

On the sample images below you can see the result of this technique applied to some meshes generated with MegaPOV (using the cloth simulation). The images used for the fabrics design are mostly the examples bundled with ArahWeave, but I also used some found on the net:


WIPS, tests and other images:

drap-060915-1 drap-060915-2 drap-060915-3 drap-060930-1 drap-060930-2 drap-060930-3 drap-061003-1 drap-061005-1 drap-061006-1 drap-061006-2 drap-061006-3 drap-061012-1

This site uses CMS Made Simple
© 1996-2016 Jaime Vives Piqueres
(jaime-at-ignorancia-dot-org)

Creative Commons License