Nicholas Yiallouris Posted December 16, 2013 Share Posted December 16, 2013 I have a RBD and I'm trying to set some fractures active and the others passive but I cant access the point attributes in a packed primitive without unpacking it. In my setup I have a foreach node but I cant access each primitive so that I can run the loop. Is this possible or should I set up an unpacked RBD? Access_PackedPrims.hip Quote Link to comment Share on other sites More sharing options...
anim Posted December 16, 2013 Share Posted December 16, 2013 http://www.sidefx.com/index.php?option=com_content&task=view&id=2622&Itemid=132 from 17min Cameron is talking about difference between RBD objects and Packed RBD object and how to control them by modifying point attributes Quote Link to comment Share on other sites More sharing options...
Nicholas Yiallouris Posted December 16, 2013 Author Share Posted December 16, 2013 (edited) Thanks, I've just got my mind around Houdini's Syntax and now with H13 there's quite a bit more VEX snippets with the Wrangle SOP which I'm learning right now. In Cameron's setup he uses a "simple" frame activation but I'm looking to access the pieces that are close to a static object and make those inactive (like my file). I'm sure it can be done with a wrangle but I haven no idea where to start. Edited December 16, 2013 by NicY Quote Link to comment Share on other sites More sharing options...
anim Posted December 17, 2013 Share Posted December 17, 2013 packed primitives are represented as points so you don't have to unpack and foreach them to get the centroids, it will work without, but if you want to have just points instead of packed primitives so you can see the transferred color, just append AddSOP with Delete Geometry But Keep The Points and in the DOPs it's quite straightforward, look at the file you can even simplify it if you created integer attribute in sops to represent active value instead of storing it in color Access_PackedPrims_fix.hip 4 Quote Link to comment Share on other sites More sharing options...
Nicholas Yiallouris Posted December 17, 2013 Author Share Posted December 17, 2013 Thank You ! Quote Link to comment Share on other sites More sharing options...
kleer001 Posted January 29, 2014 Share Posted January 29, 2014 And another Thank YOU! From me. Saved my butt there Tomas Quote Link to comment Share on other sites More sharing options...
anoop Posted March 28, 2014 Share Posted March 28, 2014 thanks Thomas, saved my day Quote Link to comment Share on other sites More sharing options...
dennisvolkerts Posted October 17, 2014 Share Posted October 17, 2014 THNX! -And how to keep some fractured packed prim objects passive without any point colors? Are there any good point wrangle tutorials online to understand all those codes? Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 5, 2014 Share Posted November 5, 2014 -And how to keep some fractured packed prim objects passive without any point colors? You can create active attribute on those point at sop level and then in dops copy back active attribute to geometry inside sopsolver. Quote Link to comment Share on other sites More sharing options...
rayman Posted November 5, 2014 Share Posted November 5, 2014 Talking about active value - recently i did some tests (13.0.310) with high amount of objects - 50K for example. It turns out that if you change active value of objects over time there is a huge amount of time spent on Importing Data inside Bullet solver. So I had to hack it and used pointwrangle magic with mass attribute set to zero to simulate activation - much faster. Not sure if this is somehow improved in newer versions, but keep this in mind. Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 5, 2014 Share Posted November 5, 2014 So I had to hack it and used pointwrangle magic with mass attribute set to zero to simulate activation - much faster. Hi, Pav Could you share that magic code????? Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 5, 2014 Share Posted November 5, 2014 Talking about active value - recently i did some tests (13.0.310) with high amount of objects - 50K for example. It turns out that if you change active value of objects over time there is a huge amount of time spent on Importing Data inside Bullet solver. I also faced that. Quote Link to comment Share on other sites More sharing options...
rayman Posted November 5, 2014 Share Posted November 5, 2014 Well, its not so straightforward - I just checked it : mass to 0 produces the same importing data behaviour. What I actually did was a combination of several techniques - one solver to keep my pieces follow animated ones while they are still in simulated bullet environment, and another that "activates" them - that actually deactivated my solver per piece , so they started to fall. I hope H14 will fix this. Quote Link to comment Share on other sites More sharing options...
fencer Posted November 18, 2015 Share Posted November 18, 2015 trying this I'm loosing initial state velosity when active state is not first frame, any idea?*check file, use switch to see difference rbdpackedobject_activate.hip Quote Link to comment Share on other sites More sharing options...
rayman Posted November 18, 2015 Share Posted November 18, 2015 (edited) create static pieces instead of active. Put /obj/geo1/OUT_box as second input into popwrangle1 and change the code to this one: vector Cd = point(@OpInput1, "Cd", @ptnum); //activate piece and start active counter at each substep if(i@active==0&∫(Cd.x)!=0){ i@active = 1; i@act = 1; } //force vel more than one frame if(i@act>0&&i@act<=4){ vector vel = point(@OpInput2, "v", @ptnum); v@v += vel; i@act++; } Cheers! Edited November 18, 2015 by rayman 2 1 Quote Link to comment Share on other sites More sharing options...
fencer Posted November 19, 2015 Share Posted November 19, 2015 create static pieces instead of active. Put /obj/geo1/OUT_box as second input into popwrangle1 and change the code to this one: vector Cd = point(@OpInput1, "Cd", @ptnum); //activate piece and start active counter at each substep if(i@active==0&∫(Cd.x)!=0){ i@active = 1; i@act = 1; } //force vel more than one frame if(i@act>0&&i@act<=4){ vector vel = point(@OpInput2, "v", @ptnum); v@v += vel; i@act++; } Cheers! if(i@act>0&&i@act<=4){ niiiiice) big thanks rayman Quote Link to comment Share on other sites More sharing options...
XanaduArt Posted December 14, 2017 Share Posted December 14, 2017 On 2015/11/18 at 10:21 PM, fencer said: trying this I'm loosing initial state velosity when active state is not first frame, any idea? *check file, use switch to see difference rbdpackedobject_activate.hip Thank you very much bro. Saved me. 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.