Skip to content
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

Support marker.opacity arrays in scatter3d #3138

Closed
alexcjohnson opened this issue Oct 22, 2018 · 5 comments
Closed

Support marker.opacity arrays in scatter3d #3138

alexcjohnson opened this issue Oct 22, 2018 · 5 comments
Labels
feature something new

Comments

@alexcjohnson
Copy link
Collaborator

So we can get rid of multiOpacityTransform
scatter3d traces already support a single-valued marker.opacity, and they support opacity as part of a marker.color array (which is what this transform makes use of) so it should be pretty easy to add this capability.

@etpinard
Copy link
Contributor

etpinard commented Oct 23, 2018

so it should be pretty easy to add this capability.

Not so fast. Mikola wasn't able to get this to work. The "opacity" in that multiOpacityTransform hack isn't "true" opacity. I don't remember the exact details, there should some info in old streambed issues.

@etpinard
Copy link
Contributor

Related: #1267

@alexcjohnson
Copy link
Collaborator Author

I had an idea about 3D opacity... curious if something like this has been tried before:

We oversample 3D scenes, right? This idea depends on oversampling, and may work better if we increase it. What if instead of trying to model the opacity independently within each pixel, we fill pixels pseudorandomly - ie at 50% opacity we just fill 50% of the pixels at full opacity. Then a point at a different Z value and still 50% opacity fills some different 50% of the pixels, and the depth buffer sorts out ordering just like it does with fully opaque items normally.

The result would be a bit speckled... but averaged over some area (hence the oversampling) it seems like it would look just like real partial opacity. The pseudorandom generator should be a pure function of screen position (x,y,z), but we may want to do something to give it greater uniformity in (x,y) than a real random distribution, to reduce speckle.

@archmoj do you think this sounds plausible?

@archmoj
Copy link
Contributor

archmoj commented Oct 25, 2018

Seems like a good idea @alexcjohnson
Let me think about it.

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

4 participants