-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Axes3D voxels with alpha rendered wrong -- surfaces seem to cancel #9745
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
a simpler test dataset exhibiting the same behavior is
notebooks are attached https://github.com/lukasheinrich/code-snippets/blob/master/voxels.ipynb |
Crossref #9559? |
no, this is different. The implementation drops faces for adjoining voxels. Perhaps we can make this optional? |
@WeatherGod yes that would be great. the internal faces are important if you want to do a 3d heatmap/ density plot. |
I am putting together a PR for this feature (and might have found a bug in the original implementation, too), but I can't think of a good kwarg name for this. Any ideas? |
maybe |
Would |
to me http://meshlabstuff.blogspot.ch/2009/04/how-to-remove-internal-faces-with.html |
ok, |
just following up, what's the status on this -- anyways we can contribute? |
Ah, yeah, I got it to partly work, but could only get 5 of the 6 faces to
get made for some reason. Then I ran out of time to work on it. How about I
push up my branch and set up a WIP PR so you can try it out and see what I
did wrong?
…On Mon, Dec 4, 2017 at 12:16 PM, Lukas ***@***.***> wrote:
just following up, what's the status on this -- anyways we can contribute?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9745 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-N-R_s4ihioQdJEc_rL3Grp2ly7Rks5s9CjtgaJpZM4QaFJl>
.
|
@lukasheinrich , the PR is #9927 |
This was a deliberate decision in #6404, but it wasn't a principled one. There was a choice between
(1) could be fixed by drawing one-sided patches, but I'm not sure if matplotlib supports that. (2) was more work that I was willing to invest for my problem (alpha was an afterthought), so I thought I'd leave it to someone more opinionated. (3) was easy, so I went with it! |
Note that you can use the approach here to force the culled faces to render, as well as avoiding z-fighting issues: |
@eric-wieser yeah I saw that example, but it seems like a lot of bookkeeping/data-shuffling for a result that (to me) seems like a natural expectation. Would people still be interested in the work started in #9927 ? |
I don't think #9927 is a good solution, because it overdraws two polygons of different colors in exactly the same spot |
I do like the gapped look from the example you posted. Maybe this would be a good fit (perhaps with a adjustable |
That might be reasonable, with |
Hi, Any progress on this? I was surprised to end up with something like this (where the two middle voxels are the same color): If not, I might be interested in trying to work out the color blending based on https://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending Thanks!! |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Bug report
Bug summary
The shading of the voxels when using alpha looks off, when they overlap, shades seem to cancel each other out.
Code for reproduction
Actual outcome
Expected outcome
GIven the data source, I would have expected a result more like this, which was produced with the code found at
http://stackoverflow.com/questions/30715083/python-plotting-a-wireframe-3d-cuboid?noredirect=1&lq=1
Matplotlib version
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inlineThe text was updated successfully, but these errors were encountered: