Jump to content

can we set alpha value on a texture with alpha ?


jerome
 Share

Recommended Posts

Hi,

 

Say I have a mesh with a material and this material is textured with an image.

I can obviously set the material.alpha property in order to make my mesh transparent.

mesh.material.alpha = 0.6;

Now, if the image used for the texture has an alpha channel and I want to apply it on the mesh, I can set it with : 

mesh.material.alpha = 1.0;mesh.material.diffuseTexture.hasAlpha = true;

This will let transparent all the parts of the image with related alpha values.

 

I'm just wondering if we could add/combine an extra alpha value to set the alpha of non-transparent parts of the image (as we do with material.alpha = val; ). Well, this would affect all the image pixels of course but the result would just be visible on parts non yet transparent.

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