Jump to content

how to make part of the ground transparent


Biz
 Share

Recommended Posts

Hello,

I am trying to figure out how to make part of my ground transparent.  I create the ground from a height map and then apply a bitmap texture to it.

 

var seisMaterial = new BABYLON.StandardMaterial("seismic", scene);
                            seisMaterial.diffuseTexture = new BABYLON.Texture(urlColor, scene);
                            seisMaterial.diffuseTexture.hasAlpha = true;
                            seisMaterial.backFaceCulling = false;

                            var ground = BABYLON.Mesh.CreateGroundFromHeightMap("ground", fauxFile, 106, 121, 100, 0, 10, scene, false);
                            //seisMaterial.emissiveColor = BABYLON.Color3.Blue();
                            //seisMaterial.wireframe = true;
                            ground.material = seisMaterial;

 

getting the image below.  I want the white area around the black blob to be transparent.  The bitmap I used to create the texture has the alpha component set to 0.  Is there a setting I am missing?

seisGround.PNG

Link to comment
Share on other sites

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...