How to Change Individual Voxel Cells

   2552   4   0
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
Hello,

I was wondering if anyone knew if it's possible to access the individual voxels that are generated from points put into a VDBfromparticles node.

I see looking at the spreadsheet that it's like the points get “used up” in the process of the conversion and there doesn't seem to be any ‘individual elements’ left to work on;

Like in the case of my file, wanting to set the color differently for each individual “bubble”.

I suspect it's not possible due to the nature of how the VDB is created and what it actually is.

The only other option I see is to set up something like this ‘manually’, by creating N number of individual VDB spheres.

No big deal…but would be nice to know if I could work with something like how I have set up in attached file.

Attachments:
Voxel Cell Size Change with age.hiplc (359.4 KB)

User Avatar
Member
8579 posts
Joined: July 2007
Offline
why don't you just change color on particles and then inherit that using VDB from particles Point Attributes multiparm?

you can as well sample color to volume using volumesample() and volumesamplev() from nearby points or using VolumeFromAttribute SOP
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
Hi Tomas,

Thanks for all the different option suggestions.

I haven't yet explored the vex volumesample functions yet but the other two give me odd results and I'm not sure what to do other than already trying a number of different settings for it.

I get no color in the scene view and the render result is like in this image (using multiparm of VDB from partictles):

Attachments:
VDBFromParticle_MultiParm_C.jpg (17.5 KB)
Voxel Cell Size Change with age.hiplc (358.0 KB)

User Avatar
Member
7794 posts
Joined: Sept. 2011
Online
Volume data is arbitrary. There is no expectation that some field means color, and another means something else. That is entirely left to the artist to determine when writing the shader. For the viewport, a volume visualize node is used to associate fields with specific visualization parameters, such as emission or diffuse color.
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
Not sure what you mean. All I know is that when I apply Cd after the VDB it shows up nicely in both viewport and render.

But when I use the multi-parm for Cd in the VDB from particles; Even though the Cd has been applied to points prior to the VDB, the multi-parm appears to be applying it to the primitive of the VDB ( of which there is only one, hence not being able to be applied to individual ‘bubbles’ ) - which to me is why it appears “odd”.

Pretty sure its just the nature of the beast; Voxel volumes is just an efficient algorithm for taking all the points given it and converting it the resulting volume that has the unique ‘bubble shapes and sizes’ based on point position and (in my case) pscale. Other attributes like Cd per point just aren't part of the “equation” to work as desired.
  • Quick Links