# P3D, transparency, and overlapping objects

**URL:** https://discourse.processing.org/t/p3d-transparency-and-overlapping-objects/7123
**Category:** Coding Questions
**Created:** [January 2, 2019, 10:26pm UTC](https://discourse.processing.org/t/p3d-transparency-and-overlapping-objects/7123 "2019-01-02T22:26:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ragona](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ragona/32/3048_2.png) [@ragona](https://discourse.processing.org/u/ragona)
#### Post date: [January 2, 2019, 10:26pm UTC](https://discourse.processing.org/t/p3d-transparency-and-overlapping-objects/7123/1 "2019-01-02T22:26:11Z")

</div>

Hi all,

I want to use Processing for a visualization of a 3D search algorithm. There are 1000 points in 3D space, and I’m rendering them with spheres. So far so good. I now want to place a second, larger sphere around the first point, and I want the second sphere to be transparent. This is where things get funky.

Here is the cloud of points: [https://imgur.com/neabzWP](https://imgur.com/neabzWP)  
Here is what happens when I add transparent spheres on top: [https://imgur.com/MSUBfry](https://imgur.com/MSUBfry)

Now, there is a ton of overlap, and I’m not surprised that the result is weird. But the result is really weird in ways that I’m not sure how to fix. I tried mucking with the blend mode, but I didn’t have any luck there. I get that a whole bunch of overlapping transparency is gonna add up to opaque, so I’d love any suggestions that you might have in how to get this working.

---

<div class="post-metadata">

### Author: ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)
#### Post date: [January 2, 2019, 10:30pm UTC](https://discourse.processing.org/t/p3d-transparency-and-overlapping-objects/7123/2 "2019-01-02T22:30:16Z")

</div>

Looks like you’re hitting an issue with the depth mask. Check out this thread [Overlaying images with opacity using tint() in P3D](https://discourse.processing.org/t/overlaying-images-with-opacity-using-tint-in-p3d/6114) and also search on here for the hints mentioned and you’ll find more useful threads.

---

<div class="post-metadata">

### Author: ![ragona](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ragona/32/3048_2.png) [@ragona](https://discourse.processing.org/u/ragona)
#### Post date: [January 2, 2019, 10:31pm UTC](https://discourse.processing.org/t/p3d-transparency-and-overlapping-objects/7123/3 "2019-01-02T22:31:59Z")

</div>

Will do, thank you! I got some interesting results with hint(DISABLE\_DEPTH\_TEST), so I’ll be sure to try out the other modes as well.
