Jump to content
feresteanud

Bounce property base on objects size

Recommended Posts

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 by feresteanud

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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  ^_^:P

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×