Tutorial: Vertex Manipulation Part 2 Last edited 2 years ago2022-10-10 23:02:30 UTC

Download attachment

In this tutorial we are going to explore a more advanced application of vertex manipulation. If you haven't already, I suggest you read the Vertex Manipulation Intro tutorial first, so that you understand the basics of the tool.

Most beginners ignore vertex manipulation and use the simpler Carve and Clip etc. tools to alter solids. These are weak in comparison! Their major drawback is that they often result in sub-unit vertices. These are rounded-off when the map is compiled, resulting in strange problems. Take a look at this carved hole:
One of the many reasons carving shortens your life expectancyOne of the many reasons carving shortens your life expectancy
Ugly carving!Ugly carving!
Notice the annoying little black 'things' that radiate from the corners (vertices). Here's a section of the actual structure:
Off-the-grid evilOff-the-grid evil
The Snap to Grid is set to 1. So each intersection made by the grid lines is a single unit, the smallest point that you can work with in a map. The vertices you see in the red circle are meeting at some point between units. The game engine doesn't like this, so you get all kinds of mess-ups when it happens. And it happens often. Carving with complex shapes, careless clipping and rotating can all create sub-unit vertices.

So what's the answer? Well, vertex manipulation, of course! The thing said most often with regard to the vertex tool is 'be careful', but frankly, it's far easier to mess up with the other tools, and at least invalid shapes created by the vertex tool are detected by WorldCraft (Map -> Check for Problems). Altering vertices alone, it's impossible to get them onto sub-unit grid points (even with Snap to Grid off, the vertices will still snap to single units).

In this tutorial we're going to make an alternative to the cylinder carve I just showed you, that looks and works much better. This is just to give you an idea of what can be achieved with vertex manipulation - working out whether and how it should be used to solve other problems is up to you.

The Template

The first thing to note about the cylinder primitive is that all of its vertices will always land up on a grid unit (there are never any sub-unit vertices). Just don't resize the cylinder after you've created it.

Let's start with a 32w x 64l x 32h 8-sided cylinder. We're going to use it as a template around which we'll construct our tube. You could use any number of sides, but smaller, even numbers are easier to work with. You'll see why in a minute...
Not very exciting...Not very exciting...

Making a Tube

Because we're making a tube, we need to create sides. Because we've got an even number of sides to our template cylinder, we only need to create one piece of the tube that we can then clone for the other sides.

Make sure you're in 1-unit grid mode (press [ until it goes no further). Zoom into one diagonal of the template, and build a block like so:
Start smallStart small
It doesn't have to look exactly like that, because you are going to alter its shape in the next step...

Now, with the new block selected, go into vertex manipulation mode (Shift+V). Drag the top-right vertex across to the cylinder's vertex, and the top-left vertex down to the bottom-left one (and say 'Yes' when it asks you if you want to merge them). There are plenty of other ways to do this, as long as you end up with something like the picture below. Notice how the bottom-left vertex is in line with the furthest-left point of the cylinder:
Vertex Manipulation = WinVertex Manipulation = Win
At this point you could shift-drag the manipulated solid, flip it and rotate it to fit into the other sides. In some situations this isn't the best idea, but it'll work in our case. The alternative is the shift-drag the manipulated solid, then go into vertex mode and move the vertices around so they complete the other sides. With tubes with even numbers of sides, you may be able to do one quarter of the tube, then select all of its solids and duplicate them, then flip them so they fit into the other quarters. You'll work out short-cuts as you go along.

Finally, delete the template cylinder, and add any extra blocks around the tube that you need. You'll land up with something like this:
No more invalid solids!No more invalid solids!
Which looks like this in 3D:
Much better!Much better!
Here is an alternative method for creating the tube, involving more vertices, but slightly simpler creation:
But can we make it a bit more smooth?But can we make it a bit more smooth?
Here's a 32-sided tube...
Of course! Looks great, eh?Of course! Looks great, eh?
And here's its carved alternative (ug!):
Whatever you do, don't try this at home.Whatever you do, don't try this at home.
And finally, a tube with an odd number of sides (5):
How odd O.oHow odd O.o
It's important to realise that vertex manipulation can do pretty much anything - it's just not always the easiest way. There are times when you have to use it, there are times when it's the most efficient way, and there are times when using any other tool would just be silly. You need to learn when to use it as much as you need to learn how to use it. This tutorial has hopefully taught you some of the 'how', but it's impossible to explain the 'when' - there are an infinite number of possible situations in mapping. Armed with the understanding of the finite number of tools at your disposal, it's up to you to decide when to use what. Just bear in mind that the 'simple' tools, Carve, Clip, Hollow, Rotate, Shear, when used improperly, can cause far worse problems than vertex manipulation can when used improperly.

By the way, rotating solids using the Transform Tool (Ctrl+M) is far safer than rotating using the Selection Tool and manually rotating - it always snaps vertices to units. So that's one tool you can always trust!

The example map includes the set of tubes used in this tutorial, which you can experiment with. Just remember: if you can do it with clip, carve, hollow etc., you can do it better with vertex manipulation!
The example map has no shortage of tubes.The example map has no shortage of tubes.

6 Comments

Commented 14 years ago2010-02-20 16:07:15 UTC Comment #100533
Good tutorial :) 5stars
Commented 13 years ago2011-04-11 06:36:26 UTC Comment #100534
Thanks!!!
Commented 13 years ago2011-07-21 15:06:18 UTC Comment #100535
If only everyone knew this!
Commented 12 years ago2012-01-29 21:34:06 UTC Comment #100536
Okay, I was going to ignore this, but there is simply too many serious mistakes in this tutorial, some of which are just plain misstates.

First of all, vertex manipulation can NOT do pretty much anything. It's a tool you sort to in many cases when you would use the carve tool, so you got that much right. For the rest of your tutorial, you really shouldn't write things that you don't know are true. The vertex manipulation tool is something you should use carefully in cases where using a different tool would create problems. Some examples are when creating tubes (as shown above), arches, and tetrahedrons.

"Just bear in mind that the 'simple' tools, Carve, Clip, Hollow, Rotate, Shear, when used improperly, can cause far worse problems than vertex manipulation can when used improperly."

-That is an outright lie, and I hope that the fact that you have time on your side has paid off for you. The problem with vertex manipulation is, in fact, that it causes some very nasty problems, if you use it the wrong way. Brushes can get inverted, and they can easily cause many of the same issues that you describe above, when talking about carving.

However, I still hope that most people reading this tutorial is experienced enough not to believe that using vertex manipulation over any other tool is an intelligent thing to do.

ONE LAST THING, do NOT use the Transform Tool (Ctrl+M) to rotate objects, try doing so, and it will explain itself.
I guess most people won't actually go do it, so to keep it short, I have included an example with an object larger than 1 block here:
User posted image
[/URL]

Left to right: no rotate, transform tool, selection tool
Commented 12 years ago2012-01-29 21:37:13 UTC Comment #100537
EDIT: I'll just upload the url for the image, so you can actually tell the difference: http://s15.postimage.org/8alfzr17t/transfm_tool.png
Commented 7 years ago2017-02-15 18:44:00 UTC Comment #100538
Looks very nice :)
I would like to make a tube with a curve that way. Does anybody know how to do that?

You must log in to post a comment. You can login or register a new account.