K3D-jupyter
K3D-jupyter copied to clipboard
non-physical alpha blending in scatter plot
When I create a 3d scatter plot of points with alpha<1 (can be 0.99), there are perspectives from which background points are shown in front of foreground points (see screenshot, generated with code below; note that all spheres have the same size, so the larger one should be in the foreground). Switching to alpha = 1 fixes the problem, but that prevents me from using alpha.

import k3d
import numpy as np
coords0 = np.random.randn(20,3)
plot = k3d.plot()
plot.background_color = 0
plot.grid_visible=False
points = k3d.points(positions=coords0,point_size=1, shader='3d', color_range=[0, 1])
points.opacity = 0.99
plot += points
plot.display()
python and js version: 2.14.5 Client: mac firefox Server: ubuntu linux
Hi!
It's well know limitations in 3d graphics called "order independent transparency". There is couple techniques to solved it. I have it already in k3dpro version (non open-source one) and it seems to be stable. I used depth peels method.
Thanks for that issue. Please obseve tasks with label "order independent transparency" here.