Brush is valid, all verts on grid. Brush gets mangled when VMF is reloaded as if it was invalid when it never was. WTF?

so my brush looks fine, all the points are on grid

But when I reopen the vmf, this happens

all the points I painstakingly aligned to the grid are pushed off grid, every single one of them.

I know VMF shits itself with offgrid geometry and ruins your brushwork when you carelessly vertex manipulate, but this brush is entirely on grid, it wasn’t marked as an invalid solid after checking multiple times, so what the fuck is Hammer doing?

Select the whole brush, go into VM, and press ctrl-b with all verts selected and on the 1 unit grid. This’ll automatically align it to grid (sometimes it’s literally microscopically off grid) and save it. Should fix it.

Is there a reason this isn’t made with the Arch primitive?

Is the origin on-grid?

The points aren’t on the grid though.

I had this issue before on another map. Change your rectangles into two triangles instead.
Hammer doesn’t like concave brushes, you need to make sure they stay as convex shapes.

They’re aligned, just not to the grid setting I had when I took the screenshot.

And thanks for that tip, Instant, I didn’t know about that function.

Anyways after fiddling with it last night I just said fuck it and converted the brush model this was part of into an actual model, which I would have ended up doing. Except now I don’t have a master vmf that isn’t fucked up now, which means I can’t really make any changes to the design unless I remake most of it. Oh well.

And Seba, it wasn’t made of arches because I was trying to save on solids, but that’s irrelevant now that the thing is a model.

surprisingly it’s a recent feature, you used to be able to do it in the old versions of hammer for goldsrc but that feature somehow got removed until a few months ago.

Typically when hammer is being picky I’ll split a brush up into quadrants or as much as I need to to get it to work. You shouldn’t need to make it into a model. What does it look like from other angles?

I wasn’t able to cut it or anything, it would fuck the geometry up immediately instead as if it was an invalid brush (which it wasn’t). Hammer will helpfully ‘fix’ brushes for you that it deems invalid if you try to clip it or do anything fancy.

As I said it would have been made a model anyways, I just needed to make the actual object first before I could export it off to max. I had to do the same with another part of this object, but that actually was invalid geometry. Can’t wait for Source 2 and the end of convex brush requirements.

It sounds like hammer judged your brush concave. From past experience if you can’t cut it without it deforming, it’s invalid to hammer regardless of how you think it looks. The only solution I’ve found is to remake the brush with multiple brushes, using the invalid one as a reference.

This is a problem with the map format itself.

The VMF format stores brushes by their faces. Each face is an infinite plane that’s clipped by adjacent intersecting faces on the brush and the vertices on the brush are generated from that. This wouldn’t be a huge deal if it was properly implemented, but like with everything Valve does, they fucked it up. This is also why you can’t have concave brushes because the clipping algorithm stops working properly.

The problem is that the VMF format doesn’t have enough decimal precision so when a brush is saved, pretty significant rounding happens and corrupts the face planes, and therefore the vertices. The end result is that even though you may have a technically valid brush, the VMF format can’t accurately represent it and it will get corrupted to something else. I had hell with this on my lavagiant port and it took me about two weeks longer to remake hundreds of brushes that were corrupted into different brushes that didn’t get corrupted from the precision issues.

Here’s an example of the corruption I had to deal with:

Original brushwork:

VMF corruption after save:
[t]http://i.imgur.com/duYD3ii.png

Unlike the corruption you experienced where the vertices just move around, my brushes were shaped in such a way that the three intersecting planes that made a corner couldn’t figure out where exactly to create a vertex. So it decides to create one vertex for each plane plus a few extra floating vertexes that aren’t attached to anything. So I’ve seen anywhere from 3-14 vertices on one corner all bundled together like above.

It’s extremely difficult to select the individual vertexes because 2D mode treats the entire group of vertices as one, which only leaves the 3D view to manipulate them. If you actually take the time, you can peel the corner of a brush apart like a banana and it looks quite odd.

Oh and you absolutely don’t want to compile a map with corrupt brushes like this because it absolutely fucks up visleaf creation. You end up with mangled leaves or micro leaves that players can get stuck in or fall through the world.

There is no fix for this problem other than working around it by not creating such complicated brushes and instead using models in their place.