rgblues Posted August 24, 2016 Share Posted August 24, 2016 Hi! I'm doing a brick house destruction as my first real adventure in Houdini...without a tutorial So my problem goes like this: I painted in red the active bricks of a wall that I want to keep active for the sim. But eventually some faces stay black. Is there a way to check every points of each bricks and if some red is found on a brick, make the whole brick red so I can safely delete the black primitives without having holes in some of the bricks? I can wrangle something if there is already some red on the primitives, but I cant find out what to do if for example only one point has red and the rest is black... That would make my life easier since painting all faces with some red will be very time consuming and I have a bunch of walls to smash. Any kind of help would be very appreciated! PS. I've attached a simple example to make my problem obvious. bricks_with_holes.hipnc Quote Link to comment Share on other sites More sharing options...
mestela Posted August 24, 2016 Share Posted August 24, 2016 2 attribpromote sops is probably laziest way to do this: attribpromote, point to primitives, Cd, in maximum mode append a second attribpromote, prim to points, Cd, maximum mode again (tho it doesn't really matter) expand_color_to_prim.hip Quote Link to comment Share on other sites More sharing options...
rgblues Posted August 24, 2016 Author Share Posted August 24, 2016 (edited) 1 hour ago, mestela said: 2 attribpromote sops is probably laziest way to do this: attribpromote, point to primitives, Cd, in maximum mode append a second attribpromote, prim to points, Cd, maximum mode again (tho it doesn't really matter) expand_color_to_prim.hip Thanks for answering Matt! Btw, your site as been en invaluable ressource to get into Houdini!! The technic of adding attribute promotes works well for a simple box. Although if someone can check my scene, I get some strange behavior with the delete sop... Black bricks get deleted correctly but delete non selected with the same settings partially delete the red ones! Is this a bug or am I just newb-ing something wrong ? thanks for the help! check_the_delete_sop.hipnc Edited August 24, 2016 by rgblues Quote Link to comment Share on other sites More sharing options...
mestela Posted August 24, 2016 Share Posted August 24, 2016 You'll need to lock the first node so houdini bakes that geometry into that sop. Otherwise when we open it, it looks for 'L_A_Bricks.OBJ' on our machines, which we don't have. Quote Link to comment Share on other sites More sharing options...
rgblues Posted August 24, 2016 Author Share Posted August 24, 2016 Ah yeah thanks! Here it is again check_the_delete_sop.hipnc Quote Link to comment Share on other sites More sharing options...
rgblues Posted August 24, 2016 Author Share Posted August 24, 2016 arhh! Ok, never mind, I think my geo had some bad stuff in it...a clean sop and fuse fixed it Quote Link to comment Share on other sites More sharing options...
rgblues Posted August 25, 2016 Author Share Posted August 25, 2016 Still Need help, I'm banging my head on the original problem...or a solution that will scale up well with the complexity of the geometry. The technic proposed by mestela works well on cube or faces type stuff. But with complex geo it falls short. I did my best to come up with a solution but unfortunately my Houdini skills wont help me much :/ So let me explain again : I painted some red on a densely fractured object. I want to make sure that those pieces that have at least one red point on it, get totally painted with red. I want to simulate these using bullet. The idea behind it is that I can safely separate active pieces (in red) vs non active pieces without creating holes using a delete sop with @Cd.r == 1 Any piece of advice will be greatly appreciated! Thanks Quote Link to comment Share on other sites More sharing options...
Shinjipierre Posted August 26, 2016 Share Posted August 26, 2016 It would really help if you didn't have bricks on top of each other... anyway, here's an example, polysoup creates a polysoups per object after the connectivity check_the_delete_sop.hipnc Quote Link to comment Share on other sites More sharing options...
rgblues Posted August 26, 2016 Author Share Posted August 26, 2016 Goodness! indeed hehe, thanks for pointing it out! For some reason the File merge SOP had the Merge range second box set to 2 creating a double...glad you saw it. Well, the good news is that I found a solution to transfer the color from the bricks pattern to the fracture pieces. All I needed to do was packing the geometry of the mortar first and than transfer the color of the bricks to the points of the packed mortar fractured pieces. Since each point represent a piece of mortar, I can easily split the red from the black points then unpack. And voilà! Problem solved 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.