• Advertisement

Archived

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

How to make 3d model compatible with d3d?

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

Often 3d object model files includes data in following format: vertex 0 ... vertex NumVertices normal 0 ... normal NumNormals texcoord 0 ... texcoord NumTexCoord face vertexId[3] normalId[3] texcoordId[3] face vertexId[3] normalId[3] texcoordId[3] ... ... But D3D requires following vertex structure: struct VERTEX { vector3 pos,nor; vector2 tex; }; I''ve been asked this question also before but didn''t get solution. So, what is best method to convert mesh to d3d vertex system? Simples would be to create three vertices per face. I don''t think it''s good for software t. Or I can create algorithm that combines pos/nor/texcoord and creates minimum amount of d3d vertices needed. It''s slow on load time. I think there are many people among us that have written his own OBJ or PLY or COB or similar loader. How do you get over this problem?

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement