Are there caveats to using off-grid vertices in UDMF?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
-
- Posts: 79
- Joined: Sat Jul 05, 2014 7:38 am
Are there caveats to using off-grid vertices in UDMF?
What it says on the tin.
-
- Lead GZDoom+Raze Developer
- Posts: 49188
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Are there caveats to using off-grid vertices in UDMF?
In some extreme circumstances it can happen that there's a loss of precision in the node builder, but that normally only happens if too many off-grid vertices are too close to each other.
It's really too bad that there's no 128 bit floating point format, which would solve most of these issues. Note that the issue is solely inside the node builder, not inside the engine itself.
It's really too bad that there's no 128 bit floating point format, which would solve most of these issues. Note that the issue is solely inside the node builder, not inside the engine itself.
-
-
- Posts: 10773
- Joined: Sun Jul 20, 2003 12:15 pm
Re: Are there caveats to using off-grid vertices in UDMF?
If you ever hit such issues and you're using GZDB, you can set the grid to a fractional size (e.g. 0.25 units) and use the "snap selection to grid" feature to get things to behave better. This has saved me a few headaches.
-
- Posts: 2254
- Joined: Mon Jan 06, 2014 11:32 pm
Re: Are there caveats to using off-grid vertices in UDMF?
One time this was causing me to get an Unknown ZNODES lump in SLADE. I went around the map by hand moving any off-grid vertex (on the 8 unit grid) onto the grid. Eventually the Nodes Viewer showed a valid format, and then I had my precise ZNODES back.
-
- Posts: 191
- Joined: Sun Apr 28, 2013 2:06 am
- Location: RU
Re: Are there caveats to using off-grid vertices in UDMF?
I have a task to do a multi-linedefs walls, so if I manage to do it with 1 mp, 0.5 mp and 0.25 mp distance between them, it will be easier for nodebuilder to "build" and fortunately would not provoke any glitch problems in the future?Xaser wrote:If you ever hit such issues and you're using GZDB, you can set the grid to a fractional size (e.g. 0.25 units) and use the "snap selection to grid" feature to get things to behave better. This has saved me a few headaches.
From my point of noob view, the problems will occur if I use some "unsnaped to grid" distance between linedefs/vertexes like 0.666 or 0.1337
-
-
- Posts: 10773
- Joined: Sun Jul 20, 2003 12:15 pm
Re: Are there caveats to using off-grid vertices in UDMF?
In an ideal world it wouldn't matter, so you're probably fine proceeding normally and using the snap-to-grid workaround only if you get issues. I've just gotten into the habit of snapping things proactively for paranoia's sake if nothing else.
If you do hit a trouble-spot, it's worth posting the misbehaving map in this bugthread so there's more examples in the off chance someone decides to tackle the root issue.
If you do hit a trouble-spot, it's worth posting the misbehaving map in this bugthread so there's more examples in the off chance someone decides to tackle the root issue.
-
- Lead GZDoom+Raze Developer
- Posts: 49188
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Are there caveats to using off-grid vertices in UDMF?
The root issue is that even 64 bit floating point math can become imprecise when extremely small distances need to be calculated. Since this is a hardware limitation it is currently not fixable.