Jump to content

use point attribs in volume


Recommended Posts

easiest way is to use point cloud functions in your shader to read the points and get the average Cd in a radius, then use that as your volume color. if you need the colors in SOPs, it's more or less the same thing... pcopen() and pcfilter() in a volume wrangle to get the average P within a radius, then bind that to a Cd vector volume. just have to create the volume in advance, before the wrangle.

  • Thanks 1
Link to comment
Share on other sites

On 2018-07-19 at 3:57 PM, toadstorm said:

easiest way is to use point cloud functions in your shader to read the points and get the average Cd in a radius, then use that as your volume color. if you need the colors in SOPs, it's more or less the same thing... pcopen() and pcfilter() in a volume wrangle to get the average P within a radius, then bind that to a Cd vector volume. just have to create the volume in advance, before the wrangle.

@toadstorm any chance you can provide a simple example file? I thought I had it working but I was to quick on that one.

 

Thanks in advance

Edited by Jesper Rahlff
Link to comment
Share on other sites

On 2018-07-24 at 2:22 AM, adrianr said:

@Jesper Rahlff Here you go. Sops and Shader versions inside.

volume_pc_colour_01.hip

thanks so much man. appreciate the help

Interestingly enough I cannot get this to work with VDBs. Volumes work fine, but VDBs not so much

Edited by Jesper Rahlff
Link to comment
Share on other sites

@Jesper Rahlff Here is the file with VDBs, nothing really different. Is there a specific issue you're having with your scene you could share? 

I've popped in an example using the bunny from http://www.openvdb.org/download/ too so just download it from there if you want to see that. bunny_cloud.vdb is the file, top right.

volume_pc_colour_02.hip

Link to comment
Share on other sites

I think the issue was that I was creating the Cd volume with the VDB node. using a volume node and converting that to VDB works fine.

anyhow, I ended up expanding on your shader approach and used that. Was perfect for what I needed to do.

Cheers for your time mate

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...