Are there caveats to using off-grid vertices in UDMF?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

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.
SuaveSteve
Posts: 75
Joined: Sat Jul 05, 2014 7:38 am

Are there caveats to using off-grid vertices in UDMF?

Post by SuaveSteve »

What it says on the tin.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49053
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Are there caveats to using off-grid vertices in UDMF?

Post by Graf Zahl »

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.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm

Re: Are there caveats to using off-grid vertices in UDMF?

Post by Xaser »

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.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Are there caveats to using off-grid vertices in UDMF?

Post by Nevander »

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.
User avatar
Zeberpal
Posts: 189
Joined: Sun Apr 28, 2013 2:06 am
Location: RU

Re: Are there caveats to using off-grid vertices in UDMF?

Post by Zeberpal »

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.
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?
Image
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
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm

Re: Are there caveats to using off-grid vertices in UDMF?

Post by Xaser »

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. :P

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49053
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Are there caveats to using off-grid vertices in UDMF?

Post by Graf Zahl »

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.

Return to “Mapping”