ARENA Blender add-on to import/export scenes. For now, only exports.
The Add-on exports the root objects in a scene into separate GLTF files and creates a JSON file describing the scene in a format that ARENA can import. The folder created for the exported scene can then be uploaded to ARENA filestore (typically at '/blender-exports/exported-bolder') and imported using the build webpage.
- Download
blender-arena-export.py
- In Blender, go to Edit -> Preferences. In the Add-ons section, use the Install… button and Browse the filesystem to select the
blender-arena-export.py
add-on file and press Install. - Once installed, don't forget to enable the add-on:
The Add-on exports the root objects in a scene into seperate GLTF files. For example, exporting the folowing scene:
Will create three GLTF files, one for each of the objects at the root of the scene and a scene.json
that describes the scene in a format that ARENA can import.
Once you have a scene to export, navigate to File -> Export -> Export to ARENA. This will present you with a file browser window to select a folder where the scene files are going to be exported.
In this window, you have some options to control the ARENA export:
- Format: The exported GLTFs format. Can be GLB, single GLTF with all files embedded, or GLTF with seperate (.gltf + .bin + textures) files.
- ARENA Username: The ARENA username is used to set paths to assets. When this field is edited, the filestore path (option below) is also updated.
- ARENA Realm: The ARENA realm to include in the output file (not used at the moment).
- Export Selection: Export selected objects only.
- Export Animations: Exports active actions and NLA tracks as glTF animations.
- Export Extras: Export custom properties as glTF extras.
- Draco Compression: Compress mesh using Draco.
- Filestore Path: ARENA filestore path for assets (derived automatically from the username, but can be edited).
Pressing Export to Folder will create a folder with the name provided and output the files according to your scene structure.
Now, copy the folder output by the exporter to the ARENA filestore. The location of the files is important as the assets will be assumed to be at this location. At the bottom left of the Blender window, you can see a note about where the files should be uploaded to.
Finally, go to the build webpage and import the scene.json
file inside the folder uploaded to the ARENA filestore by pressing the import button:
Then, provide either the full path to the .json file on the filestore (e.g. /store/users/<username>/blender-exports/untitled-scene/scene.json
), or simply the scene name (e.g. untitled-scene
) if you placed the exported folder under the default filestore path (/store/users/<username>/blender-exports/
):
You can either add the objects in the JSON file to the current scene in the build webpage (the default) or create a new scene.
The scene.json
file format is an array of objects as given from a MongoDB dump, similar to the python import/export script:
[
{
"_id":{
"$oid":"605d0cb6cab49fe1bf55d9c7"
},
"namespace":"public",
"object_id":"lobby-model",
"attributes":{
"object_type":"gltf-model",
"url":"/store/users/wiselab/room_models/lobby/lobby-v2.glb",
"position":{
"x":0,
"y":-2,
"z":0
},
"rotation":{
"x":0,
"y":0,
"z":0,
"w":1
},
"scale":{
"x":0.05,
"y":0.05,
"z":0.05
}
},
"type":"object",
"realm":"realm",
"sceneId":"lobby"
}
{...}
]