Hammer grid bug?

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
I'm wondering whether this is a UI bug that should be ignored, but it's proper messing with my OCD.

grid-alignment1.png


I'm making a concave fan shape that aligns to the grid perfectly at a 2:1 climb ratio. All of it aligns perfectly. At first i stretched the roof over the circular structure and cut the pieces into place, but then i noticed annoying nodraw pixels showing through the roof later; i checked more closely on the grid views to notice the vertexes had been nudged minutely out of alignment. I thought perhaps this might have been the result of clipping it into shape but then if that was the case why weren't the excess bits cut into micro brushes.

Either way i redid it and all was fine until i compiled, tested and then reloaded the vmf to work on it some more to notice my re-aligned brushes were out of alignment again. I re-aligned the brushes and "checked for problems" to make sure the brushes weren't invalid and auto correcting into odd-off the grid shapes. The brushes were fine, the alignment was legit. Just to be sure i remade the brushes without any cutting, 1 piece at a time and vertexed into position. Closed Hammer and then re-opened and low-and-behold the brushes are off grid once more.

Probably a good thing these are detail brushes, who knows what it could be doing to vvis otherwise. But it's still bugging me. It's a massive pain in the arse to see in Hammer.
 
Last edited:

Mr. Wimples

L6: Sharp Member
Jan 27, 2010
276
226
You may have some "warped" faces, for lack of a better term. I have no clue if this is the same problem, but when I had faces of brushes with vertices that caused "warping", Hammer's compile would automatically adjust the vertices of the brush so the face in question would be straightened out, even if the resulting brush shape was off the grid.

EDIT: Also, I cant really tell from your pictures, but are the faces shown squares or triangles? Or any other shape for that matter.
 

tyler

aa
Sep 11, 2013
5,102
4,621
I had a similar problem when I was working on Hella with some stuff turned 30 degrees. I ended up instancing it and it stopped happening.
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
Brushes tend to break when they're close to being invalid; I had a problem like this once while making a sloped curved roof. I think your best bet is to simplify your brushwork.
 

Moose

L6: Sharp Member
Nov 4, 2009
312
616
Yeah, this has happened to me in the past after working on some relatively crazy geometry. Doesn't seem like it would be too hard to think up another structure for your roof, though.
 
Jan 8, 2011
397
393
Brushes tend to break when they're close to being invalid; I had a problem like this once while making a sloped curved roof. I think your best bet is to simplify your brushwork.

Could he just do the brushwork how he wants it and then put it in Propper?

[Disclaimer]: I've never used Propper before, so I don't know anything about it.
 

tyler

aa
Sep 11, 2013
5,102
4,621
That might work, since it seems like his brushes break when Hammer reads the vmf rather than during compile. Some people dislike Propper though.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Yea, if anyone actually read my OP they'll realise these brushes aren't invalid. They're perfectly legit, aligned to the grid (and they are triangles).

I've explained i'm well aware of hammer autocorrecting invalid brushes but these brushes aren't invalid. They do not get flagged by the problem checker whilst they are aligned and they do not break a compile or cause areaportal leaks or strange visleafs ingame as solid geometry (Though i havn't had the chance to compile with them being messed up), IT's just when the vmf is re-opened one or two vertices will be skewed slightly.

The only thing i can think of is that a vmf doesn't like saving too many vertices to the same coordinates. But assigning them some strange decimal coordinate next to it doesn't make much sense either.

This geometry isn't complex, i've not had a hard time aligning it to other brush work or the grid at all, it's not even on the lowest grid setting.

Maybe it doesn't like brushes at certain angles? Only some of the brushes are affected, often i only have to change half of the brushes, sometimes i have to change all of them. Usually i have to align them at the top where they all connect, but 2 or 3 might be affected on another vertice as well. Where and if they break at all is seemingly arbitrary.

P.S. Invalid shapes are deleted by Hammer when the file is closed. These aren't deleted.
 
Last edited:

Fruity Snacks

Creator of blackholes & memes. Destroyer of forums
aa
Sep 5, 2010
6,394
5,571
The only thing i can think of is that a vmf doesn't like saving too many vertices to the same coordinates. But assigning them some strange decimal coordinate next to it doesn't make much sense either.

That's what I would think is the most logical.

I wonder now if there is some vertex-on-a-point limit...
 

tyler

aa
Sep 11, 2013
5,102
4,621
No one said they were invalid, grazr. Please reread the most relevant post to your response.

Brushes tend to break when they're close to being invalid; I had a problem like this once while making a sloped curved roof. I think your best bet is to simplify your brushwork.

At any rate, whatever.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
No, But there's no such thing as "close to being invalid". Either they're concave and invalid or they're convex and valid. A 5 sided, triangular brush aligned to the grid with no warped faces is no closer to being invalid than a cube.

I went back and did a little experimentation. Creating the basic wedge shape and re-opening the vmf causes no problems. As you'd imagine, otherwise everyone would be having this issue. But as soon as i lower 2 of the corners a couple units, save, close and re-open, the vertices are out of alignment.

Instancing also doesn't resolve the issue, it just causes it to happen in the instance rather than the primary vmf.

This is some crazy bug considering this kind of brush work has been valid since GLD Source.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
I compiled these as solid geometry after they'd been misaligned and the "damage" done to visleaf formation didn't seem to be as significant as what Hammer suggests, but perhaps i just couldn't get a close enough look at the portal edges since the camera speed ingame is fairly high. Though there were some tiny visleafs, i'm actually surprised the engine didn't choke up on them.

More importantly there didn't seem to be any visual disreptancies between the brushes so perhaps the func_details will actually be OK.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
This has happened to me recently too, I think. I plunk down a block, put a pair of cylinders at the corners as guides, and try to clip the corners of the block to match, and the top and bottom corners of each side are just slightly off-grid. I have to go in with the vertex editor and manually realign every point. *shrug* It's a fairly recent thing, probably introduced around the same time as the color splotch bug in VRAD.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Yea, i'm thinking that too, i've never noticed anything like this before and i have very keen eyes. This kind of geometry is completely legit and has been since GLD Source and i've made similar kinds of methodical geometry in the past with no issue. There's no reason for it to be unaligning like this.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
I'm pretty sure the grid rendering goofs up when you zoom in that far. Easy way to confirm if it is a rendering error or not would be to texture one of the apparently goofed up brushes with a material not used elsewhere, then search the VMF for that material in a text editor. Should be easy enough to see if the plane coords are whole numbers or huge decimals.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
I'm pretty sure it's physically goofed since a compile with this geometry as world geometry results in some whacky out of alignment visleafs that fan out at incredibly acute angles.

Though when zoomed out some of the alignments are still clear on the grid and are visible in the hammer 3dview regardless. The nodraw bleeds through the seems, and i'm not talking about the odd pixel, i'm talking about strong lines that demonstrate a clear gap between the brushes/brush alignment.

I could try what you've suggested but given the evidence given after i've compiled it seems pretty obvious to me that this is not simply a UI issue, but a Hammer bug.

A) This doesn't happen anywhere except at locations where there are a lot of vertices. All other vertices appear aligned to the grid regardless of how many times i open an close the file or zoom in and out.
B) The brushes and vertices sharing specific coordinates are fine prior to closing the file regardless of how many times i zoom in or out.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
So, to recap, some time around the Halloween Update, Valve broke the following things:

  • Unusual brushes un-align themselves in Hammer at random
  • VRAD is bugged and produces random brightly-colored splotches on displacements
  • The limits on entities and t-junctions and such have been reduced for no reason

Am I missing anything? Because whoever among our top staff has a direct line to Valve really needs to get a detailed report written up and sent their way.