Half-Life Re-imagined competition results on their way...
Check out Skewing textures in Hammer, our newest tutorial!
Welcome, w1Lo, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

10

Cobalt

23

Turquoise

6

Cyan

8

Royal

5

Teal

3

Onliners

11 secs

MistaX88

2 mins

Kachito

5 mins

Jessie

10 mins

Windawz

15 mins

JeffMOD

25 mins

DocRock

30 mins

GMK_5

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Skewing textures in Hammer

Page: [1]

Tutorials > Half-Life > Intermediate > Skewing textures in Hammer

avatar

By kaffikopp (More from this user)
8th October, 2013
Intermediate
texture skew skewing align hammer mapping
star star star star star (14 votes)

Skewing textures in Hammer

If you’ve ever been in a situation like for example having to skew a wall in a particular direction so that it follows an elevation in the floor, you’d probably have to rotate the wall texture and end up with something like this:

Tutorial Image

This can be okay for some occasions, but doesn't really look that good. What do you do if you want the wall texture to run parallel (either vertically or horizontally) with the wall textures next to the skewed brush? You might think it's impossible, which it practically has been, but I’ve discovered a rather simple trick to achieve this using a couple of tools found in Hammer that I suspect are mostly overlooked: Align To View and the Camera tool.

What you need to do is select the Camera tool (Shift+C) and in the 2D Top viewport (in this particular example, if the brush is oriented differently, e.g. with the face you want to manipulate facing upwards, you might have to use another viewport) and place the camera itself along one edge of the brush and as many units away as the brush is long (which in this case is 256 units) and have the camera point 45 degrees towards the opposite edge (check the Top view in the screenshot if you don’t understand what I mean). It is a good idea to downsize the grid to 1 and zoom in and check that the camera is aligned correctly, as it snaps to grid 1. Then, in the 2D Side viewport (again, in this particular example), you will have to place the part of the camera tool that “points” (the red line) at the middle point of one edge of the brush, and the camera itself between the middle point and the lower point of the opposite edge (i.e. a quarter of the total length). The easiest way to find these points is to enter vertex manipulation (Shift+V) with the brush selected, then while in vertex manipulation you select the Camera tool again. Confirm that the camera is placed exactly correct by downsizing the grid to size 1 and zooming in.

Tutorial Image

The next step is to go into the 3D viewport (careful not to move the camera around), enter Texture Manipulation (Shift+A), select “Align To View” from the lowermost drop-down list, and then click on the face you wish to skew. You should get something like this, with the texture being upside down:

Tutorial Image

This is easily fixed by flipping the texture 180 degrees and hitting “Fit”.

Tutorial Image

You can also (if you look very carefully) notice that the skewed texture is actually flipped the wrong way horizontally - this can be a problem in certain cases, like if you use a texture similar to the one I’ve used in the following screenshot:

Tutorial Image

This can actually look quite cool, but if the effect is undesirable and you want to avoid having to flip all the adjacent walls horizontally so that they match the texture of the skewed wall, you will have to, before going through the technique I’ve now described, flip the skewed wall horizontally, then just do everything from the opposite direction:

Tutorial Image

