Jump to content
  • Advertisement


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

Jerry Velders

D3D9 Assigning texture coordinates to a mesh

This topic is 5238 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''ve been trying for a couple of days to get textures to work. Finally reverted to a simple program in which I build a cube by creating the vertex buffer manually and assigning texture coordinates. Finally the textures began to work. My problem is with applying textures to a mesh, particularly those created with D3DXCreateBox and D3DXCreateCylinder. I''ve found that the vertex buffers associated with these meshes don''t include texture coords. I know out how to clone the mesh and add the tex coords ... but how in the world do you determine appropriate texture uv values for an object like a cylinder, which could have a few hundred faces? Any ideas?

Share this post

Link to post
Share on other sites
Generally, you want your geometry to be exported with texture coordinates built in, but in some cases you can use several methods, such as:

Spherical Texture Mapping

Also look for "planar texture mapping", "cube texture mapping" and "cylindrical texture mapping"... the algorithms aren''t that complex and usually provide good results, as long as the geometry you''re mapping is more or less the same shape as the method you''re using.


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!