whodini Posted January 3, 2013 Share Posted January 3, 2013 Would it be possible to have a sphere primitive or any geometry affect the density of a volume (fade density from 0 to 1) based on distance between the geometry's pivot (or all points) and the volume? Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted January 3, 2013 Share Posted January 3, 2013 Long story short, yes. There many ways, some better than others. If you can explain the context it would help to make an example that would be meaningful to your workflow. Quote Link to comment Share on other sites More sharing options...
whodini Posted January 3, 2013 Author Share Posted January 3, 2013 (edited) Thanks for replying, I just whipped up a diagram on my phone (excuse the poor handwriting) but this is what I am trying to achieve. Let A be the volume I want to affect, and let B represent an object (either geometry or volume) placed close to A. I'm trying to do something like an attribute transfer but with volume density, in this order: copy density from B to A with a given distance threshold. Edited January 3, 2013 by rhussain Quote Link to comment Share on other sites More sharing options...
tjeeds Posted January 3, 2013 Share Posted January 3, 2013 Here's a way to do it using 2 volumes. The key is to pad the volume that you want to use for falloff by the distance over which density will be affected, otherwise when you sample outside the bounding box you get a distance to the bounding box itself plus the distance to it's center (I think). Be careful plugging in large objects as the volume resolution is set to By Size in order to account for changes in padding. Another approach might be to convert all voxels to points with a density attribute, use a Ray Sop to get the minimum distance and then sample the points back to a volume. This would save the step of converting the affecting object into an SDF and might be beneficial if you have a very large distance relative to voxel size. Might. densityFalloffFromGeo.hip 2 Quote Link to comment Share on other sites More sharing options...
whodini Posted January 4, 2013 Author Share Posted January 4, 2013 thanks a lot for all the help. Your scene file was extremely useful, I like that approach a lot, it works well. Quote Link to comment Share on other sites More sharing options...
anim Posted January 5, 2013 Share Posted January 5, 2013 if you want to fade just by distance to points, you can sample pointcloud from within volume vop, therefore you will avoid converting collision object to volume volume_fade_near_points.hipnc 2 Quote Link to comment Share on other sites More sharing options...
tutumannyaque Posted February 24, 2017 Share Posted February 24, 2017 On 1/4/2013 at 9:09 PM, anim said: if you want to fade just by distance to points, you can sample pointcloud from within volume vop, therefore you will avoid converting collision object to volume volume_fade_near_points.hipnc Thank you so much anim! Your technique works perfectly. Quote Link to comment Share on other sites More sharing options...
x0z79592 Posted May 5, 2020 Share Posted May 5, 2020 On 1/5/2013 at 10:09 AM, anim said: if you want to fade just by distance to points, you can sample pointcloud from within volume vop, therefore you will avoid converting collision object to volume volume_fade_near_points.hipnc Hi, I can't find any help document about old for loop VOP. Can you kindly update your hip? Or please give me some link for tips? Quote Link to comment Share on other sites More sharing options...
anim Posted May 5, 2020 Share Posted May 5, 2020 1 hour ago, x0z79592 said: Can you kindly update your hip? Or please give me some link for tips? wow, this is old here is H18 version, you can directly query closest surface (minpos()) or closest point (nearpoint()) so no need for loops volume_fade_near_points_h18.hipnc 1 Quote Link to comment Share on other sites More sharing options...
x0z79592 Posted May 5, 2020 Share Posted May 5, 2020 (edited) On 5/5/2020 at 12:18 PM, anim said: wow, this is old here is H18 version, you can directly query closest surface (minpos()) or closest point (nearpoint()) so no need for loops volume_fade_near_points_h18.hipnc EDITED:wtf my comment was replaced to a porn site link by someone. Edited July 16, 2020 by x0z79592 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.