A Decentraland scene is a combination of multiple 3D models, until now the artist only where able to work on one 3D model at the time, exporting it and positioning it by trial and error of the position and rotation Transformation on code.
We’ve updated our Blender addon to allow the export of multiple glTF files (including animation) and its transformation in just one click. It also allows to export additional transformations for positioning objects on code.
To update the addon download the latest version from here.
You will see a new section on the Ohmyverse DCL Tools labeled Export scene.
Under de main Scene Collection create 3 collections:
- Here we will store the instances
- Here we will add empties to export additional transformations
- Here we will add collections to be instanced on Main
Lets create an example scene to export:
- Under the Others collection create a new collection labeled Sphere
- Create a sphere in the Sphere collection with position 0,0,0
- Drag and drop the Sphere collection into the 3D View to create a new instance
- Press M and select the Main collection, to move the new instance there
- Under the Empties collection create some additional Empties
Lets setup the addon:
Save the Blender project, and on the Export scene section
- On glTFs path enter a path to a folder where the 3D models should be saved
- On glTFs metadata path enter the path to a .ts file where the position, rotation and scale of the instances will be saved
- On Main collection name enter the name of the collection storing instances (in our example Main)
- On Empties collection name enter the name if the collection storing additional empties to export positions (in our example Empties)
- Check the export glTFs option
Now you can click on Export to DCL , that will result on:
- A .glb file stored on the glTFs path, will be named as the collection instansed
- A .ts file stored on the glTFs metadata path, you can later import that file into your scene code
The addon also exports correctly the different animations for the different 3D model (provided that each element has its own armature).
Hope it can be useful to you, let us know in the comments!