Page 1 of 1

Basic Texture Skewing Tutorial

Posted: 09 Apr 2012, 19:45
by Tarydax
Basic Texture Skewing

I find myself relearning how to skew every few months if I haven't done it in a while, but I figured I would share what I know before I forget again. If you're an UnrealEd veteran, you'll probably want to stop reading right here because you probably already know what I'm going to show you.

For the sake of this tutorial, I'll be using UnrealEd 2.1, which comes with the unofficial Unreal patch 227. Everything in this tutorial also applies to UnrealEd 2.0, the editor that comes with Unreal Tournament. For those who aren't using 2.0 or 2.1, it's worth noting that the Unreal Editors in patch 226 and below don't come with a console/command bar. In this case, you're best off going with TexAlign. This tutorial will show you how to skew textures via both the command bar and TexAlign. Although there are tutorials already out there on skewing textures, this one gives specific examples so that hopefully the reader will have a better understanding of calculating the required scale.

Now that that's out of the way, let's begin!

Part 1

To get started, set the grid to 16 and make a 1024 by 1024 by 1024 cube, then subtract it. When you've done that, open up your favorite texture set and choose a texture you like. In this tutorial, I'll be using some textures from playrship.utx. For the purposes of this tutorial, choose a texture that's 128 by 128 (it'll fit properly that way – you can scale a texture up or down if necessary, however). Once you've chosen a texture you like, make a 128 by 128 by 512 brush using the CubeBuilder and add it.

In the top view, use the vertex select tool to select two of the vertexes on one side and lower said vertexes by 8 units. Assuming you've done everything like you were supposed to, here's what your brush will look like in the front and side views:



One thing to remember is that in each of those larger boxes that makes up the grid, there are about 64 smaller ones inside. The larger boxes, are made up of 64 size-16 boxes. A size 128 by 128 by 128 cube could fit inside perfectly. Because of this, it's best if you keep your brush on the grid for easy calculation.

Part 2

Now on to the fun part. Take your slanted brush and add it if you haven't already. Align the textures to wall direction. Now you have to do your calculations. If you look in the front view, you'll see that your brush is 512 units broad (because 8 * 4 *16 = 512). 512 is going to be your Run. 128, being the distance from the blue circle in my picture to the bottom vertex of the raised area, is going to be your Rise. For every 512 units your brush runs, your texture will rise by 128 units.



Now, select the side of the brush you want to skew. Then, in the command bar, type the following:

poly texscale UU=1 VV=1 VU=.250000

Your texture should now be skewed properly, but if it isn't, don't panic. Unalign your texture, align it to Wall Direction again, and then add a negative sign in front of the .250000 so that the command looks like this:

poly texscale UU=1 VV=1 VU=-.250000

In TexAlign 2.0, it's a bit different. You can do the same thing, it's just not done in the exact same manner. Open TexAlign and go to the Texture Skew panel. Then, with Vertical Skewing selected, put 128 in for the Rise and 512 in for the Run, as shown here:



"Negate" also replaces the negative sign. The end result will be the same. Here's how my finished product came out:



And that concludes this tutorial.

Credits: R. Wey and Co. for creating TexAlign, and Epic of course for creating the Unreal Editor.
Any feedback is appreciated.

Re: Basic Texture Skewing Tutorial

Posted: 14 Apr 2012, 03:38
by Doublez-Down
Good stuff Teridax. And it's good to see someone doing tutorials to help out those in need.

Re: Basic Texture Skewing Tutorial

Posted: 14 Apr 2012, 16:14
by jackrabbit
Very informative and well written tutorial. Gets to the point and no bs. Would you mind if I copied your post and reformatted for one of the first Tutorials on http://www.udhq.org/ ? I can't promise soon as I'm still developing but I could probably have it up in about a month or so...

Re: Basic Texture Skewing Tutorial

Posted: 14 Apr 2012, 17:05
by Tarydax
Thanks guys. :) And Jackrabbit, you can put it on your site if you want. Go right ahead.