KhronosGroup / KhronosGroup/glTF-Validator
Warn on redundant property values
- Dominant language
- Dart
- Stars
- 470
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
Some properties of the material extensions can make the whole extension useless when set to zero. For example:
- `KHR_materials_clearcoat`
- `clearcoatFactor` disables the extension.
- `clearcoatRoughnessFactor` disables the associated texture.
- `KHR_materials_sheen`
- `sheenColorFactor` disables the extension.
- `sheenRoughnessFactor` disables the associated texture.
- `KHR_materials_transmission`
- `transmissionFactor` disables the extension.
- `KHR_materials_volume`
- `thicknessFactor` disables the extension.
Note that the same applies to the base spec's `emissiveFactor` that has to have a non-default value for the emissive texture to have any effect.
On top of that, there's no need to include, e.g., an IOR extension with a value of `1.5` as it wouldn't change the material appearance but may reduce asset portability. We could go even further and flag _all_ glTF properties that have schema-default values.
This approach may get slightly outdated with the upcoming animation pointer extension.
@emackey @javagl @bghgary WDYT?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the material-extension cases listed in the issue, including clearcoat, sheen, transmission, volume, emissiveFactor, and IOR. Determine whether warnings should cover only these redundant values or all schema-default properties, and account for the noted animation pointer extension concern. Done means the warning scope and behavior are defined and validated in the glTF Validator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100