Advertisement

MS3D ASCII -> O3D

Started by October 07, 2001 09:11 PM
-1 comments, last by PyroMeistar 23 years, 4 months ago
Hi, me again... I''m currently writing a small MS3D ASCII -> O3D (my file format) converter. I did the file loader (and it works perfectly). But I''ve had a few problems with the rendering step... 1) I''ve drawn a cube in Milkshape and exported it in ASCII. Why does the number of vertices (in the ''show model statistics'' window (8) is not the same as the one in the file (20). Does the vertices coordinates repeat themselves? 2) When I try to render the model with this code: (variables name should be easy enough to figure out ) for (int h = 0; h < model.numGroups; h++) { for (int j = 0; j < model.Groups[h].numTriangles; j++) { glBegin(GL_TRIANGLES); glVertex3fv(model.Groups[h].Vertices[model.Groups[h].Triangles[j].VertexIndices[0]].pos); glVertex3fv(model.Groups[h].Vertices[model.Groups[h].Triangles[j].VertexIndices[1]].pos); glVertex3fv(model.Groups[h].Vertices[model.Groups[h].Triangles[j].VertexIndices[2]].pos); glEnd(); } } it looks corrupted. Is there any preparation I need to do before displaying the model? 3) What is the smoothing group?

This topic is closed to new replies.

Advertisement