Sign in to follow this  

Skin not aligned properly on model

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

When I load a .md2 model in my opengl (c++) project and try to put a 256*256 tga skin on it, the texture is not mapped properly (the skin is not aligned properly). What could be the problem?. Here are the links to some screenshots to show the problem more clearly: http://img64.imageshack.us/my.php?image=skin12ui.png http://img64.imageshack.us/my.php?image=skin22bx.png Im new to the skinning so please any help would be greatly appreciated. Thanks.

Share this post


Link to post
Share on other sites
what mapping method are you using? if you're uv mapping it then everything should be fine unless you are not telling the exporter to "preserve tex coords". and if you are then it may be something with your code... however i can't be too sure, you are not providing very much info.

Share this post


Link to post
Share on other sites
I am using the uv mapping method; I am using milkshape 1.75 to export the model as a md2, how can I know if I am not telling the exporter to "preserve tex coords"; What more information can I give you to help me?

Share this post


Link to post
Share on other sites
The texture doesn't look stretched unevenly, so the relative positions between the uv-coords seems to be ok.
My guess would be that it's probably an error in the code for loading the texture, mirroring it or displacing it in some direction, or an error in the code that loads the uv-coords, displacing or mirroring those.

Share this post


Link to post
Share on other sites
Quote:
Original post by Necator
The texture doesn't look stretched unevenly, so the relative positions between the uv-coords seems to be ok.
My guess would be that it's probably an error in the code for loading the texture, mirroring it or displacing it in some direction, or an error in the code that loads the uv-coords, displacing or mirroring those.




So...what should I do?...where in the loading code do you think it is?....should I post the code...which parts of the code should I post?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I would try checking the texture and uv-coordinates in some editor. If you can locate which parts of the texture ends up where on the model, you can probably get an idea of what's going wrong.

Share this post


Link to post
Share on other sites
Looks like my old free zombie model? anyway it also looks like the UV's have been flipped either horizontally or vertically or possibly both, not sure how or why but check your loader code and see if you can flip the UV's...or possibly do it in milkshape and re-export/test to see if it works!!

Share this post


Link to post
Share on other sites
Quote:
Original post by PsionicDesign
Looks like my old free zombie model? anyway it also looks like the UV's have been flipped either horizontally or vertically or possibly both, not sure how or why but check your loader code and see if you can flip the UV's...or possibly do it in milkshape and re-export/test to see if it works!!


It is your model!!(I am using it to test my loader. Thanks...It looks great, keep up the good work). By the way I forgot to tell you that the model was rendered perfectly in another md2 loader code :? , that's whats confusing me :? This means it must be in my code. How do you flip UV's in opengl?

Share this post


Link to post
Share on other sites

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