testing glTF lightmaps
- https://engine.needle.tools/docs/export.html#exporting-lightmaps
- https://github.com/needle-tools/needle-engine-support/blob/main/documentation/technical-overview.md#needle_lightmaps
This is a root extension defining a set of lightmaps for the glTF file.
"NEEDLE_lightmaps": {
"textures": [
{
"pointer": "textures/20",
"type": 1,
"index": 0
}
]
}
Note: At the moment this extension also contains environment texture references. We're planning to change that in a future release.
Texture Type | Value |
---|---|
Lightmap | 0 |
Environment Map | 1 |
Reflection Map | 2 |
How lightmaps are applied is defined in the MeshRenderer
component inside the NEEDLE_components
extension per node:
"NEEDLE_components": {
"builtin_components": [
{
"name": "MeshRenderer",
...
"lightmapIndex": 0,
"lightmapScaleOffset": {
"x": 1.00579774,
"y": 1.00579774,
"z": -0.00392889744,
"w": -0.00392889744
},
...
}
]
}
Note: We may change that in a future release and move lightmap-related data to a
NEEDLE_lightmap
extension entry per node.
How it looks with Needle Engine (threejs)
How it looks in gltf-viewer
How it looks in hyperfy.io