In vrworks media
folder there are two sample scenes (.obj format), SanMigues
and Sponza
. However, the code is parsing the .json
files attached to the 3d models. For instance, the sponza.json
[
{
// this is one object inside the sponza scene is
"file": "Dome/Dome.obj",
"instances": [
[ 0.6, 0, 0, 0,
0, 0, -0.6, 0,
0, 0.6, 0, 0,
-6.8, 1.6, 13.8, 1]
]
},
{ "file": "Sponza/SponzaNoFlag.obj",
"instances": [
[ 0.01, 0, 0, 0,
0, 0.01, 0, 0,
0, 0, 0.01, 0,
-5, 0, 15, 1]
]
}
]
- What does these values mean? I guess (am I right, what are those 0s then):
scale_x, 0, 0, homo_0,
0, scale_y, 0, homo_0,
0, 0, scale_z, homo_0,
x_pos, y_pos, z_pos, homo_1
- In the same
director
, if I check theSan Miguel
scene where each object are instansed separately, e.g.,
...
{ "file": "SanMiguel/table2_tablecloth_final.obj",
"instances": [
[1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000],
[1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000],
[1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000],
[1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000],
[1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000],
[1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000]
]
},
{ "file": "SanMiguel/tree1_leaves.obj",
"instances": [
[1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, -0.050000, 0.000000, 1.000000]
]
}
...
- So, the question is, How can I generate a similar
.json
file for any other 3D scenes I have?