# Problem with making the text's background transparent

**URL:** <https://forum.babylonjs.com/t/problem-with-making-the-texts-background-transparent/4619>\
**Category:** Questions\
**Created:** [July 20, 2019, 5:43am UTC](https://forum.babylonjs.com/t/problem-with-making-the-texts-background-transparent/4619 "2019-07-20T05:43:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ebrahim](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@Ebrahim](https://forum.babylonjs.com/u/Ebrahim)\
**Post date:** [July 20, 2019, 5:43am UTC](https://forum.babylonjs.com/t/problem-with-making-the-texts-background-transparent/4619/1 "2019-07-20T05:43:48Z")

</div>

guys,  
I have problem in putting text on a plane. Here is my PG ([https://www.babylonjs-playground.com/#2EYZPE#13](https://www.babylonjs-playground.com/#2EYZPE#13)). The text has shadow and not very clean. I tried several techniques suggested in this forum but not make it.

---

<div class="post-metadata">

**Author:** ![Wingnut](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wingnut/32/53_2.png) [@Wingnut](https://forum.babylonjs.com/u/Wingnut)\
**Post date:** [July 20, 2019, 6:13am UTC](https://forum.babylonjs.com/t/problem-with-making-the-texts-background-transparent/4619/2 "2019-07-20T06:13:27Z")

</div>

Hi E, and welcome to BJS forum.

[https://www.babylonjs-playground.com/#2EYZPE#14](https://www.babylonjs-playground.com/#2EYZPE#14)

I disabled line 44 (opacity texture)… and also added full billboardMode in line 45 (text always faces camera). Any better? I hope so.

Something seems to be wrong with the font family, though. Checking…

---

<div class="post-metadata">

**Author:** ![Ebrahim](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@Ebrahim](https://forum.babylonjs.com/u/Ebrahim)\
**Post date:** [July 20, 2019, 6:21am UTC](https://forum.babylonjs.com/t/problem-with-making-the-texts-background-transparent/4619/3 "2019-07-20T06:21:16Z")

</div>

Hi Wingnut,  
Thanks for the reply. The issue I have with what you suggested is that the text lost its clarity and not solid.I already tried this and due to the mentioned font issue I added opacityTexture.

---

<div class="post-metadata">

**Author:** ![Wingnut](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wingnut/32/53_2.png) [@Wingnut](https://forum.babylonjs.com/u/Wingnut)\
**Post date:** [July 20, 2019, 6:33am UTC](https://forum.babylonjs.com/t/problem-with-making-the-texts-background-transparent/4619/4 "2019-07-20T06:33:15Z")

</div>

[https://www.babylonjs-playground.com/#2EYZPE#16](https://www.babylonjs-playground.com/#2EYZPE#16)

Font string was missing a space.

Yeah, I tried some things… no measuring, manually setting plane size (65) and dynamic texture resolution (2048)… and increased font size. (and changed to Georgia fonts just to make sure font-family changing is working).

Starting to improve?

---

<div class="post-metadata">

**Author:** ![Ebrahim](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@Ebrahim](https://forum.babylonjs.com/u/Ebrahim)\
**Post date:** [July 20, 2019, 6:38am UTC](https://forum.babylonjs.com/t/problem-with-making-the-texts-background-transparent/4619/5 "2019-07-20T06:38:45Z")

</div>

Great. What I exactly needed. That missing space blocked me for one day. A huge thanks.

---

<div class="post-metadata">

**Author:** ![Wingnut](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wingnut/32/53_2.png) [@Wingnut](https://forum.babylonjs.com/u/Wingnut)\
**Post date:** [July 20, 2019, 6:43am UTC](https://forum.babylonjs.com/t/problem-with-making-the-texts-background-transparent/4619/6 "2019-07-20T06:43:03Z")

</div>

My pleasure. Sorry for the lost day. Yeah, I used a console.log(font) to see the missing space. It was blowing my mind… I couldn’t understand what its problem was.

Got a few minutes to stay nearby? I can build you a version using [BabylonJS GUI](https://doc.babylonjs.com/how_to/gui) (advanced dynamic texture). Or I can show you how/where to learn how to try one yourself. I dunno if it will be any more fun/easy, but it’s a “newer” way to make [text on planes](https://www.babylonjs-playground.com/#2EYZPE#17).

---

<div class="post-metadata">

**Author:** ![Ebrahim](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@Ebrahim](https://forum.babylonjs.com/u/Ebrahim)\
**Post date:** [July 20, 2019, 6:54am UTC](https://forum.babylonjs.com/t/problem-with-making-the-texts-background-transparent/4619/7 "2019-07-20T06:54:25Z")

</div>

Thanks @Wingnut. You saved me.  
I am using the BJS in a very dynamic environment where the text are attached to some objects and the size (height, width, depth) of objects are changed with the user configuration, so the texts as well. Also, the direction, position, value , … of the texts are changed. The user can zoom in/out which requires to change the position of the text but not the size. I already tried this scenario with the BJS GUI and the TextBlock, but find it complicated. Moreover, I need to check the collisions and intersections of the texts with the objects and IMO tmanaging the Plane is easier than GUI elements.
