Implementing new glTF Extensions for Unreal Engine export

Hi, I’ve used Babylonjs for several projects, I’m also an Unreal Engine 4 developer and have big interest in the ability to export glTF directly from Unreal Engine and use directly in BabylonJS.
There is an open source project that supports this for PlayCanvas (GitHub - ue4plugins/GLTFWebViewer) which has a few extensions that allow enhanced rendering, including extension for lightmaps.

I’m no expert in BabylonJS to understand how to implement these extensions myself. Anyone can shed some light on how to tackle this task? I’m mostly interested in the lightmap extension.

Welcome aboard!

There’s a lightmap extension which is currently opened for glTF but it seems it is frozen for 2 years now.

I think @MackeyK24 could give some feedback about implementing custom lightmaps support in glTF as he did it for the Unity exporter (or I think he did it?).

Yep I make RGBD packed HDR lightmaps in Unity…

I actually offset the mesh uv2 with the lightmap texture atlas info

Then it’s just a matter of assigning the material.lightmapTexure

1 Like

Hi Mackey, can you shine some light on how to develope the glTF extension. As I don’t quite understand how it’s run within BabylonJS to apply lightmaps.

This hopefully helps a bit: Extending the glTF Loader in Babylon.js | by Babylon.js | Medium

2 Likes

@bghgary is da man :slight_smile:

That is where i also started when i made my GLTF Extension for the Babylon Toolkit

1 Like

This did help along with some other resources. I finally managed to make my own extensions. Much appreciated!

1 Like