djeustice Posted April 24, 2018 Share Posted April 24, 2018 Good afternoon. Today I was given a glb of an engine part. The artist added a cutout texture to the model. When I load it into my BJS scene, the engine has a transparent/ghost-like appearance. I thought adding backfaceCulling = false and hasAlpha = true would solve this but no luck. Here's my code below: var myEngine = BABYLON.SceneLoader.ImportMesh("", "models/", "2.glb", scene, function (newMeshes) { myEngine = newMeshes[0]; myEngine.material.backFaceCulling = false; myEngine.material.hasAlpha = true; }); Do I have to create a new material and add it to the glb like in this playground? http://www.babylonjs-playground.com/#YDO1F#18 Here is an image of the engine: Thanks, Dave Quote Link to comment Share on other sites More sharing options...
Sebavan Posted April 24, 2018 Share Posted April 24, 2018 Ping @bghgary Quote Link to comment Share on other sites More sharing options...
bghgary Posted April 24, 2018 Share Posted April 24, 2018 @djeustice Can you share the model? It's hard to debug the issue without it. If you can't share the model, can you share what tool is being used to export the glb? Quote Link to comment Share on other sites More sharing options...
djeustice Posted April 25, 2018 Author Share Posted April 25, 2018 Good morning and thanks for the reply! I uploaded the glb here: https://github.com/djeustice/engine-gltf The model was created in Modo. Thanks again! Dave Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted April 25, 2018 Share Posted April 25, 2018 When I load the model into BJS sandbox, and checking needDepthPrePass, it seems get rid of alpha issue. Quote Link to comment Share on other sites More sharing options...
djeustice Posted April 25, 2018 Author Share Posted April 25, 2018 Gasp, that worked! Thank you very much for your help! -Dave 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.