Noob looking for help working with VDB file containing RGBA data
#1
Hello,  

 I have a VDB file that contains XYZ position and RGBA values of scanned science data.  I want to import this into TYflow and create a particle system where each location is a particle of that color. So i end up with a cloud of multicolored particles based on the science data. In this case it's brain tissue from a stack of Tiff images. When I go to load in the VDB file it takes a while so it seems like it's doing something, but I can't see anything in the end result.  

I'm using BirthVDB to import the VDB file. 

When I look at the data channels there a 4 grids: 

 ChannelR 
 ChannelG
 ChannelB 
 ChannelA 

 Do I need to combine the RGB into a single channel and use that for the UVW?  

 I've been looking all over but can't find a tutorial or forum thread that helps me understand this use case for VDBs.  

 I'm on a tight timeline to figure this out for this project so any assistance would be greatly appreaciated.  

I can also get the data as X,Y,Z and color values as a text file - is there a way to ingest this into TY flow to create a particle of each color as each coordinate?

 Thanks, 

 James
  Reply
#2
Hmm, there's not really a way to do per-voxel particle sampling like that using tyFlow's VDB operators.

The closest alternative would be doing something like loading the VDB data into a fluid containing (Ex: a PhoenixFD grid container), then sampling the values using a Fluid Properties operator. However, it expects RGB data to be stored in a single vector, so even then you might not be able to achieve the effect you want without first doing some channel conversions to combine your separate RGB channels into a single one...
  Reply
#3
The closest I got so far to a solution was exporting the point cloud as geometry and using position particle by verts, but I only get the vertices and not the color.
   

 I was able to import the data as a PLY file into a point cloud object in Max.  Is there a way to grab the color data from the point cloud to apply to the particles I have in my object based TY Flow? 
   

  Getting the proper color assignment to the particles is the last step to what I'm trying to achieve as it represents scanned scientific data.  Would be a super helpful tool to be able to import this into TY flow for scientific visualizations.  The point cloud viewer is pretty limited and TY flow would give me way more options to work with. 

Thanks, 
   
  Reply


Forum Jump: