-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with sparse_voxels Z-buffer #379
Comments
That is very strange results. I cannot replicate that on my computer. Can you share (even on private channel: [email protected]) information about your GPU card? It is visible in developer console in browser: |
@CoenHordijk can you confirm that opacity of object is 1? It looks kind of "Order-independent transparency" issue. Please also share information about depth bits (it is also in developer console - on my screenshost i put bottom segment from rectangle on it) |
|
It seems this only occurs with opacity less than 1 (0.955 does generate this artifact). |
@CoenHordijk do you confirm that it happen with opacity <1 but it is ok with opacity = 1? |
opacity = 1 is fine indeed |
Thanks @CoenHordijk ! So it is problem with https://en.wikipedia.org/wiki/Order-independent_transparency . It is not easy problem in computer graphics. Three.js that k3d depends on have no support to that. There are some techniques to solve that like depth peels. I have that feature in beta stage. But even when we will release it it won't be enable by default because add extra overhead to rendering. So that will be decision of user to add:
|
K3D version:
2.14.5
Python version:
Python 3.95
Operating System:
Windows
Using WebGL / GPU accelarated view
Description
Z buffering seems to fail on some near cubes in this sample.
What I Did
`
import k3d
import numpy as np
N = 111220
sparse_voxels = np.random.randint(0, 1115, size=(N, 4), dtype=np.uint16)
sparse_voxels[:, 3] = np.random.randint(1, 5, size=(N,))
plot = k3d.plot(grid_visible = False)
obj = k3d.sparse_voxels(sparse_voxels, [300, 300, 300], compression_level=1, outlines=False)
plot += obj
plot.display()
`
The text was updated successfully, but these errors were encountered: