You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OBJ files have their colors defined in sRGB space.
Is this always true? If I export a glTF from blender it keeps the base color in linear space. I could see there being discrepancies across software though. Maybe it should be an option?
GLTF specifies that all colors in gltf json should be represented in linear space.
OBJ files have their colors defined in sRGB space.
obj2gltf
now takes colors directly from OBJ and puts them in GLTF, but there should be conversion from sRGB to linear rgb colorspace.Note that colors in textures are sRGB both in obj and gltf, only base color (diffuse) and emissive colors should be converted.
See this linked issue in Blender: https://projects.blender.org/blender/blender-addons/issues/102905#issuecomment-11438
and the corresponding discussion in gltf spec repository: KhronosGroup/glTF#1609 (comment)
The corresponding locations in code where the change should be made:
obj2gltf/lib/loadMtl.js
Lines 139 to 144 in ce0c36e
obj2gltf/lib/loadMtl.js
Lines 131 to 136 in ce0c36e
EDIT:
Let me also link Bevy engine PR that also fixed this: bevyengine/bevy#6828
The text was updated successfully, but these errors were encountered: