UeliUeli Posted October 29, 2018 Share Posted October 29, 2018 Hi there I'm a newby in babylonjs and i'm trying to build a content viewer for 3d models adjusted to my needs. Now: Is there a method to disable backface culling for all meshes of a scene? I have tried it with scene.meshes, but i does not work: BABYLON.SceneLoader.loggingLevel = BABYLON.SceneLoader.DETAILED_LOGGING; BABYLON.SceneLoader.Append("../../", "...", scene, function (scene) { scene.meshes.backFaceCulling = false; for(var i=0; i<scene.meshes.length; i++) scene.meshes.checkCollisions=true; ... Help is much appreciated, Thanks! Ps: Additional question: Would it be possible to give all the backsides of the meshes one color? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 29, 2018 Share Posted October 29, 2018 Hello and welcome! you can this: scene.onNewMaterialAddedObservable.add(function(mat) { mat.backFaceCulling = false; }); Regarding coloring backside: This is not directly possible unless you create a second mesh for the backfaces Quote Link to comment Share on other sites More sharing options...
UeliUeli Posted October 29, 2018 Author Share Posted October 29, 2018 Thanks Deltakosh! I put it just before the sceneLoader & it worked fine GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 30, 2018 Share Posted October 30, 2018 Flagging as solved then 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.