KhronosGroup / KhronosGroup/glTF
`KHR_materials_volume`: clarify that the calculation of the attenuation coefficient uses a natural logarithm
- Dominant language
- HTML
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 5
Description
From https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_volume#attenuation:
>The infinite range of the coefficient makes it rather unintuitive to control by users. To provide a convenient parameterization, this extension exposes two derived parameters: attenuation color c and attenuation distance d (see [Properties](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_volume#Properties)). The relation between the two parameters and the attenuation coefficient σt is defined as
>
>σt = -log(c) / d
I was just reading over these docs and had to double-check with the glTF Sample Viewer code and my own previous implementation that this coefficient uses a natural (base-e) log and not a base-10 log. It'd be great to clarify this as https://en.wikipedia.org/wiki/Attenuation_coefficient is not helpful in this regard.
Contributor guide
Research direction
Open the KHR_materials_volume extension's Attenuation section at the linked documentation page and review the equation for σt. Confirm the intended logarithm from the cited Sample Viewer implementation, then clarify in the documentation that log denotes the natural logarithm; done means readers no longer need to infer the logarithm base.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 60/100