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
EXT_lights_ies #2200
EXT_lights_ies #2200
Conversation
With regards to the topic of storage, i.e., external/embedded ANSI/IES LM-63 data vs JSON-inlined parameters, I think we need to consider the following two issues. ANSI/IES LM-63 LifecycleThe extension spec currently does not require any specific revision of ANSI/IES LM-63. This is quite an important detail since ANSI/IES LM-63 files contain the version string inside. Supporting all 5 versions is probably not feasible while supporting only the latest would make lots of readily available ANSI/IES LM-63 files incompatible with this extension. The reasonable middle-ground may be supporting both 2019 and 2002 version strings while explicitly excluding external tilt files from the latter. It's worth noting though that the latest (2019) revision says the following:
We don't have a precedent of making and ratifying a new glTF extension that exclusively relies on a soon-to-be-deprecated external specification. ANSI/IES LM-63 ScopeWith external tilt files out of the way, there are still lots of ANSI/IES LM-63 fields that may or may not be relevant for glTF use. Normatively referencing an external spec generally means that implementations have to follow it even if some of its parts are not needed for glTF applications in practice. For example, ANSI/IES LM-63 data must always contain four required keywords ( We should identify all glTF-relevant ANSI/IES LM-63 fields and keywords and evaluate whether providing them directly in JSON makes the new functionality more accessible for implementors. Alternatively, we should evaluate availability of open-source ANSI/IES LM-63 parser implementations, including test coverage for malformed inputs. @tblutNV please comment on the applicability of the fields marked with
|
lexaknyazev W.r.t. to the IES fields, we ignore in fact all fields in the meta data, the TILT section, number of lamps, lumen per lamp, units type, width, length, height, and input watts. We respect the ballast factor (it is multiplied on top of the candela multiplier). This should cover the questionmarks in the table. A good observation is indeed that the IES standard does not include previous versions, most notably seen with the magic header. We would actually want to support all versions: IESNA91, IESNA:LM-63-1995, IESNA:LM-63-2002, IES:LM-63-2019. |
More comments regarding a JSON encoding instead of referencing the IES file. One could think of removing the photometric type altogether. They are basically just different orientations. In fact, we don't support type A, which is very rare (and can be converted to Type C in a suitable tool). One could also think of reducing or eliminating the symmetry groups, basically unrolling the data to the full sphere (simplifying the use of the data at the cost of more storage). That can work from out perspective. However, resampling to a different, e.g., equidistant set of angles would not be a good idea. A renderer will do that typically too, so we get two re-samplings that do not know of each other, and it can harm the original data in ways that would make it not possible for us anymore to rely on the new encoding alone. |
IIRC, there was also a 1986 version that did not have a version identifier inside at all. Supporting all of them would complicate implementations as there were a few breaking changes over time. How would the extension normatively reference older revisions? Looks like they are not offered in the IES store. |
Hello! A quick curious question on a minor detail: What's the reasoning behind introducing At first glance it seems a bit redundant, when reading the following in the overview (am I missing something?):
|
Indeed, we should adjust the wording in the description. We propose the additional orientation on the lightprofile since you want to orient it independently of the lumiere, there are for example ill oriented light profiles out there that you want to align. |
If there are ill-oriented light profiles out there, shouldn't that be solved in the data itself? Seems strange that glTF should handle bad external files (regardless if it's a light profile, texture, or raw binary). Unreal also supports IES but doesn't provide additional orientation (our philosophy is "garbage in, garbage out"). |
I have begun a draft PR for the file-format independent json representation here #2221 |
…standards and how the coordinate system relate
I updated the extension name from KHR_lights_ies to EXT_lights_ies. The commits also include some minor additions, clarifications and implementation details based on the feedback we received. |
…made description of the coordinate system mapping more specific
extensions/2.0/Vendor/EXT_lights_ies/schema/lightProfile.schema.json
Outdated
Show resolved
Hide resolved
Sorry for necro posting, but I am wondering if there are any demo assets available ? I am evaluating whether to implement the extension as I love the intent and it would be great to have samples I could rely on for the tests. |
This extension adds support for referencing and storing IES light profiles and using them as point lights. IES light profile files are used as-is, similar to how PNG and JPEG images are used.
There are still some open questions regarding a valid MIME type for IES light profiles and if any additional properties are required to cover the needs of most users.
We don't want to force applications to fully support
KHR_lights_punctual
in order to implement this extension. Therefore, we choose to not extendKHR_lights_punctual
, but rather make this a standalone extension. However, we are open for discussing the possibility to make extending punctual lights optional. The main benefit would be that spot lights could be enhanced with light profiles as well.An addition here could be the
useProfileIntensity
property to allow to either use the light profile's intensity or the punctual light's intensity.In the case of using the punctual light's intensity the light profile's candela values must be scaled to the [0, 1] range:
candelaValues /= max(candelaValues)
. These values can then be multiplied by the light'sintensity
andcolor
.Alternative Proposal for Storing IES Data
Based on the discussion and feedback received in the PBR TSG meeting on 8/29/2022, an alternative proposal is to store the relevant parts of the IES files directly in JSON. Metadata can be stored in the
extras
property with the keys being the field names as defined in the IES format specification in glTF-like camel case.We omitted the TILT data as we don't believe that it is relevant for most rendering applications.
We're looking forward to further discussions!