Node

JSON export

Make sure you’ve read the general notes about all the nodes.

This node takes SceneCity objects and outputs them in a text file, in JSON format, intended for Unity’s coordinate system and importer. The data includes objects transforms, hierarchies, and datablock name. It is meant to be used for exporting complex assets and scenes.

Here is an example file

{
  "sceneObjects": [
    {
      "data_name": "Suzanne mesh",
      "object_name": "Suzanne parent object",
      "children": [
        {
          "data_name": "Suzanne mesh",
          "object_name": "Suzanne child object",
          "children": [],
          "local_quaternion": {
            "w": 1.0,
            "x": 0.0,
            "y": 0.0,
            "z": 0.0
          },
          "world_quaternion": {
            "w": 1.0,
            "x": 0.0,
            "y": 0.0,
            "z": 0.0
          },
          "world_euler": {
            "x": 0.0,
            "y": -0.0,
            "z": 0.0
          },
          "local_translation": {
            "x": 2.1268057823181152,
            "y": -0.07979321479797363,
            "z": 3.7351484298706055
          },
          "world_translation": {
            "x": 9.351879119873047,
            "y": -1.3063974380493164,
            "z": 4.800675868988037
          },
          "local_scale": {
            "x": 1.0,
            "y": 1.0,
            "z": 1.0
          },
          "world_scale": {
            "x": 1.0,
            "y": 1.0,
            "z": 1.0
          }
        }
      ],
      "local_quaternion": {
        "w": 1.0,
        "x": 0.0,
        "y": 0.0,
        "z": 0.0
      },
      "world_quaternion": {
        "w": 1.0,
        "x": 0.0,
        "y": 0.0,
        "z": 0.0
      },
      "world_euler": {
        "x": 0.0,
        "y": -0.0,
        "z": 0.0
      },
      "local_translation": {
        "x": 7.225073337554932,
        "y": -1.2266042232513428,
        "z": 1.0655274391174316
      },
      "world_translation": {
        "x": 7.225073337554932,
        "y": -1.2266042232513428,
        "z": 1.0655274391174316
      },
      "local_scale": {
        "x": 1.0,
        "y": 1.0,
        "z": 1.0
      },
      "world_scale": {
        "x": 1.0,
        "y": 1.0,
        "z": 1.0
      }
    }
  ]
}

If you want to export cities to Unity, watch the video tutorial.