File Formats

Started by
4 comments, last by ageny6 20 years, 7 months ago
I understand that all 3d formats store a series of object, who have a series of faces, who in turn have a series of vertices. But each file format stores that information differently. For example, I think its .plg store vertices by having an array that holds all the points in a 3d object and the faces call upon the index of the array for the face coordinates: 3d solid 1 ->Array of Vertices ->Face Array ->Face1 --->Number of vertices --->Index of array of Vertices ..... So the file would look somethig like this when opened in notepad: object1 face1 4 3,56,7,98 face2 6 33,295,23,12,86,44 face3 3 11,45,12 face4 3 23,4,11 the first number being the number of vertices and the following numbers being the index of the massive array storing all the vertices of the 3d solid This is where my curiosity got pocked. Looking at other formats showed me many different ways a 3d object can be stored in a file. But, there is one method I have yet to see (I am blind, you see ). Is there a 3d file format that stores coordonates of a face for each face as follows: 3d solid 1 ->Face Array ->Face1 --->Number of vertices --->Coordinates of vertices (X,Y,Z) --->Color or refraction constants ->Face 2 --->Number of vertices --->Coordinates of vertices (X,Y,Z) --->Color or refraction constants ..... where the file in notepad would look like this: solid1 face1 3 23.5464,11.1124,98.7575,-9.1755,23.5464,11.1124,27.7575,-19.1755,-6.56 face2 2,11.6000,-2.5000,6.5760,34.565,12.678,453.567 the first number being the number of vertices, and the following numbers the coordinates of the face (X,Y,Z) for each vertices. So the call face4 4... will have 12 coordinates following it. Jonathan [edited by - ageny6 on September 23, 2003 8:43:17 PM]
My signature used to suck. But it's much better and more accurate now.
Advertisement
I seem to recall that DXF stored vertices in a similar way.

How appropriate. You fight like a cow.
Yeah, check out how DXF does it... I think ray-pov does it similarly. I think though that DXF does it not so that the number of vertices is recorded, but rather the presence of some other dxf code indicates more vertices, relying on a check if that code was found, if not another iteration can be performed. Probably highly iterator oriented. Then I think all faces are linked similarly. Making it difficult to create a solid from faces. That''s why I think ray-pov is similar (yet different, hehehe.)

" ''No one has control -- control is just a fantasy. And being human is difficult.'' "
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
Imagine (.iob) stored vertices, then edges as indices in the vertex list, the faces as indices in the edge list. I found the format useful for wireframe objects.

There is a ton on 3D formats on:
http://astronomy.swin.edu.au/pbourke/

(hope the site is still there!)

Edit: Yes the site is there. It is a fantastic resource.

Mark

[edited by - Mark Sheeky on September 24, 2003 3:28:26 PM]
quote:Original post by Sneftel
I seem to recall that DXF stored vertices in a similar way.


Is there a freeware to create DXF files?


Jonathan
My signature used to suck. But it's much better and more accurate now.
If you mean a modeler Blender can export to that format. Check this site too for information on file formats. Yup dxf files are stored just like that create one simple model with blender and open it up with notepad it's pretty close to what you said.

[edited by - FtMonkey on September 24, 2003 11:40:54 PM]
The monkeys are listening...

This topic is closed to new replies.

Advertisement