Sign in to follow this  

MD2 skins and powers of 2

This topic is 4862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I got a model that I'm trying to load and it won't texture correctly. I looked and it's 256x195. 195? Are MD2 models supposed to allow for that, or is it the fault of the creator? It seems to work when loaded into q2, just not for my personal MD2 loader. I thought all textures had to be powers of 2? What am I missing here?

Share this post


Link to post
Share on other sites
Perhaps q2 has code to pad out the texture to the next power of two, then adjusts the uv values to make sure that whatever the padding is doesn't affect the texture on the model.

Either way, the texture shouldn't be that dimensions. You should probably resize or pad it yourself. Or add code to pad it, it's all the same. Code to pad it though increases load time if you have it going on all the time which could be avoided by pre-padding. I always like to do as much as possible before the game even runs, and then again as much as possible while the game loads :).

Share this post


Link to post
Share on other sites
That's what I thought. Thanks for the reply. I think I'll just change the value to 256 and fix the file itself up rather than writing code to pad files up to the nearest power of 2. Thanks again for the reply.

P.S.: Do you know where to find a good file format specification of MD3 files? I've found source code that loads them and whatnot, but I prefer plain specifications and can't find any.

I wonder when someone will put up a complete specification of MD5Anim and MD5Mesh files. They don't look too bad.

Share this post


Link to post
Share on other sites

This topic is 4862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this