Jump to content

alpha = 0 not fully transparent


Recommended Posts


Can you reproduce it in the playground? I just tested it and they are not visible in my test playground http://www.babylonjs-playground.com/#600LYK#1

If you can't reproduce it and need a workaround. You can set the meshes opacity visibility instead of the materials alpha, maybe that works as expected, ultimately you could set the meshs layermask to zero if it's materials alpha is zero. But those are of course options on a per mesh basis and not per material which may be a problem in your project :(

I'll try my best to find the problem if you can reproduce it in the playground. ;)

Link to comment
Share on other sites

reflectivity yes:

var baseMaterial = new BABYLON.PBRMaterial("baseMaterial", scene);

    baseMaterial.reflectionTexture = hdrTexture;
    baseMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.CUBIC_MODE;
    baseMaterial.directIntensity = 1.8;
    baseMaterial.specularIntensity = 1;
    baseMaterial.environmentIntensity = 0.2;
    baseMaterial.cameraExposure = 1.4;
    baseMaterial.cameraContrast = 0.95;
    baseMaterial.microSurface = 0.27;
    baseMaterial.reflectivityColor = new BABYLON.Color3(0.2, 0.2, 0.2);
    baseMaterial.emissiveColor = new BABYLON.Color3(0.1, 0.1, 0.1);
    baseMaterial.useRadianceOverAlpha = false;

I'll use visibility instead of alpha then :)

Link to comment
Share on other sites

Basically, in real life, highlights can be seen on top of transparent surface preventing to see through like your computer screen reflected on your window shield by night or car shield reflecting sun...

Trying to emulate that, we by default in the material force displaying highlighted part of transparent surfaces (automatically increasing opacity in front of the luminance of the highlights either radiance from environment or specular from scene lights). 

You can disable this by setting those both parameters in the material (they are true by default):

useRadianceOverAlpha = false  and 
useSpecularOverAlpha = false
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...