roberttt Posted August 4, 2018 Share Posted August 4, 2018 Hi, I just want to create different strength values in glue constraint but i could not understand that how i can set this cd up for my glue strength. here is my reference https://letshoudini.wordpress.com/2016/09/18/037-earthquake-building-collapse-rd-01/ and my hip file. cd_constraint.hipnc Quote Link to comment Share on other sites More sharing options...
3dome Posted August 5, 2018 Share Posted August 5, 2018 f@strength = @Cd.x; 1 Quote Link to comment Share on other sites More sharing options...
char Posted August 10, 2018 Share Posted August 10, 2018 (edited) I was doing a similar thing not that long ago. I promoted the Cd attribute from point to primitive and used a PRIMITIVE Wrangle to set up my constraint attributes (which I'm guessing you missed as I can see the @strength in your POINT attributes). As mentioned above when Cd is on primitives just add a Prim Wrangle and do the following f@strength = @Cd.x. In my example I just used a paint node, used red and green color, painted areas where I wanted the glue to be strong and areas where I wanted it to break easier then did an IF statement in a wrangle just checking for the color on the primitive and if it was green = strength 1000, if red = strength 10. Edited August 10, 2018 by char formatting 1 Quote Link to comment Share on other sites More sharing options...
roberttt Posted August 10, 2018 Author Share Posted August 10, 2018 thanks guys. Quote Link to comment Share on other sites More sharing options...
roberttt Posted August 10, 2018 Author Share Posted August 10, 2018 9 hours ago, char said: I was doing a similar thing not that long ago. I promoted the Cd attribute from point to primitive and used a PRIMITIVE Wrangle to set up my constraint attributes (which I'm guessing you missed as I can see the @strength in your POINT attributes). As mentioned above when Cd is on primitives just add a Prim Wrangle and do the following f@strength = @Cd.x. In my example I just used a paint node, used red and green color, painted areas where I wanted the glue to be strong and areas where I wanted it to break easier then did an IF statement in a wrangle just checking for the color on the primitive and if it was green = strength 1000, if red = strength 10. Thanks Char, by the way how can i write that expression you mentioned above like your your example because i am new in houdini little bit. Quote Link to comment Share on other sites More sharing options...
char Posted August 13, 2018 Share Posted August 13, 2018 The way I used it was in a Primitive Wrangle. if(@Cd.r > 0.1){ s@constraint_name = "Glue"; @strength = 1000; } else s@constraint_name = "Hard"; Obviously this was using Red and Green color to set it up initially. There might be several ways to achieve it, but for what I was testing, it worked. 1 Quote Link to comment Share on other sites More sharing options...
roberttt Posted August 14, 2018 Author Share Posted August 14, 2018 On 2018-08-13 at 3:08 AM, char said: The way I used it was in a Primitive Wrangle. if(@Cd.r > 0.1){ s@constraint_name = "Glue"; @strength = 1000; } else s@constraint_name = "Hard"; Obviously this was using Red and Green color to set it up initially. There might be several ways to achieve it, but for what I was testing, it worked. thanks Char 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.