Then you should end up with a correct perspective (obviously you need to flip it back once you're done).

Tutorial Image

And that’s it! Now, don’t ask me why you have to have the camera tool pointing in a steeper angle than the brush is skewed to get a correct angle on the texture, as common sense might suggest that the camera should point at the same exact angle, but this technique does require a bit of trial and error; it’s not always obvious where or at what angle you will have to place the camera and the red line “pointer” (if you have a steeper angle on the skewed brush, for instance, you will also have to have a much steeper angle on the camera than in the example in this tutorial), but with persistence you can achieve greatness the likes of which has been previously unknown to mankind (or something along those lines), like the handrails on this spiral staircase I created:

Tutorial Image

Thanks for reading, hopefully someone will find this useful.

Comments

avatar ciba43 says: star star star star 9th October 2013, 18:32 PM
Got only three words : This is awesome
avatar Sir Red says: star star star star star 11th October 2013, 18:05 PM
:O
avatar stop! says: star star star star star 15th October 2013, 09:03 AM
Very useful
avatar xawari says: star star star star star 22nd October 2013, 12:00 PM
HOW could I have forgotten about this technique?!! (T_T)
Thanks for the tutorial!

Also, I prefer to ALWAYS align textures to face, because when players draw decals on walls, they otherwise will be distorted.
avatar Tetsu0 says: star star star star star 25th October 2013, 02:36 AM
wow. wow. wow. wow.
bravo
avatar jtmk007 says: star star star star 29th November 2013, 00:36 AM
AWESOME! Thank you! I did not know about the "align to view" option! Now I can skew whatever texture w/o having to make a new texture and use a series of wall panels or use rotated textures and wall brushes with slanted ends (to get the textures to line up).

Awesome looking spiral staircase, too.
avatar TheCyberSoldier says: star star star star star 7th February 2014, 19:44 PM
Nice skills!
avatar Boc.Fourever says: 9th February 2014, 11:53 AM
awesome
avatar Boc.Fourever says: star star star star star 9th February 2014, 11:54 AM
5 stars
avatar DiscoStu says: star star star star 21st February 2014, 23:39 PM
I think this is fantastic. Whether you came up with this yourself or is aggregate information from different sources, it's amazing that this can be done. I used to think the "align to view" option was completely useless.

**** only because I don't quite understand the instructions for camera placement.
avatar Kachito says: star star star star star 4th May 2014, 21:06 PM
I remember about an year ago, i wasted about ~2 good weeks trying to do something similar without success. I've read somewhere that it's possible to achieve this by editing the texture straight from the source file (.rmf/.map).

Thanks for the tutorial, it'll be of much help.
avatar Kicius says: star star star star star 15th June 2014, 18:49 PM
News for me. Thank you for great tutorial.
avatar click4dylan says: star 20th June 2014, 20:24 PM
This tutorial is garbage. I am an extremely experienced mapper (7+ years experience) and have never used the Align to View tool. This is the most frustrating, non-userfriendly tutorial I have ever had the misfortune to try to decipher. I have spent at least three hours over the past few months trying to comprehend what you are trying to say in this tutorial, and failed. Not only does the align to view function completely destroy the scale of the textures, but it DOES NOT WORK! Please make a video tutorial instead. No one is going to understand this.
avatar click4dylan says: 20th June 2014, 20:42 PM
Here's a picture of my attempt, that appears to look exactly the same as in your screenshots (from what I can see from those tiny compressed jpegs), that completey and utterly fails:

http://nightfire.no-ip.org/img/hammeraligntoviewp
roblem.png
avatar kaffikopp says: 20th June 2014, 21:40 PM
"No one is going to understand this" - funny, seeing as you're the first one I've come across that didn't understand it. Still, sorry it didn't work for you. I'd help you out but your url got blocked my Malwarebytes, maybe try uploading to imgur or similar instead?
avatar kaffikopp says: 20th June 2014, 21:43 PM
Also, the tiny images are a limit of this site, so not my fault. Can't get them bigger. The tutorial is also available (with larger images) here: http://forums.svencoop.com/showthread.php/41242-S
kewing-textures-in-Hammer
avatar click4dylan says: 28th June 2014, 17:01 PM
Can you please submit a false positive to malwarebytes. I have sent them a message multiple times and they still haven't removed it from their list. There is nothing malicious about my site. If you could make a video tutorial that would be fantastic. Maybe it is my version of hammer, but I literally duplicated your exact block with everything, and it didn't work.
avatar Suparsonik says: 7th August 2014, 04:01 AM
There is an even easier way to flip the texture to the other direction by simply just putting a negative before the number.
avatar Mystyc Cheez says: star 11th January 2015, 19:15 PM
It only works with the exact same brush as in this tutorial.
avatar Stojke says: 8th June 2016, 09:22 AM
There has to be a better way to do this. Maybe edit the .map file in notepad? I remember bruce saying something about that.
avatar SourceSkyBoxer says: star star star star star 6th October 2016, 21:02 PM
Why not use J.A.C.K.? It has UV Look can you tear it and texture will skew :)

Thanks!
You must be logged in to comment.