Jump to content

Text handling Groundplane transparent.


Recommended Posts

Hey Sorry must not be clear, this is the plane I want to make transparent. 

     // used a ground so I can have a X/Y ? Not sure this is right.
     // may be a better way 
     var textMesh1 = BABYLON.Mesh.CreateGround("MJID"+mytext, width, height[2], 2, scene);
     textMesh1.material = MaterialText;
     Setting the visibility to 0 makes the text disappear. 
     textMesh1.visibility = 0;

What I want is the black rectangle to be transparent. 

Link to comment
Share on other sites

You need to create an alpha channel for your texture to make the black area of your texture transparent when rendered on you ground plane. Simply copy your image to a new layer in photoshop, and select the black area in your image (texture), and use the "delete button to delete this color. Then delete the original layer in your image file, and this will result in adding an 8 bit alpha channel that will save if you save in an image format such as .png which I often prefer as it is an efficient compression format. Applying the new .png image back onto your mesh will not display the black area of your image.

If you re already familiar with creating n alpha channel for selective transparency, please ignore the tutorial above, however I hope it might be valuable to those who don't yet have the experience in generating alpha channels.


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.

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.


  • Recently Browsing   0 members

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