Pirminus Posted December 2, 2015 Share Posted December 2, 2015 Hi odforce! I got really stuck with this so I would need some help from you guys! I have 3 different imported geometrys from Maya that I would like to stamp randomly along a grid. So far so good. Now I would like to delete randomly a group of faces(I already created a group node before the copy-sop) from each of the stamps. My approach was a group node and an attribute create node to create an atrribute(0 or 1, for not delete or delete). After the copy node I put down an attribute wrangle node to give the attribute I created a random value(0 or 1). Next was a delete node set to the group with an expression which looked like @attribute1 == 0 Everything seems fine but there is just one Problem... The attribute wrangle node puts the exact same random number in all the attributes for all stamps. So its either delete those faces or not. It seems pretty straightforward but I can't figure out how to give each group of The stamp a random attribute.... I would really appreciate some help Kind regards Pirmin 1 Quote Link to comment Share on other sites More sharing options...
mestela Posted December 2, 2015 Share Posted December 2, 2015 You could stamp the seed attribute on the wrangle, that'll give you a different result per copy. Not in front of Houdini right now, but something like this for the vex code: @myrand = rand(@ptnum, ch('seed')); Click the plug icon to make the channel, then this hscript expression in the channel to link it to your stamped attribute: stamp("../copy1", "myseed",0) And ensure you're exporting 'myseed' as a stamped attribute on your copy node. Quote Link to comment Share on other sites More sharing options...
mestela Posted December 2, 2015 Share Posted December 2, 2015 Example! Performance isn't great, but does what it says on the tin. stamped_random_delete.hip 2 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.