Jump to content

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
Link to comment
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

Link to comment
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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...