Jump to content
  • Advertisement

Archived

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

Bugdude

"Skinning" models

This topic is 6788 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''m currently designing a 3d engine for a game and I''m looking into the idea of using skins for texturing the models but I haven''t found any information on how to implement it. The models will be made up from triangles and I intend to implement the engine in OpenGL. Any information on any algorithms and such I would need to use would be most appreciated. The only information I do know is that I will have to ''unwrap'' the models.

Share this post


Link to post
Share on other sites
Advertisement
Usually, you let the modelling program do the unwrapping. Skining is simply the process of mapping a texture onto an object, calculating it''s UV coordinates. This can be done using several methods such as plainar mapping, cube mapping, cylindrical mapping, spherical mapping and everybody''s fave, ''unwrapping'' which takes the model and projects each polygon onto a flat xy plane and should then work out how best to arrange these projected polygons it maximize space usage on the texture. This is good for several reasons; you get to use one or two textures for your characters instead of lots of them which makes this mapping technique memory friendly and you also should get a distortion free, flat mapping for each polygon.
To project a polygon onto the x/y plane you need to translate it to the origin and then look at the projection of the normal down the y axis, work out the angle of rotation and rotate the polygon so that it is flat in that axis and then do the same for the x axis. I had to work that one out recentely for some axis scaling stuff and I could post the matrix I dervied up here if you like.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!