Jump to content
Eddy

Changing constraint_name Dynamically

Recommended Posts

Hello guys.

I have a question about bullet constraint in Houdini.
I think it is a good issue in simulating RBDs and constraints.
The goal is to change constraint type from hard, spring, cone twist, etc to glue dynamically during simulation via SOP Solver.
I can change constraint_name primitive attribute from  spring to glue successfully.
But after a moment when I want to back to spring constraint all deformation
which I have in glue constraint will be reset to original shape!
I attached a HIP file to see what I'm looking for.
In this HIP file that I take this from Houdini 13 Bullet Masterclass, at frame 14 constraint type will be changed to glue when wall is bend.
At frame 40 I change constraint_name to spring again but wall returns to
original shape whereas I want to maintain bending.
Can I do this with Bullet?
If we can't do this, it would be a great RFE to optimize RBD simulations and creating nice effects.
Thank you so much.

spring_to_glue.hipnc

Share this post


Link to post
Share on other sites

whats the point of putting it back to a spring constraint if you want to maintain bending of the object?

just remove the change to spring solver step and you have your bending maintained.

Share this post


Link to post
Share on other sites
34 minutes ago, Jesper Rahlff said:

whats the point of putting it back to a spring constraint if you want to maintain bending of the object?

just remove the change to spring solver step and you have your bending maintained.

Thanks dear Jesper.

I knew this.

I think it is a good optimization for RBD simulations where we can switch to glue when any collisions happen and switch back to spring when collision are coming.

Also we can ensure in glue constraint any wobbles would happen unlike spring or hard constraint...

So I'm looking for a way to maintain the shape after switching from glue to spring or hard constraint. 

Share this post


Link to post
Share on other sites

okay, so basically if I understand correct, you want it to deform using spring constraint, keep that shape, and then potentially want to deform the already deformed geo again?

Share this post


Link to post
Share on other sites

I did something similar before, by switching first to unbreakable glue, and then tracking age + speed on those constraints to switch them back to spring and it seemed to work pretty well in terms of avoiding entire areas collapsing constantly if the switch from glue to spring was instant.

Share this post


Link to post
Share on other sites

Can you upload your HIP file?

Thank you.

Edit: I uploaded my new test.

At frame 40 constraint anchors place in wrong position.

Can anyone help to fix it?

spring_to_glue_test.hipnc

Edited by Eddy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×