feresteanud Posted May 29, 2015 Share Posted May 29, 2015 (edited) Hi I am trying to create some objects (spheres) falling and on contact with the ground I want to bounce based on their size. Each individual object should have its own bounce value based on its size. The smaller objects to bounce less and bigger ones to bounce more, or the other way around. I do not want Houdini to take control over it. Is there a way we can achieve this? I have attached a scene file (with only two spheres, one big and one small) if somone of you has time to have a look and help me. Thank you very much. custom bounce.hipnc Edited May 29, 2015 by feresteanud Quote Link to comment Share on other sites More sharing options...
H2O Posted May 29, 2015 Share Posted May 29, 2015 Hi You can drive the bounce configuration of each RBD Object with a "point( )" expression who allows you to keep back a point attribut from SOP to DOP. So you can use the measure node to calculate the area of each object in SOP, then promote de result (primitive) to point and finally keep back this attribut in DOP. Maybe not the best way but it's a first one Here is your scene fixed with this method cheers custom bounce_fixed.hipnc Quote Link to comment Share on other sites More sharing options...
feresteanud Posted May 29, 2015 Author Share Posted May 29, 2015 Thank you very much for the fast reply and for the solution. It works the way I wanted. One more dumb question, $OBJ referes to object? Quote Link to comment Share on other sites More sharing options...
H2O Posted May 29, 2015 Share Posted May 29, 2015 Yes it refers to object. Here is the expression from Houdini Help: point(surface_node, point_number, attribute, index) The way I understand the $OBJ instead of "point_number" is that you just keep back only one value per object. In this case I used a primitive sphere to calculate the area (so I had only one value). But if you use a polygonal object to calulate the area you 'll have one value for each primitive (and then for each point). The point expression with $OBJ (in DOPs) will take only the value of point 0. I'm not sure to be really clear with this ahah! So tell me if you're understand Quote Link to comment Share on other sites More sharing options...
feresteanud Posted May 29, 2015 Author Share Posted May 29, 2015 Ok, I think that at this point is clear. Have to use point expression more and then it is going to be much more clear. Thank you again. Cheers 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.