A blog relating to Jeepers Shoes for Men in Second Life by Eponymous Trenchmouth.

Sunday, November 4, 2007

How I texture. Part 1

I have been complemented on the appearance of my shoes. While I make no pretense to call myself an artist, I have found ways to be creative within my limitations. First and foremost, I am a builder, a manipulator of prims. But without the ability to add a realistic texture to an object, it will appear flat and false, rather than alive and authentic. While I strive for realism in the things I make, my comments also apply to builders of cartoonish or fantastical objects.

One of the simplest yet most important things you can do when texturing a complex object, is to make sure that all similar textures are to the same scale. The repeat of a texture varies from cube to sphere to torus, particularly when they are cut or hollowed. With regular patterns e.g. a brick wall, its quite easy to see which faces need to have their textures corrected, re-oriented, stretched or shrunk. but with abstract patterns, sometimes its hard to see if the pattern is even going in the right direction. Rest assured, it will show up down the road, when you wonder why one face looks a little different from all the others.

What I do before I begin texturing an object,is to cover all faces of the object with a simple 10 x 10 grid. The one I use is divided into 100 numbered squares. The numbers enable me to wrap a texture continuously across a series of faces. Confession: I copied this grid from somewhere in Second Life without asking for the owners permission. Bad!


To demonstrate my technique, I'm going to use an example that occurred recently, when I decided that the stairs in my store needed a runner; a carpet that would lead the shopper up the stairs to the next level. I wanted to use an existing oriental carpet texture as the runner, and have it flow seamlessly up the treads and risers, without a break in the pattern.

Step 1. (Pun intended) Since the stairs in question were existing, I had to make the carpet prims fit the size of the tread and rise (the horizontal and vertical parts) of the stair. I began with the middle step and once I had it sized correctly, I duplicated it to create the top and bottom parts.


Step 2. After making all 3 prims transparent, I used the grid texture on the faces of the three prims that would become the carpet: in this case, 3 treads and 2 risers. You will notice that each face displays the full 10 x 10 grid, but depending which way the prim cubes are oriented, the grid may not be oriented in the same direction on each face.


Step 3. Change the Rotation of the appropriate faces so that the grid texture is oriented in the same direction on each face. So far so good. But we don't want to display the full 10 x 10 grid on each face. We want to stretch the grid texture out across the full length of the carpet, so that the proportions of the grid are identical on both the treads and the risers. NB. In this instance, I am not concerned about the width of the carpet. The carpet could be 1m wide or 10m wide.


Step 4. Department of Mathematics. My treads are 1.0m deep (from front to back) and the risers are 0.45m high. The total length of the carpet is 3 treads plus 2 risers or (3 x 1.0) + (2 x 0.45) = 3.9m. If I divide 1 by 3.9, I get 0.256m. Or to put it another way, each tread will be 1.0 x 0.256 of the grid texture and each riser will be 0.45 x 0.256 (0.115) of the grid texture. To check this, 3 treads @ 0.256 (0.77) plus 2 risers @ 0.115 (0.23) equals 1. (Numbers are rounded up for convenience)


Step 5. Click on all 3 tread faces and change the Horizontal Repeats Per Face from 1.000 to 0.256. Next click on the 2 risers and change the Horizontal Repeats Per Face from 1.000 to 0.115. Now all the grid squares are of the same proportions, but the numbering does not flow continuously from end to end.


Step 6. Beginning with the top tread, we want the #1 square of our grid to be at the far end of the prim. By trial and error (there must be a cleverer way to do this, but it works for me) set the Horizontal Offset to 0.630. Leave the middle tread the way it is, and set the bottom tread to 0.370. Change the top riser Horizontal Offset to 0.817 and the bottom riser to 0.187. Hopefully, you will see that the grid numbers now run continuously in the same proportions from top to bottom.


Step 7. Click on all five faces of the stair runner and select the carpet texture. Bingo! A seamless carpet pattern. (Your results may vary).

No comments: