-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
scatter3d points aren't ordered by depth across traces #1267
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
Comments
cc @dfcreative |
#1466 at least makes the behavior not be path-dependent, so that's good. But there's a bigger issue here: points aren't ordered by depth across traces. The trace that was drawn last always has all its points in front of the other traces, even if they are really farther away. It turns out this is only an issue for traces with opacity. If I change the traces in http://codepen.io/etpinard/pen/oYOMZO to This seems to me frankly a major bug for partly-transparent traces. It means the essential 3d-ness of the plot is silently lost, making you think the last trace drawn has a greater extent than the others or something... |
Painter's algorithm is one solution, but that means view-dependent sorting. Unfortunately order-independent transparency tends to be pretty nontrivial to the best of my knowledge. 😞 The only other simple workaround I can think of is making the colors strictly additive or subtractive so that they might be partially transparent, but the order has no effect on rendering. It'd mean a pretty abrupt discontinuity between transparency 0.999 and 1.0 though. |
Seems that we have to do single gl-scatter3d render pass for accumulated data, logically. Trying to figure out how are we doing that now. |
cc @archmoj |
Issue example displayed in a candidate patch: codepen. |
I also have this issue when having opacity = 1. Any solutions? |
Wow, 4 years old and still no solution. How can we help? Currently seeing this: If I start with the first figure and rotate it a bit toward the right such that the blue points should be in front of the brown points,.... the blue points disappear completely ?? How can we help fix this? I'm not a JS programmer (these are from Python) but... willing to try to contribute if it means getting non-nonsense plots. NOTE: This behavior is independent of opacity value; even opacity=1.0 yields this foreground/background mixup. |
@drscotthawley (and @brianpenghe if you're still interested, sorry I didn't see your comment last year!) I don't see any problems in my tests with Unfortunately, for any opacity < 1 as some of the older comments here say, there seems to be no good known order-independent algorithm, which means we can't parallelize the render in the usual way, and the solution would need to be a major rewrite of our rendering system, and likely far slower than what we do today. |
Hi, so this is kind of how I'm using scatter3d in my js code, and have the same problem, also with |
@alexcjohnson Thank you for your reply. I am now looking at a 3d scatter plot in plotly Python 5.14 made via Express with I understand re. the major code overhaul; sorry I failed to read some of the previous discussion carefully. |
See http://codepen.io/etpinard/pen/oYOMZO
The text was updated successfully, but these errors were encountered: