bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Import Lights from GLTF

Open inodentry opened this issue 4 years ago • 2 comments

Currently, the GLTF loader loads meshes, textures, materials, scenes ... but it does not load lights.

Why that limitation? Can we load lights from GLTF?

inodentry avatar Jan 27 '21 13:01 inodentry

Loading lights from a GLTF requires the KHR_lights extension. See this Issue for further information. That means it is not in the standard spec for GLTF 2.0.

The gltf crate does however support at least the KHR_lights_punctual extension, so I guess support for punctual lights could be added pretty effortlessly. However I do not know, why it has not been done yet.

Apart form that, it seems to me, that because of this answer, that only punctual, directional and spot lights can be included and no ambient lights. Since bevy does not support directional or spot lights (correct me if I am wrong) the only supported light type would be punctual lights.

FrankenApps avatar Jan 27 '21 14:01 FrankenApps

This seems to at least be partially resolved as of #4715. Are we still missing anything for this issue?

james7132 avatar Nov 12 '22 15:11 james7132

Bevy has supported Directional, Point, and Spot lights for some time now, and looking through the bevy_gltf code right now I see that they are all being loaded. It seems like it should all be resolved.

Closing this issue.

inodentry avatar Jan 10 '23 10:01 inodentry