Jump to content
lucaspedrajas

2D vellum Simulation

Recommended Posts

Hello guys , I cant find an attribute or something in vellum  to make it avoid movement in one particular angle or i'm missing it.

 

 I want to simulate a spring in a 2d domain I only want to run the simulation in Z and X   and avoid movement in Y axis 

Iwant to prevent this from happening:

image.thumb.png.11dfb35ea801c70e43ca985eae394236.png

image.thumb.png.3f2168589266a045e8a3775a9ef0c32d.png

Is it possible ? thank you all in advance for your help!!

Share this post


Link to post
Share on other sites

Why not just place box-shaped colliders on either side of the spring geometry to restrict its movement?

Share this post


Link to post
Share on other sites
Posted (edited)

I'd use a popwrangle and set v@force.y = 0; and just in case aswell v@v.y = 0;

if it doesn't work, you might want to dive into the solver and do that stuff at the right position

Edited by 3dome

Share this post


Link to post
Share on other sites

If you use a sop solver to explicitly set the y point values of the cloth geo and an additional sop solver to do the same to the constraint geo, you can very effectively constrain your sim to just two axis. See attached for example.

BTW, it may seem that you only need to manipulate the "Geometry" data, and in the simple attached demo that seems to work fine, however I have found that with complex vellum sims you really need to run over the "ConstraintGeometry" data as well.

 

vallum_x_constraint.hip

  • Like 2

Share this post


Link to post
Share on other sites

Thanks for the setup, Karl, that works. After taking a look at your VOP network I managed to reduce it to a single line of VEX code.

v@P = set(@rest.x,@P.y, @P.z);

So you could swap the constraint to any axis, by shuffling the values.

Share this post


Link to post
Share on other sites

woow amazing !! sorry for repply one week later :(,  but yeah! thak you guys for the enlightening !!! you're awesome!   

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

×