Search - User list
Full Version: RBD angular velocity at an extra angle - how?
Root » Houdini Learning Materials » RBD angular velocity at an extra angle - how?
DwarfVader
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.
DwarfVader
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.
tamte
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
DwarfVader
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.
CYTE
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB