unicomp21 Posted October 2, 2016 Share Posted October 2, 2016 Has anyone used xnormal mikkt space normal maps and ambient occlusion maps in babylonjs? I'm getting artifacts in babylonjs which aren't visible in the xnormal viewer. It's almost like the normals aren't getting interpolated. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 3, 2016 Share Posted October 3, 2016 Hey How do you use them? through a custom shader? Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted October 4, 2016 Author Share Posted October 4, 2016 No, no customer shader, just using the StandardMaterial. Added a couple screen shots. Polygons are visible in babylon. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 4, 2016 Share Posted October 4, 2016 you need Make a normal Map Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted October 4, 2016 Author Share Posted October 4, 2016 That screenshot is with both the ambient occlusion and normal maps. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted October 4, 2016 Share Posted October 4, 2016 so what is the problem now Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted October 4, 2016 Author Share Posted October 4, 2016 The quads are highly visible in babylon, but not in xnormal viewer. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 4, 2016 Share Posted October 4, 2016 Where do you set the ambiant occlusion (As we do not support it in the standard shader :)) Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted October 4, 2016 Author Share Posted October 4, 2016 Here's my code, it all seems to work, but chunky looking in the bump texture. Again, looks good in xnormal viewer, but not in babylonjs. var material = new BABYLON.StandardMaterial("material1", scene); var ext = ".png"; material.bumpTexture = new BABYLON.Texture("geometry/meta_balls_normals" + ext, scene); material.ambientTexture = new BABYLON.Texture("geometry/meta_balls_occlusion" + ext, scene); //material.diffuseTexture = new BABYLON.Texture("geometry/metaballs_vcols" + ext, scene); mesh_root.material = material; Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted October 4, 2016 Author Share Posted October 4, 2016 btw, commenting out the bumpTexture, I can see the ambient texture. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 5, 2016 Share Posted October 5, 2016 the bump texture as to be a normal map like this: https://github.com/BabylonJS/Samples/blob/master/Assets/normalMap.jpg Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted October 8, 2016 Author Share Posted October 8, 2016 The normal map indicated above appears to be mikkt space, ie same as Blender, which is the same format I'm exporting from xnormal. Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted October 8, 2016 Author Share Posted October 8, 2016 attached and my bump and ambient occlusion maps Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted October 8, 2016 Author Share Posted October 8, 2016 and here is the low poly model ... meta_balls_lowpoly_quad.obj Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 10, 2016 Share Posted October 10, 2016 Sure but this does not help a lot Can you create a repo on the Playground? (But basically, this should work if UV are exported correctly) Quote Link to comment Share on other sites More sharing options...
unicomp21 Posted October 11, 2016 Author Share Posted October 11, 2016 Ok, will do. 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.