How will animations via JSON work?


#1

Does anyone remember if it was already mentioned which data will be stored in a JSON file in Stonehearth (related to animations)?

We know that the export from 3ds Max is done in JSON. I would assume that not all information are exported, but only data related to the animation. Information about the model might be saved in a separate file. Probably the information about the model are directly exported out of Qubicle (also in JSON). I think it was even mentioned that .qmo is not used, but JSON… but do not remember if it was a general statement or linked to how it is used in Stonehearth.

Stonehearth could be finally linking the model-file with the animation-file, depending on the situation and required animation.

This way it would be rather easy to mod existing models. It would just require loading of the model-file into Qubicle, adjustment and an export back into JSON. If you export it with a new name you could re-name also the related animation-files and there you go… a fully animated new model.

For not animated items this means that it would be enough to export a JSON-file out of Qubicle, which could be processed as it is within the game.

So what we would need at the end are information about how the structures of the different Stonehearth-JSON-files are looking like and here we go :wink:.

Any thoughts or information I have missed?

P.S. Where I am heading towards is to understand what export-scripts would be required to allow modding with other tools than used by the devs (e.g. Blender).


#2

your knowledge will be as good, if not better, than most around here, so… yeah…

this is my general understanding of the animation process (provided to me by a little :bird:) :

WARNING: All of this is subject to change by the time the game is released.

Step 1: Make some voxels
Step 2: Export to obj, import to Max
Step 3: Export the skeleton file (JSON)
Step 4: Animate!
Step 5: Export the animation file (JSON)


#3

Ok, that is actually the second way I thought it could work… that export of the model information is also working via 3ds Max / Blender. However, for items which you do not want to adjust it would be cool to have an export-script out of Qubicle (so you do not have to use a second tool just for the export). Something tells me that we will see it this or that way as time passes by :wink:.

So if you want to edit an existing model, you will just do steps 1-3 and juggle around with some files I guess.

P.S. Seems like the format of .obj-files is quite straight forward. The following e.g. is the standard cube which you see in Blender. Just copy the text into a file called “cube.obj” and you can import it in Blender):

v 1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000001 1.000000 1.000000
v 0.999999 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 1.000000 1.000000
f 1 2 3 4
f 5 8 7 6
f 1 5 6 2
f 2 6 7 3
f 3 7 8 4
f 5 1 4 8

… the lines starting with v are including coordinates of vertices, the lines with a f are faces and related vertices.

P.P.S. So for a Blender-Script I would assume we would need 4 options. 2 Export-Options, to export information for either the Mesh/Model or the Animation. 2 Import-Options, to import both.