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

Only a selected slice in Render mode #35

Closed
hvdrosa opened this issue Jan 2, 2024 · 4 comments
Closed

Only a selected slice in Render mode #35

hvdrosa opened this issue Jan 2, 2024 · 4 comments

Comments

@hvdrosa
Copy link

hvdrosa commented Jan 2, 2024

Hi Oane!

Amazing package! It also works with our cryoET data despite it being intrinsically noisy! (I had some minor issues with LZW compressed TIFs, but it worked nicely for non-compressed ones. I guess it's only a matter of some additional libraries I was missing to be able to read it).

I wanted to ask if you have implemented (or know) an easy solution to display and render only one selected slice (as one would do in the Data> Viewport display > Slice)
image

The issue is that whenever I go to render/shading mode, it displays the full volume and not only the selected slice (as in viewport)
image.

Best,
Higor

@oanegros
Copy link
Owner

oanegros commented Jan 3, 2024

Hi Higor!

Slicing is possible in the shader by setting the Density/Emission to 0 (or giving no shader) dependent on the Position of the voxel:

And here you can insert more complicated math if you want to slice differently.
This does not flush the unused voxels from RAM, currently.

In the future i would like to still make a dedicated slicing node maybe? But maybe this is more fun if you can actually do arbitrary slicing with another geometry (i.e. a combined masking/slicing node), but this requires a bit more advanced volume nodes than we currently have.

One other thing i've seen people with EM data do when slicing, is set the density very high (or volumetric Max Bounces low) and also pipe the voxel data to the Color

@oanegros oanegros closed this as completed Jan 3, 2024
@oanegros oanegros reopened this Jan 3, 2024
@oanegros
Copy link
Owner

oanegros commented Jan 3, 2024

Could you also send me the output you get in the Scripting tab when trying to open LZW tifs?
I think this should be supported with tifffile

@hvdrosa
Copy link
Author

hvdrosa commented Jan 3, 2024

Hi Oane,

Thanks a lot for the tip on slicing with shaders! I'll try this soon and I'll get back to you!
Here it's the output when trying to load the LZW compressed tiffs. It seems I'm missing the imagecodecs package required for tiffile to be able to read. (I've tried to install it using the console, but even after this, it's not working... It might also be an issue during my compression that somehow is disabling tiffile to read it)

Anyway, I'm fine loading without compressing them, but I just want to highlight this here in case another person faces the same issue, or if you want to provide a solution for this.
image

Thanks again for the prompt message! :)
Best,
Higor

@oanegros
Copy link
Owner

oanegros commented Jan 3, 2024

Moved this to a new issue for supporting more image formats :)

@oanegros oanegros closed this as completed Jan 3, 2024
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