Releases: Hubs-Foundation/hubs-blender-exporter
1.0.0 Beta 1
This beta release contains major add-on updates:
- A new add-on architecture based on code components to provide more control over the components functionality and easier extensibility. You have more information about the new components architecture and how to start developing in the Wiki
- Foundational work for Gizmos support. Currently just a few components have gizmo support but we will add more soon. There is scripts to create add-on gizmos from Blender scenes.
- Usability and UI improvements. Components panels are now more informative now about errors.
- Dependencies management. The add-on now handles adding and removing component dependencies automatically.
- Bone support for all components. Hubs support components in bones for the majority of the components but that wasn't implemented in the add-on yet, now most components can be added to bones.
- CI support and testing through Github Actions. Tests are run now for all components. https://github.com/MozillaReality/hubs-blender-exporter/actions/runs/2568858321
- Migration support for full compatibility with previous add-on versions.
- The add-on source folder structure has changed to accommodate the new features, like CI/test or helper scripts, so it can no longer be installed directly from the source zip file. Now you have to download the add-on zip file linked in the binaries section.
Bugfixes
- Fixes the default value for
Max Width
on the Text component. Previously it was set toInfinity
but this would fail to export unless changed to a finite value. Now defaults to1m
. - Fixed issues exporting Waypoint with certain options. Previously some options would lead to scenes that would fail to load in Hubs.
- Removed some unnecessary options from Waypoint, and added better labels and descriptions for the remaining properties.
Fancy Text & More
This release contains a number of new components as well as some changes and fixes to existing components. Reflection Probes are not yet in this release but that branch has been updated with all of these features as well!
Updated Text Component
The text component has been reworked with new options to go along with the updated component in Hubs Hubs-Foundation/hubs#5115. Thanks to @jameskane05 for the Hubs and Spoke code contributions.
This new text component has many more styling options and should be much easier to work with in terms of layout and sizing. All dimensions are in local world units (meters). So a "Font Size" of 1
is 1 meter tall. Similarly a "Max Width" of 1
means words will wrap after 1m. Many of the values support both absolute and % based units (these are text inputs instead of numbers to allow this).
Note that support for the old text component has been dropped (we are pretty confident very few people were using it). If you had old text components in your scene they will automatically be using the new component, but many of the old settings no longer apply or have been changed, so you will need to manually reconfigure them.
There is currently no preview of this in Blender so you will need to preview in Hubs to fully see what your text looks like. A great way to do this is to use the recently added debugLocalScene
query parameter Hubs-Foundation/hubs#5046 to quickly try things out by just dragging a glb file for your scene into Hubs, no upload or publishing required! To play around with these settings a bit more interactively check out https://troika-examples.netlify.app/#text or use the Text element in Spoke (landing soon).
Community Contributions
- Thanks to @rawnsley the Frustrum and Model components and documentation updates
- Thanks to @camelgod for the Hemisphere Light and Simple Water components and fixes to the UV Scroll component
As with each new release of the addon, the only supported version of Blender is the latest (currently 3.0.1). It may work with older versions of Blender but please make sure you are on the latest Blender version before reporting issues.
Match Blender Tone Mapping
This release adds a new tone mapping option to Enviornment Settings called "Blender Filmic". This should match the Filmic tone mapping setting in Blender 1:1 in Hubs (it actually uses a LUT generated from Blender's OpenColorIO profile). The also lays the groundwork for supporting custom LUTs for tonemapping down the road.
Note that Cycles and ThreeJS are quite different renderers so things still wont look exactly the same (one big thing that might cause differences is "Specular" on Principled BSDF not having any effect in Hubs).
This also contains a few bugfixes by community member @rawnsley. Thanks!
- #51 Better handling for legacy components
HDR Maps and Environment Settings
This release adds a number of things that make it possible to vastly improve the visual quality of your Hubs scenes!
HDR Lightmaps
Lightmaps now have the ability to use RGBE .hdr images. This allows much more accurate capture of lighting information. Currently this only works with images already in .hdr format (not .exr) but this should be easy to fix down the road. Note that HDR images must be saved before exporting or things will silently fail to export (this silent failure is currently a limitation in the GLTF exporter). Keep in mind that HDR images will be larger than an equivalently sized SDR image, so make sure to keep your texture resolution in check.
Environment Settings
An "Environment Settings" scene level component has been added to let you configure the environment lighting properties of your scene. For now this means setting a single environment map for the scene, a background color, and optionally a background image as well as configuring tone mapping and exposure. Note that this is a scene component so you have to add it under the Scene properties not Object properties.
The environment map is used both for reflections as well as applying IBL to objects that do not already have a lightmap. It is assumed to be an equirectangular image, and supports both HDR and SDR images, though it is especially useful to use an HDR image for these as the IBL applied to un-lightmapped objects will look much better. For this a lower resolution HDR image is better than higher resolution SDR image for the same memory footprint.
The background image is also assumed to be equirectangular and will be displayed as a "skybox" behind all objects. If no image is specified you will instead see the background color. It is not particularly important for this to be an HDR map since it is not used for lighting (though is effected by exposure and tone mapping). You might instead opt to have a higher resolution HDR image for the same memory footprint. Note that the old "Background" component has been removed, so if you were using it to configure background color you will need to configure it in the Environment Settings component instead. Also note there is currently a bug in the Hubs client that will cause SDR backgrounds to be upside down, this will be fixed in the client and will likely not require updating your assets or the exporter.
You can use a "panoramic" camera in blender to generate an environment map of your actual raytraced scene in Blender. We plan to make this easier to do, but is possible to do manually now. It will also likely eventually be possible to have multiple environment maps.
And More
- Thanks to @rawnsley for adding the missing
Shadow
andSpot Light
components! - #41 A bug where lightmap data was duplicated in the gltf file on export has been fixed. Thanks @rawnsley for the report.
As with each new release of the addon, the only supported version of Blender is the latest (currently 2.93.4) so if you are experiencing any issues, please first make sure you are on this version.
Audio Zones
Audio Zones are 3D volumes that modify the audio properties of audio sources (avatars, videos, audios, audio targets, etc) based on the source's and listener's positions with respect to the audio zone. One obvious application would be to dim audio sources' volumes based on 3D areas like rooms to mimic the real world behavior.
How to add it to a Blender scene
To create an Audio Zone in Blender:
- Add an empty box component
- Change the empty's size to 0.5 (so it has a 1m width)
- Add an audio zone component and set it's parameters
- Resize and place it in your scene
Important note: By default the empty box in Bender has a width of 2m, to align it with the size that we use it in Hubs you'll need to change the empty size to 0.5 so it has a width of 1m.
Audio zones parameters
Audio Zones work based on the audio source and the audio listener's positions and they can be of inOut and/or outIn types.
- inOut: The audio zone's parameters will be applied to audio sources inside the audio zone volume when the listener is outside the zone.
Example: InOut zone that blocks all the audio sources coming from the inside.
- outIn: The audio zone's parameters will be applied to audio sources outside the audio zone volume when the listener is inside.
Example: outIn zone that blocks all the audio sources coming from the outside.
Audio zones can be inside other audio zones, in that case the applied parameters will be a reduction of the most restrictive parameters.
Example: If there are two audio-zones in between the listener and the source and the first one has gain == 0.1 and the other has gain == 0.5, gain == 0.1 is applied to the source.
In world speakers and even more components!
This release adds a bunch of new components: media-frame
, ammo-shape
, skybox
, spawner
, particle-emitter
, audio-target
, zone-audio-source
, and text
Particularly of note are the new "Audio Target" and "Zone Audio Source" components, which allow for creating in world speaker/micrphone setups. Place audio targets on empties where you want "speakers" to be, and point them at an audio source (currently only "Zone Audio Source" exists). The Zone Audio Source will capture the audio from any avatar that enters its radius. It's helpful to put this one on a sphere empty so you can visualize this radius as you scale it.
Also a hat tip to @rawnsley for adding the "Text" component:
Lastly there are some minor bits of UI cleanup to fix some default values and provide more human readable names for component names and properties (Ex: "Media Options" instead of "mediaOptions")
Blender 2.92 fixes & video-texture-source component
This release adds support for the video-texture-source
component and fixes issues exporting material components in Blender 2.92. As with all updates, we will only be supporting the latest version of Blender since this addon integrates heavily with the built in GLTF exporter which changes with each update to Blender.
To use the new video-texture-source
component, add it to a Camera node, then add a video-texture-target
component to a material, selecting the camera as the "source node" in the component properties. At runtime the texture for the material will be replaced with a rendering from the camera, mapped to the entire UV space.
When exporting make sure to "Include > Cameras" in the export settings. The Camera's properties such as FOV and near/far clip will be respected in Hubs. Note that the framing rectangle in Blender is based on the render settings, so if you are trying to get a particular framing, you should set your render resolution to the same as your video-texture-source
texture resolution.
The implementation of this on the Hubs side is still a bit in flux and may change. The camera is currently unable of rendering itself, and currently does not capture your own head.
Incidentally also:
- Added support for nodeRef type in component properties, allowing components to reference other nodes (optionally requiring specific components)
- Added support for specifying a label for component properties, overriding the name displayed in the Blender UI
- Fixed handling of default values for enums
- Fixed exporting of vec4 properties
- Fixed default value for shadowMapResolution on light components
Add video-texture-target and billboard components
Adds the video-texture-target
material component (currently used to braodcast your webcam to your avatar, but may get other uses later) and the billboard
component to have a node always face the users at runtime.
Support for basic lights
Adds support for Directional, Ambient, and Point light components. Typically you would want to add these to an "empty" node.