P3D, transparency, and overlapping objects

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
Here is what happens when I add transparent spheres on top: 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.

1 Like

Looks like you’re hitting an issue with the depth mask. Check out this thread Overlaying images with opacity using tint() in P3D and also search on here for the hints mentioned and you’ll find more useful threads.


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.