# When backface culling is off and material is alpha, an arbitrary winding order face gets rendered?

**URL:** <https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020>\
**Category:** Questions\
**Created:** [October 9, 2024, 11:56am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020 "2024-10-09T11:56:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/65968d62f456031dabf0693d50ca930df25bf2ef.png) [@system](https://forum.babylonjs.com/u/system)\
**Post date:** [October 9, 2024, 11:56am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/1 "2024-10-09T11:56:09Z")

</div>

Hi, so here’s the PG

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

controls:  
q: toggle face orientation debug - red is front face, blue is backface  
w: make the mesh alpha/opaque

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/9/690991dc27e72dc0ef9bf63a83a0c618a03b69c1.png)  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/9/494a42adac1f70f2ba006236d0069a1ff0b629ae.png)

when the mesh is alpha, why do I see the backface of the highlighted face, even though it’s in the front?

is there a logic to how the backface gets chosen? is there a way I can still see all the front-faces when the mesh is alpha?

It’s messing with the lighting when the mesh gets alpha : /

tysm : )

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [October 9, 2024, 5:05pm UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/2 "2024-10-09T17:05:29Z")

</div>

In alpha mode, faces are not sorted and are rendered in the order they appear in the mesh geometry.

You can try to sort the triangles ([Babylon.js docs](https://doc.babylonjs.com/features/featuresDeepDive/mesh/facetData#facet-depth-sort)), but even doing so, you will get artifacts if the triangles are too big.

See this doc page for a description of all the problems you get because of transparency, and how to mitigate them:

[https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent\_rendering](https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent_rendering)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/65968d62f456031dabf0693d50ca930df25bf2ef.png) [@system](https://forum.babylonjs.com/u/system)\
**Post date:** [October 10, 2024, 5:41am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/3 "2024-10-10T05:41:07Z")

</div>

> You can try to sort the triangles

this just makes them disappear randomly when moving lol (nvm it works fine i forgor to make it updatable, skill issue)

> rendered in the order they appear in the mesh

I see, see my final objective is top or bottom faces shouldn’t be backfaces, others are fine, since it’s order dependent, I’ll try to make this happen by changing the order of faces in the geometry : O

> See this doc page for a description of all the problems you get because of transparency, and how to mitigate them

I will : )

Thankyou so much for helping me out here : D

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [October 11, 2024, 8:55am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/5 "2024-10-11T08:55:41Z")

</div>

I’m really sorry @Heaust-ops, I flagged you and the topic as spammer instead of the real spammer who answered afterwards (who is also now deleted)!!

I could undelete the topic, we are currently trying to see if it’s possible to undelete the “spammer” flag…

---

<div class="post-metadata">

**Author:** ![Joe\_Kerr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/joe_kerr/32/39017_2.png) [@Joe\_Kerr](https://forum.babylonjs.com/u/Joe_Kerr)\
**Post date:** [October 11, 2024, 10:11am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/6 "2024-10-11T10:11:22Z")

</div>

Oh no 😮 We need @Heaust-ops here! Maybe someone from MS knows some secret exploits so that we can hack him back in 😃

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [October 11, 2024, 10:25am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/7 "2024-10-11T10:25:30Z")

</div>

I sent him an e-mail. Unfortunately, it doesn’t seem possible to recover deleted accounts, Discourse really cleans up the database in this case. However, Heaust-Ops should be able to recreate the same account with the same email address (small consolation…).

---

<div class="post-metadata">

**Author:** ![Heaust-ops](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/heaust-ops/32/45470_2.png) [@Heaust-ops](https://forum.babylonjs.com/u/Heaust-ops)\
**Post date:** [October 13, 2024, 7:21am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/8 "2024-10-13T07:21:53Z")

</div>

I back! : D

glad to see I was missed \<3

---

<div class="post-metadata">

**Author:** ![Joe\_Kerr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/joe_kerr/32/39017_2.png) [@Joe\_Kerr](https://forum.babylonjs.com/u/Joe_Kerr)\
**Post date:** [October 13, 2024, 9:19am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/9 "2024-10-13T09:19:07Z")

</div>

Waaaait a second… How do we know you are the real @Heaust-ops 🤔 😁

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [October 13, 2024, 9:24am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/10 "2024-10-13T09:24:08Z")

</div>

> [@Joe\_Kerr](#):
>
> Waaaait a second… How do we know you are the real @Heaust-ops 🤔 😁

> [@Heaust-ops](#):
>
> I back! : D

I back… It’s him 😉 I love his vocabulary!!

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [October 13, 2024, 9:25am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/11 "2024-10-13T09:25:34Z")

</div>

Welcom bak bro!! 🍰

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [October 13, 2024, 9:50am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/12 "2024-10-13T09:50:47Z")

</div>

Welcome back (and sorry again!)!

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [October 13, 2024, 9:58am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/13 "2024-10-13T09:58:35Z")

</div>

@Evgeni_Popov Shit happens, we all make mistakes!

Maybe you could add a new badge called **Accidentally deleted** and grant only to @Heaust-ops. 🤪

---

<div class="post-metadata">

**Author:** ![Joe\_Kerr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/joe_kerr/32/39017_2.png) [@Joe\_Kerr](https://forum.babylonjs.com/u/Joe_Kerr)\
**Post date:** [October 13, 2024, 10:02am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/14 "2024-10-13T10:02:55Z")

</div>

> [@roland](#):
>
> new badge called **Accidentally deleted**

Feature request! 😃

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [October 13, 2024, 10:11am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/15 "2024-10-13T10:11:30Z")

</div>

[quote=“Evgeni\_Popov, post:5, topic:54020”]  
I flagged you and the topic as spammer instead of the real spammer who answered afterwards (who is also now deleted)!!  
[/quote] 😀

OMG. See what these buggers create. Despite from being a piece of sh\*t with the brain of a 4-years old 😀 I would have a feature request for this: For each identified ‘bugger’ place a contract 💲 🔫 to have someone go meet him in person and break his knees 🔨

EDIT: And he now shows like a ‘newbie’ - All of his previous posts and activities are also ‘gone with the wind’ 😢 😒 Oh, how I just hate these f\*\*\*ing buggers for doing that to us… even daring to. 😬

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [October 13, 2024, 10:19am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/16 "2024-10-13T10:19:42Z")

</div>

> [@roland](#):
>
> a new badge called **Accidentally deleted**

Would it be golden 🥇 (or platinum may be) 😂 Bet not many of us would be able to acquire this one 😝 🤡

---

<div class="post-metadata">

**Author:** ![Heaust-ops](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/heaust-ops/32/45470_2.png) [@Heaust-ops](https://forum.babylonjs.com/u/Heaust-ops)\
**Post date:** [October 13, 2024, 10:49am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/17 "2024-10-13T10:49:57Z")

</div>

> Waaaait a second… How do we know you are the real @Heaust-ops

You can trust me, I’m legit! : D

_muffled real Heaust-ops noises in the background_

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [October 13, 2024, 10:54am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/18 "2024-10-13T10:54:14Z")

</div>

AI: 'Second-level ‘aside-from-biometrics’ Identification successful 🪪. Welcome back 😂

---

<div class="post-metadata">

**Author:** ![Heaust-ops](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/heaust-ops/32/45470_2.png) [@Heaust-ops](https://forum.babylonjs.com/u/Heaust-ops)\
**Post date:** [October 13, 2024, 10:54am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/19 "2024-10-13T10:54:32Z")

</div>

> I back… It’s him 😉 I love his vocabulary!!

why use many word when few word do trick : P

> Welcom bak bro!!

tysm : D

> Welcome back (and sorry again!)!

no worries, glad to be backk 😀

> new badge called **Accidentally deleted**

minecraft achievement vibes, “Postmortal” unlocked lol xD

---

<div class="post-metadata">

**Author:** ![Heaust-ops](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/heaust-ops/32/45470_2.png) [@Heaust-ops](https://forum.babylonjs.com/u/Heaust-ops)\
**Post date:** [October 13, 2024, 10:56am UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/20 "2024-10-13T10:56:20Z")

</div>

> someone go meet him in person and break his knees

or boil their teeth!

thanks everyone for a warm welcome back \<3

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [October 13, 2024, 12:21pm UTC](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020/21 "2024-10-13T12:21:31Z")

</div>

> [@Heaust-ops](#):
>
> “Postmortal” unlocked lol xD

A lot better than “Accidentally deleted” 🤣 🤣 Let’s see what can we do 🤪

[Next page](https://forum.babylonjs.com/t/when-backface-culling-is-off-and-material-is-alpha-an-arbitrary-winding-order-face-gets-rendered/54020.md?page=2)
