Clarification wanted on when vertex manipulation results in bad shape

Discussion in 'Mapping Questions & Discussion' started by Pianodan, Apr 17, 2009.

1. PianodanL3: Member

Messages:
108
Positive Ratings:
16
So, the vertex tool seems to be very useful, but also very easy to botch.

I've read some of the documentation that says you can't make "convex" shapes, but I'm still a little fuzzy on what constitutes such a shape in three dimensions. Can someone give me a little more concrete description of just exactly what makes the tool hork? Thank you.

2. ApomL6: Sharp Member

Messages:
366
Positive Ratings:
62
Actually, you can not make concave shapes, and convex shapes are the only ones allowed.

The mathematical definition of a convex shape is pretty simple and irrelevant of dimensions : for any pair of points A and B that both belong to the solid, all points between A and B also belong to the solid. An easy way to see that a brush is convex is that all vertices are "outside" the brush, you can't pull a vertex "inside" the brush or it becomes concave.

• Thanks x 1
3. PianodanL3: Member

Messages:
108
Positive Ratings:
16
Just what I wanted to know, thanks!

4. Sgt FragL14: Epic Member

Messages:
1,443
Positive Ratings:
356
Unfortunatley Hammer does everything in (I believe) a clock-wise fashion.

You can see this in a mirrored room's visleafs. You'd think it might do things symetrically. So if you put a cube in the middle of a room, you'd think the visleafs might come out with 2 long ones opposite side of the room and 2 short ones in between the long ones.

But you're more likely to get one long one along one side, going clockwise around the cube the next one would butt to the first then extend to the wall (medium size leaf), the next would be similar to the second. The 4th will be a short one filling in left over space between 1st and 3rd.
OK for leafs, a hint can solve the issue.

But this becomes a problem when trying to make more complex brushes with the vert tool.

Say you have a cube. You want to lower one corner vert to make a ramp in a corner.
2 things could happen (but Valve doesn't show tris, only quads, so it's guess work).
1: you could lower a vert that has a point from each of the tris on top of the cube.
(possibly if moved enough the shading view would show the tris).
This would be invalid because the tris would bend inwards, making a bowl shape.
Cutting the brush in half from corner vert to corner vert would fix it bacuse each remaining brush will be convex wedges.

2: You could lower one of the verts in an adjacent corner and you'd only be lowering the outside of one tri. In which case you have a valid convex brush.
You could go further with this and lower the opposite vert and still have a convex brush.

Unfortunately hammer doesn't align the edges between tris to work, it just tells you it's invalid.

Also unfortunately you can only shape a brush this way at one angle (NW or SE).
If you want a brush to have that same shape but be aligned NE or SW you'd have to scale it by -1 in one direction (this is theory, I haven't tried yet but it should flip the brush AND tri alignment just as it does with textures.

In 3d programs you can actually select the middle edge and flip it, effectively making a concave or convex shape with one click. In Hammer you have to work a little bit more. It also seems to be a confusing concept for alot of people who haven't done any 3d modelling.

5. What Is SchwaL6: Sharp Member

Messages:
375
Positive Ratings:
221
You can't make a pac-man shape with one brush. That is what is meant by "convex."

Further, each face has to be flat. This is the biggest problem people seem to have with vertex manipulation.

6. Sgt FragL14: Epic Member

Messages:
1,443
Positive Ratings:
356
Nope, each face doesn't have to be flat for a brush.
ie: a square brush top doesn't have to be flat, my explanation above explains it.

UNLESS that brush is gonna be a displacement, in which case it DOES have to be a square AND flat.

A brush itself can be any convex shape (wedge, cube, cylinder, pyramid, sphere, undefinable blob) and the faces can be tris, quads or can have 20 sides.
No matter what every TRI face will be flat, there's no way around that, but anyshape above that (quad and up) doesn't have to be flat, you just have to manipulate it correctly so it's still convex.

7. aaUKCS-AliasMann vs Machine... or... Mapper vs Meta?

Messages:
1,264
Positive Ratings:
795
The compile automaticly fixes those cases. It makes them flat again. Thats why you dont see any problem from it. It however isnt possible. You often see that when some people made a circle staircase using the arch tool and then make the edges match up. After the compile there are still some edges that arent aligned.

Hammer doesnt complain but its definitely not possible. The only way to fix it is using the clipping tool

8. ApomL6: Sharp Member

Messages:
366
Positive Ratings:
62
Yes, all faces have to be planar. Hammer will sometimes automatically flatten non-planar faces so you get the impression that it works, but in fact it doesn't. Besides, sometimes it will fail to automatically flatten them and crash, or produce a crash-causing bsp, or something similar.