Blender 2.8 exported PBR opacity issues


I’m having an issue with a model exported from Blender 2.8.

Essentially, I’m changing the mesh’s alpha based on distance from camera. This worked as expected with standard materials and Blender 2.7.

However, when I export the model from 2.8, the texture, not the mesh is changing the alpha! The model stays opaque.

This is the code snippet:

this.matHull = scene.getMeshByName("hull").material;
this.matHull.alpha = alpha; // alpha is based on distance to camera

What am I doing wrong?

This illustrates the issue I’m having (the first one - OK, the second one - texture washed-out, but opaque):


@JCPalmer will definitely be the man to contact about the Blender exporter.

Did you try with this.matHull.transparencyMode = BABYLON.PBRMaterial.PBRMATERIAL_ALPHABLEND? (default is PBRMATERIAL_OPAQUE)


Off the top my head, 2.79 did not have pbr in the exporter. First, what happens if you export as a standard material in 2.80? Were you always using cycles nodes, or have you just changed to? What does the nodes of the material in question, look like?


Thanks @Vinc3r, this worked!

@JCPalmer, in 2.79 I used Blender render, not cycles. A quick question for you: I see in Babylon 6.2.1 exporter there is PBR Transparency setting. I tried setting it to Alpha Blend, yet nothing happens, the material stays opaque. Does this feature not work and the transparency mode needs to be set programmatically?


1 Like

Also, that is settable from the exporter custom properties on the materials tab to save having to code that.

1 Like