Closed Tugcga closed 7 months ago
Good find!
So we need to list light ids in extensions.KHR_lights_punctual
of node
.
Probably we simply forget to serialize light ids to extensions.KHR_lights_punctual
of node
. PR is much appreciated!
I screwed up the issue number in the commit message. This has been fixed by https://github.com/syoyo/tinygltf/pull/463
Thank you @ptc-tgamper, close this issue as resolved.
Describe the issue
When create GLTF file for the scene with lights, actual reference to the light does not assigned to the node.
To Reproduce
Minimal example with wrong output:
As a result it produce the following
output.gltf
:Expected behaviour
The node with the name
light_node
should containsPossible solution
In the
static void SerializeGltfNode(const Node &node, detail::json &o)
function find theKHR_lights_punctual
section in the json by usingdetail::FindMember(extensions, "KHR_lights_punctual", it);
instead ofdetail::FindMember(o, "KHR_lights_punctual", it);