Vertex precision issue

Started by Klizmotron, November 17, 2016, 04:30:43 PM

Previous topic - Next topic

Klizmotron

In VMF export dialog there is an option called "Vertices precision", which, in theory, should change the number of decimal places (after dot), but what it does is changes the number of non-zero digits which is allowed to use for verticies positions when exporting a VMF. Therefore, if I have a vertex with position (12345.55646, 0.00031315646, 10.3352462) in Max and the vertex precision set to "4", I will get (1234, 0.0003131, 10.33) in my VMF. This is not convenient, because the further the vertex is from the origin, the less precision it becomes. What I should get is (12345.5565, 0, 10.3352), where it rounds the values to 4 decimal places.  Not sure if it's an issue or is it designed this way, but it doesn't seem to be convenient the way it works at the moment. It would also be cool if vertex precision could be set to 0, and if so, rounded coordinates of vertices to integers. Thanks.

EDIT:
Seems like this is float type presicion of some kind, but if so, I don't see any good use for it. I think it would be great to have additional option that does what I described above, or to change the behaviour of the existing one.


wallworm

#1
Thanks for your feedback.

The vertex precision is, as you discovered, a float precision. I generally keep mine at around 6. I've also moved it higher on those occasions that a level had geometry far from the origin and wasn't grid-aligned.

Probably the best solution is to keep your brush vertices aligned directly to the grid as is customary for brush/bsp geometry. That essentially alleviates the issues altogether. I know that can be a chore depending on the source of the geometry or your familiarity with Max, etc. The best advice I have is to use some of the brush-specific geometry classes available from WW, including CorVex, ShellVex and Arch as they have a checkbox built into them to keep vertices on the grid (labeled "Snap Precision" that has a checkbox and a spinner that defaults to 1.0). And if you have Max 2016 SP2+, there is the Brushify modifier that can force all vertices of geometry to align to the grid. Those tools effectively force you to keep the geometry cleaner (and which are keeping vertex positions effectively as integers).

For me, 90 percent of brushes are CorVex geometry, followed by some miscellaneous cases of ShellVex, Arch or Boxes. For anything not starting as CorVex, ShellVex or Arch, I apply a Brushify modifier (which aside from snapping to grid will also combine coplanar polygons into a single polygon, break non-planar polygons and turn concave quads into convex, split sides). With that workflow, there isn't much need to even think about vertex precision.

Edit: That being said, it does seem odd that your values are coming out not as I'd expect based on the spinners and the VMF values you showed. I'd not expect those results; I will test this. If possible, please send me a Max scene that includes just that one brush in your example image. I will test it.

Klizmotron

Thanks for your reply. The reason why I have unprecise coordinates for some brushes, is, as you said, my geometry source. I imported a level from another game and used it as a reference (it's very fast to create brushes snapping to verticies of reference geometry),  I think brushify modifier is the best solution for such case. I will link you the scene in a few hours.

SMF spam blocked by CleanTalk