Archived

This topic is now archived and is closed to further replies.

Please HELP with .md2 (about textures)

This topic is 5652 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

Thank you for viewing this message. Please, help me ! I have read a game tutorial #5. There are .md2 files loaded. I thought "it is cool", now i''ll load some quake2 models. But to my suprise textures in quake2 have illegal size (197x100) etc. If i converts them to proper size (512x512) then the model isn''t look correct. AAAAAAAAAAAAAAA !!!!1 How to proper load quake models ????

Share this post


Link to post
Share on other sites
Coordinats are "inverted" so use u = 1-u or v = 1-v;
And why scale 197x100 to 512x512? 256*256 is more than enough.
And next time please use search feature of this forum becouse this question has been anwserd a few times in last 2 months.

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
I''ll try today.
But i saw some source, there was a string kind of:

vertex.u=vertex.u / md2header.textureWidth;
vertex.v=vertex.v / md2header.textureHeight;

Share this post


Link to post
Share on other sites
What? Where can you get textureWidth and textureHeight? There is no such info in md2 header.

could you sent me md2 loading code (email is in my profile)

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
>>What? Where can you get textureWidth and textureHeight? There is no such info in md2 header.<<

when u open up texture file in the files header u generally know how large it is.
ie textureWidth is NOT defined in the md2 file

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
I know that. But he has ...md2header.textureWidth...

it looks like he has textureWidth stored with md2header.. what''s up with that. texture coordinats in md2 are independand of texture size in pixels...

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
Oh ! Forget these lines.
Everything works perfectly.
I came home and saw that textures in Quake2 are inverted.
Never mind, thank you all for help.

Share this post


Link to post
Share on other sites