This is the current (july 2018) GLTF status.
Test case: the same skinned mesh exported from 3DS Max 2018.
Standard material: Diffuse + Specular + Normal
-
SEA3D exporter + SEA3D importer:
http://necromanthus.com/Test/html5/Lara.html
SEA file size: 658 KB
Result: close to perfect -
Babylon3D GLTF exporter + GLTF importer:
http://necromanthus.com/Test/html5/Lara_gltf.html
GLB file size: 1,850 KB
Result: messed up materials
I’ve also tested the FBX2GLTF utility (by Facebook): the same wrong results
Important note: there is nothing wrong with THREE.js and PBR materials:
http://necromanthus.com/Test/html5/Lara_PBR.html
In any case, PBR was a bad choice for GLTF and also, all the current converters are collection of bugs.
In that case, I still don’t consider this to be a complete or actionable bug report and I continue to vote to close this issue.
Being able to author a PBR model in Substance Painter or download one from Sketchfab, and have the model appear as the artist designed it, is good for three.js users. I don’t think there’s any definition of “best result” where that sort of consistency can be dismissed.
This isn’t reinventing any wheels, and it isn’t a design flaw. PBR calculations are done in linear space, with every engine I’m aware of. If you pass sRGB data into the renderer and pretend it’s linear, the lighting and blending math will come out wrong. The difference is not huge, and so this not a major concern for many three.js users, but nevertheless it is not as good as it could be. For that reason, your “good” result example is not actually correct. But as you’ve said before, backward-compatibility is important, so I’m not here to advocate for changing any three.js defaults. But because glTF is a new format, and because we’re trying to get PBR right, we’re going to mark sRGB textures as sRGB, even if other loaders are not doing so.
See this article about Unreal —
This is precisely what we are doing.
Yes, the problem is the same for Phong materials or PBR materials loaded in any other format.
If we had a time machine, yes, the other loaders should also be marking sRGB textures containing color data as sRGB. But making the change now would cause confusion and break backward-compatibility, and the
gammaOutput=true
setting needed to fix output is not intuitive — I don’t think changing other loaders can be justified given those issues.Let’s keep an eye on #11337. I hope the resolution there will make color workflows more intuitive. With that and NodeMaterial, there may be opportunities to fix some existing issues without breaking anyone’s existing applications.
I’ve addressed each of those points in #14419 (comment) — we will not be removing the sRGB encoding assignment to sRGB textures in GLTFLoader. If you would like to override that, it is easy to change the texture encoding after loading the model.
If there are no other actions to take here, this issue should be closed.
Wow, I never say that before. And apparently I “own” the😍 😆
FBXLoader
I’m the one who was doing this. As collaborators we have to moderate issues and ensure correct language and behavior.