Closed Dylancyclone closed 4 years ago
Here's what I've found so far:
startposition
attribute can be a point literally anywhere in space. Now, this isn't very unusual considering the same thing can happen for brushes (since those points define a line, which goes on infinitely), but it's weird here because it's just a single point in space not connect to the displacement geometry....unless the startposition
point is on a line formed by the brush that makes up the displacement, rather than the actual displacement. Which would be kind of dumb, and incredibly counter-intuitive, but I guess is a possibility. Which could explain why the problem is worse in decompiled maps since it spits out less user-friendly data.
I finally found the answer. The startposition
attribute isn't necessarily on a line with one of the sides of the brush, but it is placed nearest the point that is deemed the "bottom-left" corner of the displacement. Orienting all the other point around this makes everything line up beautifully. It hurts that I got so close for so long and find the solution just days after making the project public, but I am so so happy this works now. This bug has plagued me for months.
This picture makes me so happy
Sometimes, the orientation of displacements is incorrect. I'm having trouble tracking down the source of the issue, but it seems to occur more often in decompiled maps compared to "raw" vmf maps built in hammer. See an example here: https://youtu.be/3CgoCSRIGqI?t=90
According to the VDC, there is an attribute of displacements called
startposition
that is supposed to indicate the bottom left corner of the displacement, but unless I'm missing something, this value doesn't seem to be spitting out useful information. (and bottom-left corner relative to what? ) https://developer.valvesoftware.com/wiki/Valve_Map_Format#DispinfoThe annoying part is that the overall dimensions of the converted displacement are correct, it's just the order in which the vertices are loaded that is incorrect. This isn't a problem for square displacements since the converted result can easily be mirrored into position, but rectangular displacements are a little more difficult to fix quickly.