   3D model display
  i don't know too much about theory of 3D formats and stuff right, i just tried to put together a little basic one for my own needs that would use only triangle faces.that works fine, but i export models of OFF type to the format i made, and heres my problem:lot of faces share vertices, whereas i only know how to display individual triangles, so essentially it skips drawing every other face cuz it wont draw vertices more than once.how have people gotten around this in the past? is there an online example i can look at to learn better that some1 can point me to   
  Hey AAAP :)Quote: ...so essentially it skips drawing every other face cuz it wont draw vertices more than once.Unfortunately, I cannot quite follow you here, why do you draw vertices only once ?Can you give a little more detail about how your vertex/face data structures look like ? Maybe that helps understanding where things go wrong !Christian   ;  its very very simple (my format) because im still working on it and don't know all the information that is necessary to be stored.what i have is, triangles are stored in sets of 3 vertices.so if you have like 2 faces that arent touching in any way, they will draw properly because they dont share any vertices. But when you have faces that share an edge, the shared vertices are put in the file only once, so my implementation wont draw the face at all, resulting in skipped faces   ;  Ok, now I got you ! It seems as if you are loosing information on which vertex belongs to which face (or which face consists of which vertices). I assume you saved vertices only once to save up some space; in this case though, you still need to add some referencing information to your faces.This is known as "indexed face sets" where vertices that are shared are stored only once. Faces are represented by a set of 3 indices into the vertex array.This way, no information is lost and vertices can be stored only once. (If you plan to go for texturing or normal smoothing, things are a bit more complicated though and vertices still might be stored multiple times.)Hope I understood your matter properly, if not, dont cease to correct me Christian   ;  no thats right, but i need to learn about these indexed face sets   ;  We are drawing a square using 2 triangles. We'll use 2d coordinates, although in practice you'll be using 3d coordinates, it doens't matter in the slightest bit.We have 4 corners of a square: (-1,1), (1,1), (1,-1) and (-1,-1). (draw it on paper it'll make more sense that way)We'll be drawing 2 triangles. Triangle 1 with points (-1,1), (1,-1) and (-1,-1).The second triangle with points (-1,1), (1,1) and (1,-1).With me so far?Now, we'll write those points to a file in the order (-1,1), (1,1), (-1,-1), (1,-1).Now, because we have only a single list of vertices, we have to specify in what order to draw which vertices.Usually triangles are used, so we have a list of integers (called an index list) and every 3 integers we'll draw a triangle.Index list: 0,3,2, 0,1,3So, according to this index list, the vertices at positions 0,3,2 in the vertex list make up one triangle and the vertices at positions 0,1,3 in the vertex list make up another triangle.   ;  Ok i think i get it, at the bottom of the OFF files, after a series of floats in sets of 3s (the triangles i presumed), is a face index, which just says which vertexes to use? but i could be wrong..4 1 5 4 0 4 2 6 5 1 4 3 7 6 2 4 7 3 0 4 4 10 11 4 5 4 9 10 5 6 4 8 9 6 7 4 11 8 7 4 4 10 9 8 11 4 12 15 0 3 4 13 12 3 2 4 14 13 2 1 4 15 14 1 0 4 12 13 14 15Im just going to take a guess at this:The "4" is probably saying that the face in question is a quad.. and the numbers following it point to vertices listed above it... so I should make like a linked list of vectors and a linked list of faces, that draw using the indexed vertices. I think I get it, thanks a bunch   ;  OFF files aren't too bad.The first line is in this form:OFF V F EwhereV is the number of vertsF is the number of facesE is the number of edges (not important)Then there is a list of V verts. You can store these in a V by 3 array.Then the rest of the file contains F faces. These are in the form:n x x x xx is the index of the vert array and n is the number of verts on that line.The way I've loaded this section in the past is to count the number of lines that start with 3 and make a [n][3] array for those, and the make a separate array for the quads [F-n][4].You can bookmark this for reference:http://shape.cs.princeton.edu/benchmark/documentation/off_format.htmlHope this helps!;  yay i just added this face index thing.now our format is basically the equiv of a binary encoded OFF file (the ones that Blender3D exports to is text, dunno if thats standard of the format)now to add vertex colors. these files are gonna be a bit big ;; oncethey get too huige it will be a good opportunity to learn the wonders of LZ77 compression   