RBD angular velocity at an extra angle - how?

   6693   4   1
User Avatar
Member
12 posts
Joined: March 2019
Offline
Hello all,

I have a Rigid Body object that I want to fall while revolving around its own axis. This is done simply by giving it an angular velocity and letting it go.

Angle demonstrated here, even though you wouldn't use thin handle - just to illustrate what I have.


However, what I want is this stick to dip its nose while falling:


But if I rotate the stick, even from the RBD Object node controls, and then give it an angular velocity, the stick doesn't rotate around its z axis, it rotates around the global z axis.

I feel like this is such a trivial issue, but I can't figure out how to solve it. Any tips?

Thanks a lot.
User Avatar
Member
12 posts
Joined: March 2019
Offline
Two points:

- I have posted this to a wrong forum. Apologies, if mods decide to delete this so be it.

- The best way for me so far was to follow the procedure below. It's clunky but it's all I have:

1. Place the Rigid Body into your desired position (in this case, it's the Rotation that matters). Write down the values.
2. Use the transform handle in the viewport to “give” it a spin that you desire. You will have new values for Rotation.
3. Subtract the values to find the difference. Paste the old values back into the Rotation, and the difference into Angular Velocity.

This works but is kind of a pain to set up. I wonder if there's a cleaner way, maybe to do with the rotation order or transform/rotate/scale order. But if I experiment with that and get results I'll post here again.
User Avatar
Member
8532 posts
Joined: July 2007
Offline
You can define angular velocity v@w attribute on your packed RBD prior to DOPs, it will be used as initial angular velocity
v@w is in the form of axis angle vector where direction defines axis to spin about and length of the vector defines the angular speed

You can also attach simple file if you are looking for more than just verbal help
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
12 posts
Joined: March 2019
Offline
Thank you. I have looked into this, and soon found this VEX function: http://www.sidefx.com/docs/houdini/expressions/angvel.html [www.sidefx.com]
This solved my problem in no time.
angvel(rot1, rot2, time)
where rot1 would be the initial rotation attributes of your object in degrees, rot2 would be the desired rotation, and time is basically magnitude - the smaller the value the faster it gets there/the larger the velocity.
Hope this will come in handy for someone else too sometime.
Edited by DwarfVader - April 2, 2019 00:10:57
User Avatar
Member
678 posts
Joined: Feb. 2017
Offline
Hey Everybody,

I want to achieve something that is related to this threat. I want to control packed RBDs by corresponding points via @P and @orient.
The @P part is no problem as I can control the RBD position by targetv. But I don't know how to make them rotate into the orientation of @orient. I think targetw is the way, but I dont know how to set it up correctly. Any help is highly appreciated.

Cheers
CYTE
Edited by CYTE - Nov. 26, 2019 08:54:17

Attachments:
ParticleControlledRBD_V002.hiplc (322.6 KB)

  • Quick Links