sadhu Posted September 10, 2012 Share Posted September 10, 2012 (edited) Hello friends. I was studying bridge collapse help file and trying to understand the way apply relationship dop works. I have a very simple setup, one big box and small boxes are placed on top of this big box (pls refer file). Instead of pin constraining each small box to a big box manually, I want to use apply relationship dop. I tried but failed.Position of the constraint should be centroid of the face of each small box touching the big box. I think the problem is setting the values of $AFFECTORID and $AFFECTEDID. Can someone please help me understand where am I going wrong. Thanks. apply_relationship_dop_and_Constraint.hipnc Edited September 10, 2012 by sadhu Quote Link to comment Share on other sites More sharing options...
sadhu Posted September 11, 2012 Author Share Posted September 11, 2012 (edited) It seems that setting the activation value in apply relation dop equal to 1(default) has solved the problem, It gives constraints equal to total affected objects. set AFFECTORID == $AFFECTORID and AFFECTEDID == $AFFECTEDID. Next job is simple, to position them using proper bbox value. Edited September 11, 2012 by sadhu Quote Link to comment Share on other sites More sharing options...
jalfort Posted March 31, 2013 Share Posted March 31, 2013 Hi, I'm wondering if you guys solved this. I'm dissecting the bridge example that comes with Houdini (collapsing bridge) and I'm trying to make 6 cubes and find the bounding boxes like the bridge example but it's not working. I would be grateful if someone can look at the file and tell me whats wrong. I'm really stuck. RBD_applyRel_PinConst.hip Quote Link to comment Share on other sites More sharing options...
sadhu Posted April 1, 2013 Author Share Posted April 1, 2013 (edited) Hi John, Not able to upload the file now, will upload it little later. Try following things in your setup and it will start working. 1)Remove transform info at obj level on box object and apply it at geometry level as we are using this info in bbox expression. In applyrel node Relation Type - Number of Relationships per object pair Affector and Affected obj - cube_* Activation - $AFFECTEDID + 1 == $AFFECTORID A = $AFFECTORID B = $AFFECTEDID In RBD Pin Constraint node Constrained Object - `stamp("../applyrel", "B", 0)` Goal Object - `stamp("../applyrel", "A", 0)` Constrained location Z and Goal location Z expression should be - (bbox(".:" + chs("group") + "/Geometry", D_ZMIN) + bbox(".:" + chs("goalgroup") + "/Geometry", D_ZMAX)) * 0.5 For Y use D_YMIN and D_YMAX (bbox(".:" + chs("group") + "/Geometry", D_YMIN) + bbox(".:" + chs("goalgroup") + "/Geometry", D_YMAX)) * 0.5 Edited April 1, 2013 by sadhu Quote Link to comment Share on other sites More sharing options...
jalfort Posted April 1, 2013 Share Posted April 1, 2013 @sadhu Thank you so much, that was the problem. Worked out when I worked in object level! You can check out the new scene here...sort of a hanging bridge hehe I've been sitting with that bridge collapsing scene for 2 whole days trying to figure out what I did wrong! Uhm a question though: (bbox(".:" + chs("group") + "/Geometry", D_ZMIN) + bbox(".:" + chs("goalgroup") + "/Geometry", D_ZMAX)) * 0.5 Could you explain a bit of whats really going on here? ".:" - means current node? "chs+("group") - I'm thinking it's taking the current primitive group name which is pointed to the AFFECTEDID which is going through the various cubes. "/Geometry" - looking at the geometry dimensions but, how did you figure this out? Couldn't find it under expressions nor variables in the help. I also looked at the details view and parameters to try to find out where it's getting the bbox size info but I could find anything? "D_ZMIN" - is obviously dimension z minimum right? So if you can give me some kind of info on the "/Geometry" that would be great. Or is it better to just accept the expression and move on? I do understand the concatenation and how it builds up the path . Anyway, again, thank you so much! RBD_applyRel_PinConst_01.hip Quote Link to comment Share on other sites More sharing options...
sadhu Posted April 1, 2013 Author Share Posted April 1, 2013 bbox("Address of Geometry", Info you want - D_XMAX / D_XMIN / D_XSIZE...) rbd object has different subdata attached to it, refer detail view. Forces, Position, Geometry ....etc Out of this, we are interested in Geometry subdata ".:"+chs("group") will out put rbd object name -> cube_1 , cube_2, cube_3.... when you add "/Geometry", expression will look like "cube_1/Geometry" So what this expression doing is going to Geometry subdata of the rigid body object, this forms the first input of the bbox expression. bbox expression calculates D_XMIN / MAX, you will not find this in details view. it is not stored there under the name D_MIN / D_MAX but this expression calculates it for the given Geometry. Quote Link to comment Share on other sites More sharing options...
jalfort Posted April 1, 2013 Share Posted April 1, 2013 Thank you for the very detailed explanation sadhu. Expression are what scares me most in Houdini since I'm coming form Max. This has been a big help. Thank you very much once again. Now to start doing some fun testing 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.