Hubs-Foundation / hubs-blender-exporter

The Hubs Blender Add-on enables artists to export their creations to the immersive web with Hubs
Mozilla Public License 2.0
165 stars 50 forks source link

Is it possible to use the MOZ Lightmap GLTF Extension with vanilla threejs? #264

Open kitaedesigns opened 5 months ago

kitaedesigns commented 5 months ago

I'd like to use Lightmaps in Threejs exported from Blender, I know I could do this in Threejs with a separate texture but wondering if I could also just use the MOZ Lightmap GLTF Extension instead. Seems like it has solved a lot of issues with the Lightmaps being washed out, using the second UV channel, attaching the right Lightmap to the right mesh etc.

keianhzo commented 3 months ago

It is if you add the extension to the vanilla ThreeJS glTF loader. See here: https://github.com/mozilla/hubs/blob/bf6ed63453a8ac37bbabc3eb054aa05844b7d41e/src/components/gltf-model-plus.js#L635