Description
openedon Nov 23, 2021
Describe the bug
A clear and concise description of what the bug is.
When building my own 3d viewer in open3d which uses filament for rendering i observed that setting indirect lighting by loading *_ibl.ktx file faild with inability to load spherical harmonics from *_ibl.ktx file. The file contains proper 3 x 9 table for spherical harmonics.
After investigation i figured that the reason for this locals sensitivity is the std::strtof
function used on line ilament/libs/image/src/KtxBundle.cpp:298
of current master branch to parse the spherical harmonics list. See also std::strtof reference.
To Reproduce
Steps to reproduce the behavior:
-
set system locals to for example
de_DE
orde_UTF8
-
run your program which uses indirect lighting only
-
surfaces will be black only
-
Open editor (eg vi/vim)
-
replace all
.
in spherical harmonics list (keysh
) with,
-
rerun demo
-
Surface colors will be back
Expected behavior
A clear and concise description of what you expected to happen.
That KtxBundle::getSphericalHarmonics
returns valid spherical harmonics list independent of which locals are set on the system filament or filament based library is used.
Screenshots
If applicable, add screenshots to help explain your problem.
std::strtof
failing on eg.: German locale
with ,
as decimal separator eg: in German locale
Logs
If applicable, copy logs from your console here. Please do not
use screenshots of logs, copy them as text.
Desktop (please complete the following information):
- OS: [e.g. iOS] Mint 20 i386
- GPU: [e.g. NVIDIA GTX 1080] irrelevant
- Backend: [OpenGL/Vulkan] guess opengl through intel/open3d python wheel
Smartphone (please complete the following information):
- Device: [e.g. Pixel 2]
- OS: [e.g. Android Pie 9.0]
Additional context
Add any other context about the problem here.