# billboardMode on a gltf assets doesn't works as it should

**URL:** <https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999>\
**Category:** Bugs\
**Created:** [March 20, 2019, 9:47am UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999 "2019-03-20T09:47:15Z")\
**Posts on this page:** 17\
**Page:** 1

<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:** [March 20, 2019, 9:47am UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/1 "2019-03-20T09:47:15Z")

</div>

I have 3D scene containing a plane expected to be billboarded once in BJS.

Mesh is oriented Y forward inside Blender, as I always did when dealing with billboards (except for .babylon export where it should be Y backward facing)  
 ![](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/b0e223f30fe2e5288e8c769dff7200287ceacddf.png)

But as [you can see in this playground](https://playground.babylonjs.com/#SXM8I2), billboard object is totally broken.

![](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/e/eb9a99a12dfb1cb4e6cd0031b7bedaffd92e6411.gif)

[From this answer](https://github.com/BabylonJS/Babylon.js/issues/6068#issuecomment-473942786) I start thinking there is a parent relation issue somewhere but it looks like un-intuitive.

[There is a workaround](https://playground.babylonjs.com/#SXM8I2#1) but not very convenient (even by [creating a parent dummy](https://playground.babylonjs.com/#SXM8I2#3)), especially:

- if you have to deal with dozens of billboard meshes
- if you want preserve your scene hierarchy to keep things clear

So, is this a bug or a feature ? :-p

---

<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:** [March 20, 2019, 3:27pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/2 "2019-03-20T15:27:27Z")

</div>

Definitely a bug…Working on it

---

<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:** [March 20, 2019, 3:54pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/3 "2019-03-20T15:54:05Z")

</div>

Ok I introduced a new property:

```auto
billboardMesh.preserveParentRotationForBillboard = true;

```

This will help saving parent rotation when dealing with gltf file (as parent rotation helps converting from right handed to left handed)

---

<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:** [March 20, 2019, 3:54pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/4 "2019-03-20T15:54:15Z")

</div>

Fix will be in next nightly

---

<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:** [March 20, 2019, 4:04pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/5 "2019-03-20T16:04:08Z")

</div>

You rox, thanks!

---

<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:** [March 21, 2019, 8:57am UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/6 "2019-03-21T08:57:52Z")

</div>

Fixed 😉 [https://playground.babylonjs.com/#SXM8I2#4](https://playground.babylonjs.com/#SXM8I2#4)

---

<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:** [March 26, 2019, 2:32pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/7 "2019-03-26T14:32:37Z")

</div>

Actually I reopen the bug: at the moment you play with the billboard parent rotation, things continues to go wrong

[https://playground.babylonjs.com/#SXM8I2#5](https://playground.babylonjs.com/#SXM8I2#5)

---

<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:** [March 26, 2019, 8:22pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/8 "2019-03-26T20:22:37Z")

</div>

This is expected…Parent rotation is NOT supposed to work. The option I added was only to help supporting gltf vertical inversion.

I would recommend that you do not change parent rotation at all

---

<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:** [March 27, 2019, 11:05am UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/9 "2019-03-27T11:05:03Z")

</div>

Hmm, I still think that’s a weird behaviour: a billboard should be shown as a billboard no matter if it’s child or parent of an other element isn’it?

---

<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:** [March 27, 2019, 3:01pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/10 "2019-03-27T15:01:49Z")

</div>

Yes but we are also in a realtime environment and the system cannot spend too much cycles blocking all the hierarchy rotations 🙂

---

<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:** [March 29, 2019, 10:45am UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/11 "2019-03-29T10:45:59Z")

</div>

Shouldn’t be the user who decide if using performance-cost billboarding is alright or not?

Actually here my current usecase where I’m stuck: I have a globe, and some keypoints on it. These keypoints are custom meshes (not just planes).  
They have some text on it, and that’s why they have to be read with mesh facing the screen ; I can’t use GUI 'cause artists have to be able to modify keypoints layout without having to see a bit of code (anyway it will be too difficult to code this GUI rather than using a 3D modeler).

Here a playground which reproduce this usecase: [https://www.babylonjs-playground.com/#WC7IJG#4](https://www.babylonjs-playground.com/#WC7IJG#4)  
My billboards works… but not rotate with the earth. If I attached them to a dummy, parented to the globe, same issue. If I set `preserveParentRotationForBillboard`, they’re not acting as billboards anymore.

For now I don’t see a solution to get rid of this limitations 😵

---

<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:** [March 29, 2019, 3:08pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/12 "2019-03-29T15:08:34Z")

</div>

Here is the trick:

- create dummies
- do not parent your billboards
- registerOnBeforeRender: set billboard.position = dummy.position

---

<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:** [March 29, 2019, 3:35pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/13 "2019-03-29T15:35:42Z")

</div>

ok thanks, I will try that.

---

<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:** [April 1, 2019, 9:53am UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/14 "2019-04-01T09:53:49Z")

</div>

For those interested, here the trick: [https://www.babylonjs-playground.com/#WC7IJG#6](https://www.babylonjs-playground.com/#WC7IJG#6)

I’m still doubtful about the fact that a mesh set as a billboard doesn’t act as a billboard, IMO it have to act as this no matter its situation 😶 At least this restriction have to be mentionned in the doc & API.

---

<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:** [April 1, 2019, 1:22pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/15 "2019-04-01T13:22:24Z")

</div>

I’m not satisfied either by the situation but I did not find a fast way to support parent rotation.  
Agree about the Doc. Fancy doing a PR?

---

<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:** [April 1, 2019, 1:44pm UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/16 "2019-04-01T13:44:12Z")

</div>

Yep as soon as possible, but I currently doesn’t have enough spare time, but I take note to add this asap 😉

---

<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:** [April 4, 2019, 8:50am UTC](https://forum.babylonjs.com/t/billboardmode-on-a-gltf-assets-doesnt-works-as-it-should/1999/17 "2019-04-04T08:50:01Z")

</div>

Playground update: actually if you want keep your hierarchy readable (especially in the Inspector) you’re able to use a transformNode (without any transforms) as parent for your billboards [https://www.babylonjs-playground.com/#WC7IJG#7](https://www.babylonjs-playground.com/#WC7IJG#7)
