# Transparency issue with several objects on top of other transparent objects?

**URL:** <https://forum.babylonjs.com/t/transparency-issue-with-several-objects-on-top-of-other-transparent-objects/11432>\
**Category:** Bugs\
**Created:** [June 4, 2020, 4:20pm UTC](https://forum.babylonjs.com/t/transparency-issue-with-several-objects-on-top-of-other-transparent-objects/11432 "2020-06-04T16:20:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bozworth](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bozworth/32/6484_2.png) [@bozworth](https://forum.babylonjs.com/u/bozworth)\
**Post date:** [June 4, 2020, 4:20pm UTC](https://forum.babylonjs.com/t/transparency-issue-with-several-objects-on-top-of-other-transparent-objects/11432/1 "2020-06-04T16:20:14Z")

</div>

I put a question mark at the end because i cant tell if transparency of multiple objects all on top of each other is the primary issue but it seems to happen in multiple game engines too…

Anyway so i created a playground to show you guys what is happening, does anyone know what is wrong here?

if you rotate the camera you will see the blocks appear and disappear.

Im not sure how to solve this issue, ive tried for a long time now.

[https://www.babylonjs-playground.com/#1SLLOJ#1109](https://www.babylonjs-playground.com/#1SLLOJ#1109)

Please help

---

<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:** [June 4, 2020, 4:47pm UTC](https://forum.babylonjs.com/t/transparency-issue-with-several-objects-on-top-of-other-transparent-objects/11432/2 "2020-06-04T16:47:40Z")

</div>

It’s a common problem with transparency, look for “transparency” in this forum. For eg:

- [Transparency problems](https://forum.babylonjs.com/t/transparency-problems/9594/2)
- [hasVertexAlpha causes problems when \_unIndexed is used directly](https://forum.babylonjs.com/t/hasvertexalpha-causes-problems-when-unindexed-is-used-directly/8181/4)
- [Have only certain meshes visibile through transparency?](https://forum.babylonjs.com/t/have-only-certain-meshes-visibile-through-transparency/8551/2)

In your case, you can make the small blocks always drawn after the water by setting the `renderingGroupId` property:

[https://www.babylonjs-playground.com/#1SLLOJ#1110](https://www.babylonjs-playground.com/#1SLLOJ#1110)

You can also have a look at this doc:  
[https://doc.babylonjs.com/resources/transparency\_and\_how\_meshes\_are\_rendered](https://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered)

---

<div class="post-metadata">

**Author:** ![bozworth](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bozworth/32/6484_2.png) [@bozworth](https://forum.babylonjs.com/u/bozworth)\
**Post date:** [June 4, 2020, 4:55pm UTC](https://forum.babylonjs.com/t/transparency-issue-with-several-objects-on-top-of-other-transparent-objects/11432/3 "2020-06-04T16:55:12Z")

</div>

> [@Evgeni\_Popov](#):
>
> In your case, you can make the small blocks always drawn after the water by setting the `renderingGroupId` property:

Thanks for posting the fix. Its sorted the issue for me. I hope its useful for anyone else too.

I realised it was quite a common problem when i saw other engines with the same issue.
