Page 1 of 1

UV accuracy of the MDL format

Posted: Thu Feb 25, 2010 10:23 pm
by Downsider
Wondering how accurate the UV coordinates are on the MDL format. I haven't looked into it, but are they, like the vertex positions for animations/geometry also stored as bytes?

Posted: Fri Feb 26, 2010 1:35 am
by frag.machine
IIRC they are stored as unsigned short values. Unfortunately, that's not enough, as you may already noticed.

Posted: Fri Feb 26, 2010 2:36 am
by Downsider
frag.machine wrote:IIRC they are stored as unsigned short values. Unfortunately, that's not enough, as you may already noticed.
Meh. Bit on the gay side there. I'll either have to redo my UV map or add MD3 support, that is, if MD3 fixes it. If not, I'll say fuck all and drop the project or some shit like that.

Posted: Fri Feb 26, 2010 3:10 am
by Spike
The MDL format uses 32bit ints for texture coords. So you have texel accuracy, but not sub-texel.

MD2 uses 16bit ints for its tex coords (when did you last see a moddel with a texture wider than 32k pixels?), so no better.

MD3s use floats, and thus permit sub-texel accuracy.