I am loading glTF asset using the plugin GitHub - rdeioris/glTFRuntime: Unreal Engine Plugin for loading glTF files at runtime built from source.
This plugin loads all the mesh related data along with textures but doesn’t load the light data and spawn light actors. For instance, my glTF asset file has the following light information (details unrelated to light have been omitted for the sake of brevity)
....
"extensionsUsed" : [
"KHR_lights_punctual"
],
"extensionsRequired" : [
"KHR_lights_punctual"
],
"extensions" : {
"KHR_lights_punctual" : {
"lights" : [
{
"color" : [
1,
1,
1
],
"intensity" : 2,
"type" : "directional",
"name" : "Sun"
}
]
}
},
.....
"nodes" : [
{
"extensions" : {
"KHR_lights_punctual" : {
"light" : 0
}
},
"name" : "Light.001",
"rotation" : [
-0.06866759806871414,
0.6244996190071106,
0.6112562417984009,
0.4813012182712555
],
"translation" : [
8.240747451782227,
7.7318830490112305,
2.081692695617676
]
}
]
....
This plugin doesn’t spawn a direction light. I did notice some code referencing punctual lights in the Engine Plugin folder as part of the file ExtensionsHandler.cpp.
How can I ensure that lights are spawned for the gltf file? Is there a plugin or do I need to write my own parsing and light spawning code?
Thanks