"Skinning" models
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.
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.
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.
Tim ''Luther'' Lewis, 3d graphics programmer & designer AI-Cube, Japan.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement