Jesper Rahlff Posted July 19, 2018 Share Posted July 19, 2018 Hi guys. I am trying to utilize my point attribs in a volume. how can I: - set the volume color (shade the volume) using my point color? - when volume is created, get it to read already set density values on the points. (volume rasterize). attached is an example file. cheers colortovolume.hiplc Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted July 19, 2018 Author Share Posted July 19, 2018 I solved the density problem, by simply bind the density inside the volume rasterize vop and multiplying it against incoming density. now only thing left is to solve how to get my volume colorized according to my particles Quote Link to comment Share on other sites More sharing options...
toadstorm Posted July 19, 2018 Share Posted July 19, 2018 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. 1 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted July 20, 2018 Author Share Posted July 20, 2018 Thanks Henry. That did the trick. Exactly what I was looking for. Appreciate you taking the time to reply. Cheers Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted July 24, 2018 Author Share Posted July 24, 2018 (edited) 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 July 24, 2018 by Jesper Rahlff Quote Link to comment Share on other sites More sharing options...
adrianr Posted July 24, 2018 Share Posted July 24, 2018 @Jesper Rahlff Here you go. Sops and Shader versions inside. volume_pc_colour_01.hip 2 1 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted July 25, 2018 Author Share Posted July 25, 2018 (edited) 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 July 25, 2018 by Jesper Rahlff Quote Link to comment Share on other sites More sharing options...
adrianr Posted July 26, 2018 Share Posted July 26, 2018 @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 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted July 26, 2018 Author Share Posted July 26, 2018 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.