I am new to collada. I first heared about it about one week ago. I am in need of a very very simple 3D file format. There is simply no available 3D file formats supported in C# so far. And I am trying to write a very simple one myself. I allready have some basic support for X3D. But Collada is a much better format people told me.
My simple framework:
I made an UML diagram to illustrate what I am currently trying to program:
- I have a B3DLibrary that is a collection of B3DObjects and B3DTextures.
A B3DTexture is just something that links to an image file.
A B3DObject is basicly nothing more than a collection of B3DFaces.
A B3DFace is a collections of B3Dpoints. A B3DFace also contains a drawingmethod. This drawinmethod corresponds to the OpenGL drawingmethods such as GL_TRIANGLES, GL_POLYGONS, GL_LINES, GL_POINTS, ... etc
There are 2 kind of B3DPoints. There are textured B3DPoints and colored B3DPoints.
A B3DColoredPoint has an x,y,z and r,g and b values.
A B3DTexturedPoint has a x,y,z a texturename, and the xoffset and yoffset of the texture.
Of course that's not a standard format. And I would like to write a converter to convert from Collada to my format. I was wondering which nodes I would need to check of the Collada XML structure.
The UML class diagram:
At the moment I am checking the following xml nodes:
I go through the nodes like this to find the points of the models.
=> LIBRARY type='GEOMETRY'
=> source id="~-Position"
=> float-array id"~-array"
Are those indeed the point-coordinates?
Are there other ways where there are coordinates too?
(Notice that I don't need normals in my format. Because I do not need to identify the top of the faces.)
For the offset of the textures I guess I need these?
0 0 41 1 42 2 1 3</p>
Are these the ones I need? 2 coordinates for each point, right? But since there are 2x4 numbers does that mean I have to write the points like quads?
Thank you in advance:
Hopefully somebody can help me a bit with this. I went through a sample collada-file but to be honest I had trouble finding what I need.