Jump to content

[RBD] Glue constraint on constantly spawning geometry over time


Marcocheng

Recommended Posts

Hello folks,

I'm working on an RBD simulation that needs constantly spawning packed geometry over time. Simply add $F in the creation frame to create a specific object every frame.

image.png.fa4b30eb6b7b448e7b7d610805250fa8.png

The spawning overtime setup has no problem at all. By simply add a connectivity sop and delete sop. 

image.thumb.png.edd6b45218a164de13f972e94b617ed7.png

But then the problem came while creating a constraint so each piece generated per frame can have their own glue. I've tried to force "overwrite with SOP" to load constraint every frame but no good result and go crazy. 

image.png.dc086fd082af70c9c7781defc2aaffdd.png

image.png.3fae24db03e724a311d6ed92481a168a.png

Any way to solve this particular situation to generate proper glue constraint to make it works? any tips?

Here's the file.

Constant_Spawn_COnstraints.hip

 

Thanks a lot!

Link to comment
Share on other sites

So if I understand this right, you spawn for example, piece01 on Frame 1, then you spawn piece2 on Frame 2 or any other piece. You want to connect the 2 pieces together with a glue constraints as soon as it gets spawned into the simulation?

Link to comment
Share on other sites

13 hours ago, julian johnson said:

This might be what you mean/need?

Constant_Spawn_COnstraints_v002.hipnc

Wow, that's exactly what I'm looking for:o

But I don't understand... Why using a pop emission make constraint works?!What's the mechanism behind it?:ph34r:

Also, I see you pre-record (in wrangle) the @pivot instead of using the default RBD center mass option. Why did you do that?

Thanks btw. YOU MADE MY DAY.

Edited by Marcocheng
Link to comment
Share on other sites

I'm sorry,  I hacked apart your scene quite a bit just to see what was going on. Your original scene could be fixed without all those changes. I've attached it below with the minimum of 'fixes' and without the pop emission. Essentially, the mis-alignment of the packed pieces and the constraint geo was down to a few things: 1) the constraint geo needs to be at the rest position of the packed pieces as you saw with the additional wrangle 2) I reset the glue constraint relationship to more or less default with additional strength 3) I ensured all the constraint geo existed on frame 1 with a timeshift and only pulled in the constraint geo on frame 1 to the sim not every frame.

All this is based on wonderful responses on this topic by Tomas Slancik:

https://forums.odforce.net/topic/25792-emit-packed-rigid-bodies-efficiently/

https://forums.odforce.net/topic/25634-emit-multiple-packed-primitive-with-constraints/

Without these, I'd have no clue. It was Tomas who in the first thread demonstrates that using Pop Source is the most efficient way to emit packed pieces...

Constant_Spawn_COnstraints_origfix.hipnc

  • Thanks 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...