# Problem with 3D and fill

**URL:** <https://discourse.processing.org/t/problem-with-3d-and-fill/41317>\
**Category:** Coding Questions\
**Created:** [March 16, 2023, 9:20am UTC](https://discourse.processing.org/t/problem-with-3d-and-fill/41317 "2023-03-16T09:20:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![haapjou](https://avatars.discourse-cdn.com/v4/letter/h/f17d59/32.png) [@haapjou](https://discourse.processing.org/u/haapjou)\
**Post date:** [March 16, 2023, 9:20am UTC](https://discourse.processing.org/t/problem-with-3d-and-fill/41317/1 "2023-03-16T09:20:08Z")

</div>

Hi,

I’ve been trying to do boxes inside boxes, but for some reason can’t get the fill to work the way I want. (transparent fill with the stroke color).

What am I missing??

> **[MK - Jouni Haapakoski - OpenProcessing](https://openprocessing.org/sketch/863586)**

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [March 16, 2023, 9:47am UTC](https://discourse.processing.org/t/problem-with-3d-and-fill/41317/2 "2023-03-16T09:47:52Z")

</div>

Try reversing the order the boxes are drawn starting with the smallest (innermost) and going to the largest (outermost)

---

<div class="post-metadata">

**Author:** ![haapjou](https://avatars.discourse-cdn.com/v4/letter/h/f17d59/32.png) [@haapjou](https://discourse.processing.org/u/haapjou)\
**Post date:** [March 16, 2023, 10:53am UTC](https://discourse.processing.org/t/problem-with-3d-and-fill/41317/3 "2023-03-16T10:53:29Z")

</div>

Cheers! It works, but why =)

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [March 16, 2023, 12:08pm UTC](https://discourse.processing.org/t/problem-with-3d-and-fill/41317/5 "2023-03-16T12:08:55Z")

</div>

If you draw the biggest first then WEBGL will not draw anything behind it due to hidden surface removal even if the bigger object has a translucent colour.

---

<div class="post-metadata">

**Author:** ![haapjou](https://avatars.discourse-cdn.com/v4/letter/h/f17d59/32.png) [@haapjou](https://discourse.processing.org/u/haapjou)\
**Post date:** [March 17, 2023, 8:20am UTC](https://discourse.processing.org/t/problem-with-3d-and-fill/41317/6 "2023-03-17T08:20:44Z")

</div>

Ah, cheers thanks for the answer!
