The final say on subunit mapping Created 13 years ago2011-01-20 09:15:46 UTC by Soup Miner Soup Miner

Created 13 years ago2011-01-20 09:15:46 UTC by Soup Miner Soup Miner

Posted 13 years ago2011-01-20 09:16:32 UTC Post #289393
All right, it's time to clarify this once and for all because I've never quite understood it. I always thought that vertices snapped to the nearest unit during compilation, but apparently not.

What are the consequences of compiling brushes with vertices that lie off/in between the 1-unit grid? What, if anything abnormal or otherwise, would happen? At what point will it just not compile?
Can subunit mapping be applied to world brushes, or is it limited to entities (not breaking up faces and whatnot)? Tell me everything you know.
Posted 13 years ago2011-01-20 09:24:08 UTC Post #289394
I remember for halflife1 if you had some vertices that weren't snapping to the grid and they were defining the inside world from the void, you'd almost always get a leak. There was a special compile tool that worked with float variables instead of integers.

Remember the dome I posted in the WIP thread? A lot of vertices are off the grid and source doesn't report any error. I think source compile tools work with float grid points by default.
Striker StrikerI forgot to check the oil pressure
Posted 13 years ago2011-01-20 09:31:42 UTC Post #289395
I've been moving detail objects tied to entities off-grid for years in Goldsource. Very rarely have problems. Occasionally faces on them don't render, but it's rare.
Archie ArchieGoodbye Moonmen
Posted 13 years ago2011-01-20 09:49:10 UTC Post #289398
On my cubicle I had faces on perfectly legitimate brushes not rendering, so that doesn't say much.
Jessie JessieTrans Rights <3
Posted 13 years ago2011-01-20 13:49:56 UTC Post #289408
I've always believed that vertices that lie off/in between the 1-unit grid snap to nearest unit. The result is that you get cracks in walls, caused by carving a cillinder into a wall for example or you get deformed brushes.

That's why HLFix was invented. HLFix basically replaces the EXPORT TO .MAP feature in Hammer as it generates a .map file on its own. The major difference is that, as CStriker pointed out, HLFix exports a .map as floating points instead of integers which no longer causes vertices to snap to the nearest point. The result is that rotated and/or twisted objects no longer look deformed ingame.

However, there appears to be some compatibility issues with HLFix and the latest SHLT. Known issues are outside world errors and dissapearing faces.

So right you want to
  • Use HLFix to generate the .map file which has floating points instead of integers but in return you're forced to deal with possible compiling errors and disappearing faces
  • Stick to SHLT and not use HLFix to get around the compatibility issues between HLFix and the other tools but you're back using integers again causing cracks and deformed brushes due to off-grid vertices.
The Mad Carrot The Mad CarrotMad Carrot
Posted 13 years ago2011-01-20 14:06:04 UTC Post #289409
What about using HLFix and ZHLT?
Posted 13 years ago2011-01-20 16:41:59 UTC Post #289415
I use HLFix with SHLT and i've never had a problem..
Captain Terror Captain Terrorwhen a man loves a woman
Posted 13 years ago2011-01-20 23:26:45 UTC Post #289466
I guess it's a good thing I'm still using Zoner's tool, then. Thanks guys.
You must be logged in to post a response.