As far as I found out, there is no possibility to extend the normal .obj-format. Indeed, that would have been a great solution.
Agreed.
I made a little experiment and created a JSON compatibe file that could be a basis for a further discussion. Here you can see the conversion of the file "s\3002s01.dat":
Code:
{
"Header": {
"Description": "~Brick 2 x 3 without Front Face",
"Name": "s\3002s01.dat",
"Author": "James Jessiman",
"!LDRAW_ORG": "Subpart UPDATE 2003-03",
"!LICENSE": "Redistributable under CCAL version 2.0 : see CAreadme.txt"
},
"Metadata": {
"BFC": "CCW"
},
"History": {
"2002-05-07": "[unknown] BFC Certification"
"2003-07-03": "[Steffen] Subfiled for patterns"
"2003-12-19": "[PTadmin] Official Update 2003-03"
"2007-08-29": "[PTadmin] Header formatted for Contributor Agreement"
"2008-07-01": "[PTadmin] Official Update 2008-01"
},
"Vertices": [
{
"Position": [30, 24, 20],
"Color": 16
},
{
"Position": [26, 24, 16],
"Color": 16
},
{
"Position": [-26, 24, 16],
"Color": 16
},
{
"Position": [-30, 24, 20],
"Color": 16
},
{
"Position": [-26, 24, -16],
"Color": 16
},
{
"Position": [-30, 24, -20],
"Color": 16
},
{
"Position": [26, 24, -16],
"Color": 16
},
{
"Position": [30, 24, -20],
"Color": 16
},
{
"Position": [30, 0, 20],
"Color": 24
},
{
"Position": [-30, 0, 20],
"Color": 24
},
{
"Position": [-30, 0, -20],
"Color": 24
},
{
"Position": [30, 0, -20],
"Color": 24
},
{
"Position": [30, 24, 20],
"Color": 24
},
{
"Position": [-30, 24, 20],
"Color": 24
},
{
"Position": [-30, 24, -20],
"Color": 24
},
{
"Position": [30, 24, -20],
"Color": 24
},
{
"Position": [-30, 0, -20],
"Color": 16
},
{
"Position": [30, 0, -20],
"Color": 16
},
{
"Position": [30, 0, 20],
"Color": 16
},
{
"Position": [-30, 0, 20],
"Color": 16
}
],
"Meshes": [
{
"Ref": {
"Position": [10, 4, 0],
"Orientation": [1, 0, 0, 0, -5, 0, 0, 0, 1],
"File": "stud4.dat"
},
"Ref": {
"Position": [-10, 4, 0],
"Orientation": [1, 0, 0, 0, -5, 0, 0, 0, 1],
"File": "stud4.dat"
},
"Ref": {
"Position": [0, 24, 0],
"Orientation": [26, 0, 0, 0, -20, 0, 0, 0, 16],
"File": "box5.dat"
"BFC": "Invert"
},
"Quad": {
"Vertices": [0, 1, 2, 3]
},
"Quad": {
"Vertices": [3, 2, 4, 5]
},
"Quad": {
"Vertices": [5, 4, 6, 7]
},
"Quad": {
"Vertices": [7, 6, 1, 0]
},
"Line": {
"Vertices": [8, 9]
},
"Line": {
"Vertices": [9, 10]
},
"Line": {
"Vertices": [10, 11]
},
"Line": {
"Vertices": [11, 8]
},
"Line": {
"Vertices": [12, 13]
},
"Line": {
"Vertices": [13, 14]
},
"Line": {
"Vertices": [14, 15]
},
"Line": {
"Vertices": [15, 12]
},
"Line": {
"Vertices": [12, 8]
},
"Line": {
"Vertices": [13, 9]
},
"Line": {
"Vertices": [15, 11]
},
"Line": {
"Vertices": [14, 10]
},
"Quad": {
"Vertices": [16, 17, 18, 19]
},
"Quad": {
"Vertices": [18, 0, 3, 19]
},
"Quad": {
"Vertices": [19, 3, 5, 16]
},
"Quad": {
"Vertices": [17, 7, 0, 18]
},
"Ref": {
"Position": [20, 0, 10],
"Orientation": [1, 0, 0, 0, 1, 0, 0, 0, 1],
"File": "stud.dat"
},
"Ref": {
"Position": [0, 0, 10],
"Orientation": [1, 0, 0, 0, 1, 0, 0, 0, 1],
"File": "stud.dat"
},
"Ref": {
"Position": [-20, 0, 10],
"Orientation": [1, 0, 0, 0, 1, 0, 0, 0, 1],
"File": "stud.dat"
},
"Ref": {
"Position": [20, 0, -10],
"Orientation": [1, 0, 0, 0, 1, 0, 0, 0, 1],
"File": "stud.dat"
},
"Ref": {
"Position": [0, 0, -10],
"Orientation": [1, 0, 0, 0, 1, 0, 0, 0, 1],
"File": "stud.dat"
},
"Ref": {
"Position": [-20, 0, -10],
"Orientation": [1, 0, 0, 0, 1, 0, 0, 0, 1],
"File": "stud.dat"
}
}
]
}
I do not know the JSON format very well, so please be lenient when there are errors. This should only inspire the discussion.
With something like this it would be easy to add normals or uv-maps. It would be possible to create gradient brushes and for the rubber parts we could also add bones and bone weights ;-). It would be possible to add render-information (e.g. for the slopes) and we could add hide-conditions or something like that.
But: this would be a new format...