Closed emackey closed 2 years ago
@rawnsley do you have a sample file I could use to test this out? If not I can hack something up quickly enough.
Thanks for looking into this @najadojo. This GLB file is a complete Hubs scene file with a mix of extensions as described in the original issue. You can see the scene itself live here: https://hubs.mozilla.com/scenes/HQLCKaM/gltf-test-scene
@rawnsley and @emackey I've merged a change and published the npm package that addresses this. Here is a section of the sample gltf after conversion:
{
"images": [
{
"name": "skybox",
"uri": "hubs-scene-sample-dw0.1.0_img0.png"
},
{
"name": "envmap-category",
"mimeType": "image/vnd.radiance",
"uri": "hubs-scene-sample-dw0.1.0_img1.bin"
},
{
"name": "lightmap",
"mimeType": "image/vnd.radiance",
"uri": "hubs-scene-sample-dw0.1.0_img2.bin"
},
{
"name": "WoodFloor040_4K_Color",
"uri": "hubs-scene-sample-dw0.1.0_img3.ktx2"
}
],
"buffers": [
{
"uri": "hubs-scene-sample-dw0.1.0_data.bin",
"byteLength": 33384
}
]
}
Wow that was fast, thanks!
🤯
Hi @najadojo, hope you're doing well! Here's a suggestion from @rawnsley and Mozilla Hubs.
During GLB to GLTF conversion, it might be good to preserve the
mimeType
field, at least for types that are unknown to theguessFileExtension
function. This would enable RGBE environment maps that Hubs has an extension for. Even if these files got a.bin
extension, they would have a MIME type applied.via https://github.com/AnalyticalGraphicsInc/gltf-vscode/issues/243