-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
direction property missing in KHR Material Common/KHR lights spec. tables #1063
Comments
personally, I don't think the material_common definition should include anything about lights. |
I agree. I think I saw somewhere a separate KHR-lights extension for 2.0 (?). There may still be a need for an addendum for v.1.0 users since the draft here became the defacto standard. But there may be no appetite to put any effort into improving 1.0. In this case, this issue may become a reference and I propose |
#945 describes a new KHR-lights extension. Incidentally, https://github.com/UX3D-nopper/glTF/tree/master_lights_blinnphong/extensions/Khronos/KHR_lights#light-types table 1 also misses the direction property which is referred to in https://github.com/UX3D-nopper/glTF/tree/master_lights_blinnphong/extensions/Khronos/KHR_lights#directional |
Yes, #945 is the best reference for |
Ok, very helpful. That is a definite statement and needs to be explicit since currently the spec. does define an extra property, and I would have expected -Z as the base direction. |
Oh, hah, well I could also be wrong... My implementation uses |
It is -z, as stated here (see GL_POSITION section): https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glLight.xml |
Is this now duplicate with #945? |
Yes, let me close this. I think this is resolved as -z plus transform. |
##This is a late note for the glTF 1.0 KHR Material Common extension spec. draft.
https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_materials_common#directional
mentions a
direction
property as being described in table 2.However, table 2 (https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_materials_common#common-light-shared-properties) does not include such a property.
The direction is presumably the constant (unit) vector along which the light wave front propagates (imagening an infinitely distant light source).
Rather than a 3d vector, the direction could also be described as a rotation/quaternion of an initial (default) direction (often 0,0,-1). This may mean that the direction is superfluous as it could be defined as 0,0,-1 and then the light be rotated by an associated transform if necessary. (Perhaps this is the reason why direction was not specified in table 2??).
#947 has discussion on the glTF 2.0 version of the extension which presumably will include a similar table.
If there is interest, I could prepare a quick PR for table 2 as a starting point until 2.0 is fully established.
The text was updated successfully, but these errors were encountered: