Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Trouble tweaking density based on color values. #81

Closed
pierrejacquet opened this issue May 4, 2023 · 3 comments
Closed

Trouble tweaking density based on color values. #81

pierrejacquet opened this issue May 4, 2023 · 3 comments

Comments

@pierrejacquet
Copy link

Hello,

First of all, thank you for this amazing plugin, it is really great. I write an issue but I'm sure it's more a need for help. I'm rendering a DICOM (scanner) file through VTK and exporting it to VDB format. All great. But then I would like to tweak the local density based on colors in unreal as I would do in VTK (by adjusting the alpha values). But I'm not sure how to do.

To give a more concrete example. I have a tissue of a patient with muscle, bone and flesh all with different color and density. I would like to make muscle (blue color) for example to disapear. How can I do this. Is it possible ?

I already checked all the issues to see if there is an answer but I didn't find the answer (or I didn't understood). I messed around materials but can't get the result i need.

Thanks :)

@thilamb
Copy link
Contributor

thilamb commented May 4, 2023

Hello and thanks for the kind words !

I don't think you can do this with the current state of the plugin.

If you have any programming knowledge, it wouldn't be too difficult to adapt the HLSL shader to make it work like you want.

Sorry and good luck !

@pierrejacquet
Copy link
Author

Ok thank you for the answer. Keep up the good work !

@Andrej730
Copy link

I think you can do it but you need to use a bit different pipeline.
In the example level that comes with plugin there is example for rendering VDB to Volume Texture and drawing it in the world as Unreal volumetric clouds (BP_VdbToVolumetricClouds actor involved).

So, what you can do:

  1. Render vdb1 with density to volume texture and then sample it with BP_VdbToVolumetricClouds
  2. Render vdb2 with vdb colors to volume texture (I assume here that your colors are also packed in the vdb)
  3. Sample second vdb in the BP_VdbToVolumetricClouds clouds shader and use it as mask to tweak vdb1 density

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

No branches or pull requests

3 participants