-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lights #21
Comments
Thanks! We are not yet using the plugin at WonderMedia, so it's nice to see people testing it out already 👍 The GLTF 2.0 spec doesn't have lights unfortunately, and we don't directly need this at WonderMedia, we only use GLTF for exporting meshes. That being said, a draft extension for lights does exist, KHR_Lights. @donmccurdy Do you think the |
The draft |
@donmccurdy Thanks for fast reply! @samubiquity6 So the extension for supporting lights is rather stable, however looking at the conversation, animated lights are not yet ready in the spec. Also Maya2glTF is using the GLTF library from COLLADA2GLTF, so I must first check if that library supports the |
Thanks for looking into this! Blender has an experimental export for the KHR_lights which I think will be my work around for now. But not having to move the asset through Blender would be awesome. |
So I guess you animate the lights in code then? So you only need static light export? |
Yea we will be animating lights in code. Static would be fantastic =) |
+1 for the light support :) |
PR always welcome :) |
eheh indeed! I don't have Maya and I am asking for a friend, but if I can help with stuff that is in my area of expertise I'd be glad to do so. (I wrote Cauldron, a VK and DX12 GLTF 2.0 visualizer) |
Wow Cauldron looks impressive! The problem with exporting lights is that GLTF 2.0 doesn't define a standard for that yet. So we would have to pick an extension. The most obvious one - KHR lights - doesn't seem to support animation, which imho is important to have. So the first thing to consider is what extensions will need to be supported. Because writing the code for exporting the lights and animations itself is very easy to do; we already export cameras, so supporting lights is very similar... |
While it doesn't support animation, that's sort of an independent issue, and would probably be fixed with an advanced animation extension (like KhronosGroup/glTF#1301 (DRAFT)), rather than a brand new lights extension. |
Thanks Ziriax! The status of the This extension does support animation of the position and the target (for spots), but the color and other attributes are fixed, so yeah it is very similar to a camera. |
Thanks for all the feedback! It seems the GLTF module from the COLLADA2GLTF project has no support for this extension yet, so the first thing needed is to add this to our customized fork at https://github.com/Ziriax/COLLADA2GLTF As soon as that is completed, exporting lights would be a trivial task |
I know how to do this, but I think we should first migrate to the official version of collada2gltf. |
Lights are able to be specified in GLTF files using the KHR_lights_punctual extension. Additionally, with the glTF Object Model and the KHR_animation_pointer extension, it is possible to animate lights too. For example, an animation can have the target set to this to animate the color of light 0: "target": {
"path": "pointer",
"extensions": {
"KHR_animation_pointer": {
"pointer": "/extensions/KHR_lights_punctual/lights/0/color"
}
}
} |
Hey guys. Thanks for your hard work! Using your fantastic plug-in for work now, I was wondering if lights could be added. I need to animate flickering lights for a scene and have to do some weird export workarounds to get lights working.
The text was updated successfully, but these errors were encountered: