UV accuracy of the MDL format

Discuss the creation of various model formats for Quake engines, and related matters to modeling.
Post Reply
Downsider
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

UV accuracy of the MDL format

Post 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?
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

IIRC they are stored as unsigned short values. Unfortunately, that's not enough, as you may already noticed.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Downsider
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Post 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.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post 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.
Post Reply