RBD bullet solver cone twist constraint

   2250   8   2
User Avatar
Member
8 posts
Joined: 6月 2016
Offline
Hello,

Trying to work with RBD bullet solver and conetwistconstraint, but I found a limitation in SOP Bullet solver, cause it has only one conetwistconstraint settings, but in case if I have more than one conetwist constraint it become a problem. I tried to add it inside solver but have no success.
Also I noticed that developers did editable node only for "force" folder, so there is no access to constraint node, I guess if it would be editable it allows to add more custom constraints.
User Avatar
Member
8555 posts
Joined: 7月 2007
Offline
it's like with any other Constraint type
Bullet Solver SOP contains just 1 of each constraint type to allow you to set the default values

but the most important is your constraint geo, which defines name of a constraint type for each constraint and also the settings as attributes
unfortunately RBD Constraint Properties makes it convenient to set up only Glue Hard and Soft

so for other types you will need to set attribtutes yourself on your constraint network geo
here is a reference for common constraint attributes https://www.sidefx.com/docs/houdini/nodes/dop/constraintnetwork.html#attributes [www.sidefx.com]
but on top of that you can create primitive attribue matching any parameter name on your constraint type and it will be used as an override, like f@max_up_rotation, etc. as mentioned in the first paragraph of attached link/ Constraint Attributes section
Edited by tamte - 2022年5月29日 02:46:05
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
8 posts
Joined: 6月 2016
Offline
Hey tamte
Thank you for your answer! It works!
User Avatar
Member
75 posts
Joined: 7月 2013
Offline
lexpaintre
Hey tamte
Thank you for your answer! It works!

I am very interested in how you set this up? Do you happen to have any information. I have been toying with this and no luck.
- “spooky action at a distance”. Albert Einstein
User Avatar
スタッフ
359 posts
Joined: 2月 2008
Offline
Here's a quick example showing how you might setup some conetwist constraints to use with the RBD Bullet Solver SOP.
Notice I'm only driving a few of the conetwist constraint properties via attributes on the constraint prims.
If you want different settings per constraint for other properties, you'll need to add them as attributes and make sure their default values (which will be multiplied by the prim attributes) on the RBD Bullet Solver are set to 1.

The tricky thing with the conetwist constraint would have to be the motor_target. It's not very intuitive in the slightest. While the parameter on both the RBD Bullet Solver SOP and the ConeTwist ConRel DOP specify a motor_targetr vector param, you need to set a quaternion motor_target attribute. This attribute needs to be updated at every timestep, so make sure you add it to the list of constraint attributes to be updated by the RBD Bullet Solver.

Attachments:
RBDBulletSolverConeTwist.hip (589.9 KB)

User Avatar
Member
6 posts
Joined: 5月 2021
Offline
npetit
Here's a quick example showing how you might setup some conetwist constraints to use with the RBD Bullet Solver SOP.
Notice I'm only driving a few of the conetwist constraint properties via attributes on the constraint prims.
If you want different settings per constraint for other properties, you'll need to add them as attributes and make sure their default values (which will be multiplied by the prim attributes) on the RBD Bullet Solver are set to 1.

The tricky thing with the conetwist constraint would have to be the motor_target. It's not very intuitive in the slightest. While the parameter on both the RBD Bullet Solver SOP and the ConeTwist ConRel DOP specify a motor_targetr vector param, you need to set a quaternion motor_target attribute. This attribute needs to be updated at every timestep, so make sure you add it to the list of constraint attributes to be updated by the RBD Bullet Solver.

Thanks, npetit! Just before finding this, I managed to get something in that worked however seeing your motor setup has more implementation possibilities. Thank you so much! I converted your VEX to vop with success but whatever my setup is doing, I supposed I need more work getting that working.
Edited by Noboru - 2023年5月9日 20:14:54
User Avatar
Member
16 posts
Joined: 9月 2013
Offline
npetit
Here's a quick example showing how you might setup some conetwist constraints to use with the RBD Bullet Solver SOP.
Notice I'm only driving a few of the conetwist constraint properties via attributes on the constraint prims.
If you want different settings per constraint for other properties, you'll need to add them as attributes and make sure their default values (which will be multiplied by the prim attributes) on the RBD Bullet Solver are set to 1.

The tricky thing with the conetwist constraint would have to be the motor_target. It's not very intuitive in the slightest. While the parameter on both the RBD Bullet Solver SOP and the ConeTwist ConRel DOP specify a motor_targetr vector param, you need to set a quaternion motor_target attribute. This attribute needs to be updated at every timestep, so make sure you add it to the list of constraint attributes to be updated by the RBD Bullet Solver.

Hi, Thank you for your example file. In the file I noticed the same issue that I had when using a motor_target, that the motion is a bit "twitchy" it does not follow the same smooth rotation that the "driving" motor_target has. You might see in the gif that the visualized motor_target attr has a smooth rotation but the simulated object occasionally slows downs, and speeds up again.
Is there a way to use a motor_target and get a smooth motion?

The reason I want to use a motor_target on the cone twist constraint is do "drive" the wheels of a vehicle. Is there another "preferred" way of doing this. I have tried using v@w on the wheel objects but had some issues with "balancing" the force of the angular velocity.

Does anyone have some tips on how to drive the rotation of an rbd object in a stable and controllable way?

Regards, Johan
Edited by Petfactory - 2023年9月4日 04:08:26

Attachments:
conetwist.gif (1.7 MB)

User Avatar
スタッフ
359 posts
Joined: 2月 2008
Offline
A lot of work has gone into improving the Cone Twist Constraints for H20 - I think you'll be pleasantly surprised. The Hard Constraints have also been improved, making it a lot simpler and straight forward to setup fully featured vehicles for example.
The motor target on the Cone Twist Constaints however are defined as quaternions, which means they're best suited for ragdolls than for fast spinning objects such as wheels. It's still best using Hard Constraints for these.
User Avatar
Member
16 posts
Joined: 9月 2013
Offline
Thank you for your quick reply!
Really interesting to hear about the improvements in H20.
Regards, Johan
  • Quick Links