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.
RBD bullet solver cone twist constraint
3022 8 2- lexpaintre
- Member
- 8 posts
- Joined: June 2016
- Offline
- tamte
- Member
- 8833 posts
- Joined: July 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
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 - May 29, 2022 02:46:05
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- lexpaintre
- Member
- 8 posts
- Joined: June 2016
- Offline
- Noboru_Garcia
- Member
- 75 posts
- Joined: July 2013
- Offline
- npetit
- Staff
- 413 posts
- Joined: Feb. 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.
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.
- Noboru
- Member
- 6 posts
- Joined: May 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 - May 9, 2023 20:14:54
- Petfactory
- Member
- 18 posts
- Joined: Sept. 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 - Sept. 4, 2023 04:08:26
- npetit
- Staff
- 413 posts
- Joined: Feb. 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.
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.
- Petfactory
- Member
- 18 posts
- Joined: Sept. 2013
- Offline
-
- Quick Links