Tutorial 6 - texturing



Tutorial 6 Patch

Texturing allows the mapping of an image to the surface of a Geo. In previous tutorials the Geos had a single color over their entire surface, but this example will replace that color with an image. Think of it like gift wrapping an object in a nice paper.





The first patch has the pix_image object which opens an image file like a jpeg format found on the web. It takes an 'open' message followed by the name and path the image file such as /path/to/my/image.jpg. The pics subpatch has messages for loading some of the files included with the tutorial package. If the file is in the same location the patch loaded from, then no path is needed. The next set of objects make up a file loader that uses the standard dialog boxes for each OS. Hit the bang to get the dialog box and browse your files to find the image of your choice. The openpanel object opens the dialog and returns the full Unix path of the chosen file, and the 'open $1' appends the path to the 'open' message for the pix_image object. Pix_texture does the actual loading of the image onto the graphics card.





The textured_objects patcher shows how texturing works with a cube and sphere. Depending on your hardware and operating system these results might vary. The cube should always have an image mapped to each edge, but the sphere may have an section of it that is not textured. The separator object makes the render chains independent of one another after the point in the chain where they are inserted.





index