Skip to content

[FEATURE]: Add scene.oit to blend translucent scatter3d markers by depth #8230

Backlog

Description

@katosh

Description

On upstream main, translucent scatter3d markers blend in the order of the draws, not by depth. The last trace lies on top from every camera angle, even where its markers sit behind the others (#1267, and the closed duplicate #6536). Inside one trace, the order of the points decides in the same way.

We propose scene.oit with the values 'off' (default) and 'auto'. With 'auto', the scene draws translucent markers with order-independent transparency. Each fragment adds its optical depth to a few depth nodes of its pixel. A second pass weights each color by the transmittance in front of it. Every draw adds, so the order of the draws has no effect, and nothing sorts.

Why should this feature be added?

Translucent markers are the usual way to show density in a large point cloud. Today, what shows in front depends on the order of the traces, not on the camera. A reader cannot tell which group lies in front.

AnnZarro, a viewer for single-cell data, motivates this request.

Mocks/Designs

Two linked rings of translucent points: in trace order on the left, by depth on the right

Two linked rings of translucent points, red drawn first. Left, upstream main: blue covers red at the two crossings. Right, the intended result: each ring lies in front at one crossing.

Notes

  • The change needs changes in gl-plot3d (the render passes) and gl-scatter3d (the marker shaders). We would open pull requests there together with the plotly.js pull request, and pin the fork commits until a release of the two packages.
  • The maintainer archmoj worked on this problem before: the gl-plot3d branch gl3d-blend-rebase (2019) and the gl-scatter3d branch correct-transparency (2020). Thank you for that work.
  • A prototype: https://github.com/settylab/plotly.js/tree/pr/oit

This change is one part of a larger set for large point clouds in scatter3d and scattergl. We collected the set in a draft on our fork: settylab#11. To keep your queue small, we start with this one. We are happy to file issues for the other parts if they interest you.

We can adapt the name, or change the approach.

Contribution

  • I want to open a pull request for this issue after it gets the ready-for-pr label
  • I can review or test a pull request from someone else

Activity

  1. added
    feature
    on Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions