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

Gaps in volume rendering, as if the data had slices missing in the z-dimension #188

Open
GenevieveBuckley opened this issue Oct 4, 2018 · 4 comments
Labels

Comments

@GenevieveBuckley
Copy link
Contributor

I've noticed that the volume rendering often produces strange gaps, almost like there are z-slices missing from datasets (example pictures below). There are definitely no 'missing parts' to the data, and it looks fine in other 3D volume renderers, like the Fiji/ImageJ 3D volume viewer.

I wansn't able to reproduce this behaviour with the aquarius dataset, or when using volshow with a smaller cubic shaped piece of the data in the pictures below. My suspicion is that it's something to do with the shape of the data (101, 206, 250) and that perhaps _cube_to_tiles doesn't handle joining tiles in z very well?

screen shot 2018-10-04 at 5 04 02 pm

screen shot 2018-10-04 at 5 08 21 pm

screen shot 2018-10-04 at 5 04 11 pm

@maartenbreddels
Copy link
Collaborator

I'm afraid this is a bug in the shader implementation of floor/ceil etc. I've spend some time on this, and I think the best way forward would be to go for WebGL2, losing iOS/Safari support.

@griffinmilsap
Copy link

I found that changing the memorder kwarg from 'C' to 'F' fixed this for me

@valkenburgtdh
Copy link

Based on

My suspicion is that it's something to do with the shape of the data (101, 206, 250)

I looked for the effect of fixing the sizes to certain factors. In my case, fixing the size of each dimension to be an integer multiple of 16, removes the gaps. See the images, twice the same plane of identical data, once sampled at shape (76, 146), with gap artefacts, and once sampled at shape (80, 160), without the gap artefacts.

ipyvolume
ipyvolume (1)

@nvaytet
Copy link

nvaytet commented Dec 1, 2019

plotly has an interesting approach to volume rendering where they use several transparent isosurfaces to create the volume feel.

I find it actually works very well and seems to be mostly free from the artifacts such as the above example that are often seen in volume renderings. It seems that transparent surfaces are obtainable in ipyvolume (see #56 ).

However, having many transparent isosurfaces might cause a drop in performance, compared to the default volume rendering? I have not had the chance to try and plot 20 isosurfaces, yet.

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

No branches or pull requests

5 participants