Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Constrain MPM cloth to joints

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
repostmj
1213 Views, 9 Replies

Constrain MPM cloth to joints

I'm trying to constrain a particular point on a mesh (used for an MPM cloth sim) to a joint. With nCloth I create a transform constraint at the vertex, and then parent that constraint to a joint. So what approach should I take to achieve something like this with the MPM cloth simulation in the new Bifrost. Thanks

9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: repostmj

Did you find how to create any other constraint?

There is a geo_constraint_property input in the mpm_cloth node but I can't find which node to plug in.

Message 3 of 10
repostmj
in reply to: Anonymous

Yes I can get it to constrain to geometry. Check out the example file called "tearing_cloth" provided on the Bifrost hub.

Message 4 of 10
Anonymous
in reply to: repostmj

Oh I can't read that one, Arnold is not installed here and It prevents me to read that files as it seems to be used in that scene 😕

Message 5 of 10
Anonymous
in reply to: Anonymous

Message 6 of 10
xye863HV
in reply to: repostmj

Hi, I also tried to constraint some points on a joint skinned mesh, and I made a compound for that. I attached the scene with the compound! Hope it helps. You just need to create a value compound , set it to string, and give it a vertex index list as value, then linked it to the vertices_constraint compound, those points will be constrainted. 

Message 7 of 10
xye863HV
in reply to: xye863HV

I don't know why the attachment didn't show up, Here is a zip.

Message 8 of 10
repostmj
in reply to: xye863HV

Thank you for this, it's exactly what I was looking for!

One other thing:  For now I manually type in the vertices to be constrained and it works perfectly in your compound, but I'm wondering if there is a way to automatically generate this array based on proximity to various joints. Something like a loop that moves through a joint hierarchy and then checks which is the closest vertex to each joint and then add that to the array. If you (or anyone) already knows how to do this with the Bifrost graph some pointers would be much appreciated!

Message 9 of 10
joostkonemann
in reply to: repostmj

When you create a 4x4 matrix port on an input node of the graph, you can plug the world matrix from any transform into the graph. Inside the graph you can convert it to SRT values. The next part is not yet really efficient as an optimised closest point compound doesn’t exist yet. At the moment you need to loop over the points and search for the closest. But I believe an efficient closest points compound is in the works or at least planned. 

--
MacBook Pro 13,3 - 2.7GHz - 16GB - Radeon Pro 460 - macOS Catalina 10.15
Message 10 of 10
repostmj
in reply to: joostkonemann

Thanks for the info, and glad to hear something like this is in the works! For now I found a way to avoid manually typing the vertices by painting vertex colors and then using the vertex colors as a way of filtering which vertices get constrained. Seems to be working efficiently for my needs at the moment.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums