Tuesday, February 6, 2007

Tiling a texture across many panels

I had some fun playing with texture offsets and writing a script that would send different offsets to each panel of a LoopRez-created object.

For a test, I wanted to run a long, skinny picture across the bottom of a "skirt." I used an image from the web, at the WHTour:Gugong:Nine Dragons Wall scrolling panoramic view. Here's an excerpt, with 4 of the 9 dragons:

To test the script, I created a LoopRez object with maybe 10-12 panels, and tiled the texture across it, yielding this:

It seemed to work, other than some distortion issues, so I told LoopRez to increase it to ~20-24 panels, and ran the texture tiler. So, from the first object to the second object only took a few seconds, with no manual editing of texture offsets. Cool!

And, just because movies are fun, here's a video of the object rotating around, so you can see more of the dragons, and how the textures are split across the flexi panels when they move:

I don't think this script could ever be useful as a releasable tool, though. Essentially, I think for every project, the script would have to be re-coded, which would probably not be worth it. But it was a fun little hack :)