unicomp21 Posted December 3, 2017 Share Posted December 3, 2017 Implementation note: When tangents are not specified, client implementations should calculate tangents using default MikkTSpace algorithms. For best results, the mesh triangles should also be processed using default MikkTSpace algorithms. https://github.com/KhronosGroup/glTF/tree/master/specification/2.0 Sorry for beating a dead horse on this one. If babylonjs supports gltf, then it must also support the mikkt encoding, right? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted December 3, 2017 Share Posted December 3, 2017 ping @bghgary Quote Link to comment Share on other sites More sharing options...
bghgary Posted December 3, 2017 Share Posted December 3, 2017 Yes, but I'm not sure what the performance impact is. BabylonJS currently generates tangents using http://www.thetenthplanet.de/archives/1180 (see cotangent_frame in https://github.com/BabylonJS/Babylon.js/blob/master/src/Shaders/ShadersInclude/bumpFragmentFunctions.fx). Generating MikkTSpace tangents will require doing it during load, which might or might not be worth it. But it is something that we should try at some point. For now, the best way to get MikkTSpace is to specify tangents/normals/meshes generated with the MikkTSpace algorithms in the glTF file. Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted December 4, 2017 Author Share Posted December 4, 2017 thanks @bghgary! So in the case of gltf, I guess a different set of shaders are being invoked? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted December 4, 2017 Share Posted December 4, 2017 Nope same one is in use but either uses the normal or generate them in BJS space. rhis is under #define in the shader. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.