# Did anyone sucessfuly export mesh with Alpha Texture from Blender 2.8?

**URL:** <https://forum.babylonjs.com/t/did-anyone-sucessfuly-export-mesh-with-alpha-texture-from-blender-2-8/6337>\
**Category:** Questions\
**Tags:** blender\
**Created:** [October 13, 2019, 2:01pm UTC](https://forum.babylonjs.com/t/did-anyone-sucessfuly-export-mesh-with-alpha-texture-from-blender-2-8/6337 "2019-10-13T14:01:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![varanda](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@varanda](https://forum.babylonjs.com/u/varanda)\
**Post date:** [October 13, 2019, 2:01pm UTC](https://forum.babylonjs.com/t/did-anyone-sucessfuly-export-mesh-with-alpha-texture-from-blender-2-8/6337/1 "2019-10-13T14:01:26Z")

</div>

I tried my best doing my “homework” by reading:

“Transparency and How Meshes Are Rendered”  
[https://doc.babylonjs.com/resources/transparency\_and\_how\_meshes\_are\_rendered](https://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered)

“Materials”  
[https://doc.babylonjs.com/babylon101/materials](https://doc.babylonjs.com/babylon101/materials)

“Blender tips”  
[https://doc.babylonjs.com/resources/blender#features](https://doc.babylonjs.com/resources/blender#features)

However, after many attempts I still can not get my model to have a face with transparent areas according to its texture.

On Blender I tried to enable PBR Transparency mode: Alpha test & Blend as well as Blend. No effect. BTW… existing Blender tips is VERY different than 2.8 and former exported made for 2.79 crashes crashes on 2.79. So I am only using 2.8 with latest exporter.

O BJS I tried to enable Alpha by getting material reference with no luck:

> ```
> var mat = arch.material;
> mat.hasAlpha = true;
> 
> ```

Also tried other possible settings like:

> ```
> mat.backFaceCulling = false;
> mat.diffuseTexture.hasAlpha = true; // get error here as there is no diffuseTexture in this mat.
> mat.needAlphaBlendingForMesh(true);
> mat.alphamode = BABYLON.Engine.ALPHA_COMBINE;
> 
> ```

Then I decided to follow a working solution for a cube:

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#YDO1F%2318)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

So I created a material and tried to apply to my mesh. It seems that BJS did not take in consideration the existing UV Mapping and applied wrong mapping:

> ```
> var mat = new BABYLON.StandardMaterial("newMat", scene);
> mat.diffuseTexture = new BABYLON.Texture("blender/arch.png", scene);
> mat.diffuseTexture.hasAlpha = true;
> mat.backFaceCulling = false;
> arch.material = mat;
> 
> ```

Thanks in advance,  
Marcelo

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [October 14, 2019, 3:35pm UTC](https://forum.babylonjs.com/t/did-anyone-sucessfuly-export-mesh-with-alpha-texture-from-blender-2-8/6337/2 "2019-10-14T15:35:08Z")

</div>

Pinging our experts (@JCPalmer, @Vinc3r, @gryff)

---

<div class="post-metadata">

**Author:** ![Vinc3r](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vinc3r/32/25340_2.png) [@Vinc3r](https://forum.babylonjs.com/u/Vinc3r)\
**Post date:** [October 14, 2019, 3:43pm UTC](https://forum.babylonjs.com/t/did-anyone-sucessfuly-export-mesh-with-alpha-texture-from-blender-2-8/6337/3 "2019-10-14T15:43:40Z")

</div>

We’ll [need your .blend](http://pasteall.org/blend/) with your object (or if you can’t share it, a simple Cube using the same setup will be OK too). Bonus [if you try to integrate](https://doc.babylonjs.com/resources/external_pg_assets) it inside a playground 😉

---

<div class="post-metadata">

**Author:** ![varanda](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@varanda](https://forum.babylonjs.com/u/varanda)\
**Post date:** [October 14, 2019, 6:45pm UTC](https://forum.babylonjs.com/t/did-anyone-sucessfuly-export-mesh-with-alpha-texture-from-blender-2-8/6337/4 "2019-10-14T18:45:56Z")

</div>

It does not run under playground:  
[https://www.babylonjs-playground.com/#KLM5MS#1](https://www.babylonjs-playground.com/#KLM5MS#1)

Blender file in:

> **[blender.zip](https://www.dropbox.com/s/5smbxl7nvr99n3b/blender.zip?dl=0)**
>
> Shared with Dropbox

I am having so many problems that I am switching engines as I have a dead line.  
To mention a few:

- Following camera get inverted rotation related to the model. Parenting a free camera did not work. So I hacked a freecamera by “manually” translating/orbting around my model
- Dynamic texture gets wrong UV Map once re-applied to a model.
- Transparent Texture does not worked for me.

Thanks anyways.

---

<div class="post-metadata">

**Author:** ![Vinc3r](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vinc3r/32/25340_2.png) [@Vinc3r](https://forum.babylonjs.com/u/Vinc3r)\
**Post date:** [October 15, 2019, 9:36am UTC](https://forum.babylonjs.com/t/did-anyone-sucessfuly-export-mesh-with-alpha-texture-from-blender-2-8/6337/5 "2019-10-15T09:36:31Z")

</div>

> [@varanda](#):
>
> It does not run under playground

Yep, you’ve missed a point in the doc’ 😉 [https://doc.babylonjs.com/resources/external\_pg\_assets#from-dropboxcom](https://doc.babylonjs.com/resources/external_pg_assets#from-dropboxcom)

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#XCM5XN)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

As your folder is kind of… messy 😃 I have no idea about which objects & materials are problematic, please be more specific. As I said, a simple cube showing your issue is enough to help.

But from what I’ve seen until now by opening randomly a .blend, you don’t use nodes on your material. Read Blender Manual about glTF: [https://docs.blender.org/manual/en/latest/addons/io\_scene\_gltf2.html](https://docs.blender.org/manual/en/latest/addons/io_scene_gltf2.html)

[https://docs.blender.org/manual/en/latest/\_images/addons\_io-gltf2\_material-principled.png](https://docs.blender.org/manual/en/latest/_images/addons_io-gltf2_material-principled.png)

---

<div class="post-metadata">

**Author:** ![varanda](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@varanda](https://forum.babylonjs.com/u/varanda)\
**Post date:** [October 15, 2019, 11:00am UTC](https://forum.babylonjs.com/t/did-anyone-sucessfuly-export-mesh-with-alpha-texture-from-blender-2-8/6337/6 "2019-10-15T11:00:30Z")

</div>

Hello Vinc,

Very appreciated your reply. I really missed this doc, thanks a lot for pointing out. Once I deploy my game I will resume reimplementing it in BJS as I really want to learn it. You guys are definitely doing an amazing job.

Regards,  
Marcelo
