Please HELP with .md2 (about textures)

Started by
5 comments, last by z0rr0 21 years, 10 months ago
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 ????
Advertisement
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.
You should never let your fears become the boundaries of your dreams.
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;

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.
You should never let your fears become the boundaries of your dreams.
>>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
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.
You should never let your fears become the boundaries of your dreams.
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.

This topic is closed to new replies.

Advertisement