matthewbcool / hubs-blender-exporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hubs Exporter for Blender

This addon extends the glTF 2.0 exporter to support the MOZ_hubs_components and MOZ_lightmap extensions allowing you to add behavior to glTF assets for Mozilla Hubs.

To Install

Find the latest release and download the source zip file.
select source file zip

In Blender: Edit > Preferences > Add-ons
Click install and select the zip file of the latest release.
in blender prefs install addon

Ensure the hubs component exporter is checked and enabled.
hubs blender exporter installed

Adding Components

To add components, go to the "Hubs" section of the properties panel for the thing you want to add a component to. Currently adding components is supported on Scenes, Objects, Bones, and Materials.

Click "Add Component" and select the component you wish to add from the list. Only components appropriate for the object type you are currently editing and have not already been added will be shown.

Using Lightmaps

To use a lightmap, create a MOZ_lightamp node from the Add > Hubs menu and hook up a image texture to the Lightmap input. Use a UV Map node to control what UV set should be used for the lightmap, as you would any other texture in Blender.

lightmap node

Note that for use in Hubs, you currently MUST use the second UV set, as ThreeJS is currently hardcoded to use that for lightmaps. This will likely be fixed in the future so the exporter does not enforce this.

setting bake UV

Exporting

This addon works in conjunction with the official glTF exporter, so exporting is done through it. Select "File > Export > glTF 2.0" and then ensure "Hubs Components" is enabled under "Extensions".

gltf export window

About

License:Mozilla Public License 2.0


Languages

Language:Python 99.7%Language:Shell 0.3%