Skip to content

Scatter 3d - Geometric position not respected i.e. a dataset added later appears on top even if it is behind spatially. #6536

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

Closed
igi-chris opened this issue Mar 27, 2023 · 3 comments

Comments

@igi-chris
Copy link

Example: https://codepen.io/chrisprosser/pen/MWqygKw

An example interaction is shown in the short video clip attached. The green cluster (trace 2) has higher values on the x-axis than the orange (trace 1). If I rotate so that they overlap (with the camera at the low x-axis value side) I would expect orange to appear in front as it is closer spatially, but the green appears on top. I then go on to show the same problem with the blue cluster (trace 0).

clusters.mp4
@igi-chris
Copy link
Author

igi-chris commented Oct 6, 2023

I investigated whether we still get the same issue if we put all of the data as a single trace, and it seems that we do still get the same issue: https://codepen.io/Chris-Prosser/pen/ExGOLaJ.

After more investigation, I found that if I remove the alpha from the line (from the above example) replacing: color: "rgba(16, 16, 16, 0.5)" with color: "rgb(16, 16, 16)" in the trace.line spec it resolves the issue. Here is a version that works as expected: https://codepen.io/Chris-Prosser/pen/PoXxQoB

@igi-chris
Copy link
Author

I can also correct the position on the original example (with a trace per cluster) by removing the opacity from the markers, here is a multi-trace example working: https://codepen.io/Chris-Prosser/pen/RwEqyaG

It seems like the answer for now is don't use opacity on the 3d plots!

@alexcjohnson
Copy link
Collaborator

Thanks @igi-chris - apologies for not noticing this issue earlier, but yes, it's a known issue that we don't handle depth correctly with opacity in 3D #1267 (and other trace types too, eg #3243) - closing since the problem is covered in other issues.

To the best of our knowledge there's no order-independent transparency algorithm with anywhere near the performance we have for opaque objects, so this would require a very different approach.

@alexcjohnson alexcjohnson closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants