3D Model Export Scripts - Blender

We have created an export script for models in Blender to make sure the exported visual and collision models are aligned in Sandbox.

Preparing the models for upload using Blender

To make sure models uploaded to the 3D Models works as intended with collision there is a few requirements for the setup of the model. The script below is made to ensure that this is as easy as possible for the user.

Blender Script

Download the Script

Blend_MI_exporter.zip

Script info:

  • Name: SBX Model Importer - Exporter

  • Category: Export

  • Version: (1, 0, 0)

  • Author: OSC

  • Description: Exports Visual and Collision models to Sandbox Model Importer

Installing the export script

  1. Open Blender (tested in 4.1)

  2. Go to Edit > Preferences > Add-ons.

  3. Click Install... and select the MI_exporter.py file.

  4. Ensure the addon is enabled by checking the box next to its listing.

Blender Add-on Install

Exporting your model from Blender

Please read the instructions below carefully. Not following these rules can result in unexpected results, in particular with collision models.

  1. Open the 3D Viewport.

  2. Press N to open the sidebar if it’s not already visible.

  3. Find the Export Models tab.

  4. Set the Export Path and Export File Name

  5. Select the 3d model you want to export. Make sure the model follows the following rules:

    • The visual model and the collision model can be the same model or 2 separate models, but only one single mesh object can be selected on export.

    • The model cannot be part of a hierarchy (it cannot have a parent)

    • Reset transforms (scale and rotation)

      • This can be done with Apply All Transformations. This makes the current pose of the object its new default state (scale, rotation and transform).

    • Set the pivot point of the object to the desired location and make sure it’s aligned to the world

    • Collision models should not contain a lot of unnecessary polygons since this will affect performance.

    • Collision models should not have a material assigned.

    • Make sure the visual model and collision model use the same pivot point with the same local rotations

  6. Click Export Collision/Export Visual depending on which model you have selected.

    • Make sure you do not rename the files between export of Collision and Visual model. They need to have the same name.

Blender Export Example

Import Model into Sandbox

Once your 3D model is properly exported in Blender using the export script, you can proceed to upload your model using the 3D Models system for Cloud.