Jump to content

Alpha/Cutout Texture Question [SOLVED]


djeustice
 Share

Recommended Posts

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:

engine.thumb.png.43a716ec611b11e49968937296a53c74.png

Thanks,

Dave

Link to comment
Share on other sites

  • djeustice changed the title to Alpha/Cutout Texture Question [SOLVED]

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...