mr_stiff Posted September 9, 2015 Share Posted September 9, 2015 (edited) Hi there, I'm a very junior VFX artist, and new to houdini - and in need of some help. I have a point cloud out of a popnet, which i want to run through a attribwrangle, to adjust the density of points that have less than n neighbours. I have the attribute numproximity, and I want to reduce the density of points with less than 500 neighbours down by 20% per frame. this is what i came up with with my limited knowledge: if (@numproximity <= 500); @density = density * 0.2 which of course is not working since it .a. does not work, and .b. would reduce the density of all points (I think). Any help will be much appreciated! No help at all? How about an alternative solution? Edited September 10, 2015 by mr_stiff Quote Link to comment Share on other sites More sharing options...
ranxerox Posted September 15, 2015 Share Posted September 15, 2015 are you running this in SOPS or DOPS ? If you are running this in SOPS then what you have here won't animate, as SOPS is not aware of time (ie. each frame is independant of previous frames). In DOPS if you have the numproximity attribute on your particles and a density attribute, you could lower the density attribute on your particles each time the wrangle cooks with code similiar to what you have: if(@numproximity <= 500)){ @density *= 0.8; } in SOPS it's a little more tricky because the state at which numproximity crosses the threshold could change. So if you wanted to do it post sim you should look into using a solver sop (which is just a DOPNET wrapped inside an otl for SOPS). -G Hi there, I'm a very junior VFX artist, and new to houdini - and in need of some help. I have a point cloud out of a popnet, which i want to run through a attribwrangle, to adjust the density of points that have less than n neighbours. I have the attribute numproximity, and I want to reduce the density of points with less than 500 neighbours down by 20% per frame. this is what i came up with with my limited knowledge: if (@numproximity <= 500); @density = density * 0.2 which of course is not working since it .a. does not work, and .b. would reduce the density of all points (I think). Any help will be much appreciated! No help at all? How about an alternative solution? Quote Link to comment Share on other sites More sharing options...
ranxerox Posted September 15, 2015 Share Posted September 15, 2015 there is a nice example of animating point attributes with a sop solver in this thread which Tomas provided.: http://forums.odforce.net/topic/23623-changing-attributes-on-points-that-are-changing/ -G are you running this in SOPS or DOPS ? If you are running this in SOPS then what you have here won't animate, as SOPS is not aware of time (ie. each frame is independant of previous frames). In DOPS if you have the numproximity attribute on your particles and a density attribute, you could lower the density attribute on your particles each time the wrangle cooks with code similiar to what you have: if(@numproximity <= 500)){ @density *= 0.8; } in SOPS it's a little more tricky because the state at which numproximity crosses the threshold could change. So if you wanted to do it post sim you should look into using a solver sop (which is just a DOPNET wrapped inside an otl for SOPS). -G 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.