Archived

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

rendering obj (wavefront) files the fast way!??

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

hi i wonder how can we render obj file format in directX? --------------------------------------------------- for those who don''t so familiar with that format, lets say we have 3 arrays (simple obj): 1. vertex array - regular x,y,z 2. tex coords array - 3 coords x,y,z (not 2 u,v) 3. faces array - depending on the data, in our data it will contain 3 elements (triangles) with 2 indices in each, the first vertex index and the second tex coord index for that vertex. simple example: v 0.0 10.0 0.0 - v says its a vertex vt 1.0 0.0 0.0 - vt says its tex coord f 1/8 3/9 2/10 - f says its a face indices, note that it contain two indices in each element, first for vert & sec for texcoord NOTE: the texcoords array could be bigger then the vertices! and thats where''s the big problem. because i can have 1 vertex with 2 diffrent U,V''s, vertex array doens''t helps so much. so now that i explain the data struct'' HOW DO I RENDER THIS IN DIRECT-X WITHOUT PREPARING EACH FACE IN A SMALL ARRAY AND THEN RENDER IT??? thanks!

Share this post


Link to post
Share on other sites