ParticleSkull Posted January 20, 2017 Share Posted January 20, 2017 Hey guys, I'm testing some cloth simulation using PBD but couldn't find a way to constraint some areas of it. I don't want to constraint it to another object, just want to make those particles to be "frozen". Can someone give me some ideas about this? Thank you /Alvaro Quote Link to comment Share on other sites More sharing options...
Hamp Posted January 20, 2017 Share Posted January 20, 2017 The i@stuck attribute seems to work. Add the attribute and set it to 0 or 1 in SOPs on the points that are sourced into DOPs. 1 Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted January 20, 2017 Share Posted January 20, 2017 You can also use a v@targetP attribute, search for "targetP" here, it's in the Pin section 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 20, 2017 Author Share Posted January 20, 2017 (edited) Thank's guys! EDIT: I've attached the file, just in case @Hamp, thx man! i've tried it but all the points are going to the scene orgin, check it out: here's how i've done the setup, it look's fine, just like you said: Hey @vtrvtr, thx! I couldn't get any good results from it yet but i'm still diggin' it. Might have ask you something in a while /Alvaro granular sheet pin.hiplc Edited January 20, 2017 by ParticleSkull Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 20, 2017 Author Share Posted January 20, 2017 Hey, solved it! doing some research on the targetP attribute I found this saying: " Set the mass of grain particles to zero (mass == 0). They will stop responding to external forces and the PBD update, giving you complete control over their motion. If you are driving their positions from external animation, remember to set their velocities correctly. " Here's the steps to achieve it:1 - On the Grain Sourc (SOP level), you have to switch on "compute mass" (it looks like you must turn off "ignore mass" on all the forces you're using); 2 - Group the particles you want to be pinned;3 - Create an attribute for the group of particles setting mass to 0 (anyone know it doesn't work with the Attribute Wrangle and just with the Attribute Create?); Scene fixed it attached granular sheet pin - fixed.rar 2 Quote Link to comment Share on other sites More sharing options...
Hamp Posted January 20, 2017 Share Posted January 20, 2017 Hey! Great that you solved it, sorry my info didn't cut it, I just did a quick test where my stuck point happened to be at the origin :/ Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted January 20, 2017 Share Posted January 20, 2017 Hey @ParticleSkull just for the sake of completeness, you can setup the targetP attribute like this: I tested quickly with your scene and the results are exactly the same from what I could see 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 20, 2017 Author Share Posted January 20, 2017 Yeah, thank you very much Vitor, i'm sure it will be useful in the future. Pretty simple to implement. There's a file attached in case anyone else have the same doubt granular sheet pin - targetP.rar Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted January 20, 2017 Author Share Posted January 20, 2017 @Hamp, no worries, thx anyway btw, I'm trying to tear this but can't have the "mesh tearing" like the particles. It just stretches the mesh. In case you guys know a solution, please have a look at this other topic (don't want to mess with this one) Cheers, Alvaro Quote Link to comment Share on other sites More sharing options...
Jephyr Posted November 28, 2017 Share Posted November 28, 2017 Hello, This looks like exactly what I need. Will try in the evening. But is there any way that I could animate the pin positions? Quote Link to comment Share on other sites More sharing options...
michaelb-01 Posted November 28, 2017 Share Posted November 28, 2017 (edited) If you just want to freeze some particles you can use the ‘stopped’ integer attribute. If you want to animate the pinned particles you will need to update targetP in pops (as has been mentioned above). I’ve been doing a lot of ‘cloth tearing’ recently with grains and it requires a bit more of a setup but it’s doable. Essentially you need to: - prefracture the mesh - store a class attribute on the points (that will get picked up by the grain source) - for your constraints, in a primitive wrangle, check the two primitive points (using primpoint function) and compare their class values, if they are the same the constraint exists ‘within’ a fractured piece so we set its strength attribute really high (1x10^8 for example), if the class value is different you know the constraint connects two different fractured pieces so we want to make it tearable, so set the strength much lower (maybe 0.5) - enable break constraints on the grain solver and tweak the break threshold until you get some nice tearing. Post sim: - use a point deform node to drive the mesh by the points, but we want each fractured piece to be driven only by its corresponding grains points otherwise the mesh will stretch. You could try doing this in a for loop but that is very slow so I think the following is better: - time shift the mesh to frame 1, offset the point position by the class value (@P += i@class) and feed this into the first input of a point deform - time shift your grain sim to frame 1 and offset it by class too (it should line up in space with the mesh), and feed that into the rest input of the point deform - feed the animated grain sim points into the template points input of the point deform - if done correctly the mesh should tear cleanly with the points. To get a nicer tear there it’s actually a bit more work to be done, I’ll try and upload an example hip file if I have time. Maybe someone knows of another method? Edited November 28, 2017 by michaelb-01 2 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted November 28, 2017 Author Share Posted November 28, 2017 (edited) That's some really awesome info, Michael. Thank's! Please try to upload the scene file, it would be very helpful - Alvaro Edited November 28, 2017 by ParticleSkull Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.