aarroyoc Posted January 10, 2017 Share Posted January 10, 2017 Hi, I've trying to rotate some grounds generated with the BABYLON.Mesh.CreateGround function. I want to simulate a flip deck but when it rotates it doesn't show anything. Later, searching on the docs I've found the sideOrientation option. It didn't work. Furthermore, I've tried disabling backFaceCulling but lightning doesn't work as expected, it goes black but it's better than nothing. I'm thinking that maybe, the ground mesh doesn't support the sideOrientation feature but it would be strange. var floorMesh = BABYLON.Mesh.CreateGround(roomName + "_floor", 1, 1, 1, scene, true); floorMesh.sideOrientation = BABYLON.Mesh.DOUBLESIDE; var floorMat = new BABYLON.StandardMaterial(roomName + "_floor_mat", scene); floorMat.sideOrientation = BABYLON.Mesh.DOUBLESIDE; floorMat.backFaceCulling = false; floorMat.diffuseTexture = this.floor(); floorMesh.material = floorMat; Is there a way to create a ground that has double side? Or do I need to create a fake ground using a box mesh? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 10, 2017 Share Posted January 10, 2017 Hello the problem is that your mesh has normals And normals are used to compute lighting. If you rotate your mesh you may want to move the light as well. Or use emissiveColor to avoid using dynamic lighting Quote Link to comment Share on other sites More sharing options...
jerome Posted January 10, 2017 Share Posted January 10, 2017 About the mesh side orientation (not the material one), it's not a property, but only a parameter passed at mesh geometry construction time, in the constructor call : CreateGround() This parameter is used to design the internal geometry. The geometry can't be modified once created so floorMesh.sideOrientation = BABYLON.Mesh.DOUBLESIDE; has stricly no effect. http://doc.babylonjs.com/tutorials/Mesh_CreateXXX_Methods_With_Options_Parameter#ground Quote Link to comment Share on other sites More sharing options...
aarroyoc Posted January 10, 2017 Author Share Posted January 10, 2017 Thanks! The idea of putting another light works enough for my purpouses but I don't know if would work well if I want to have two textures in the same ground (one on each side). 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.