Switch solver help

   3790   5   2
User Avatar
Member
53 posts
Joined: Jan. 2015
Offline
Hey guys, just having trouble setting up a simple switch solver scene.

I have a bullet and cloth(FEM) solver and wish to switch from rbd to cloth at frame 6. I've set up my file similar to the help example but I can't seem to get any switch to occur. The help file also seemed to have a problem so it wasn't very helpful in the end!

Attachments:
switch_solver_02.hipnc (208.2 KB)

www.carlocarfora.co.uk [www.carlocarfora.co.uk]
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
The “Switch Value” needs to be evaluated every frame. Since you already have “Data Operation” set to “Set Always”, the “Switch Value” just needs to be set to “Use Default”.

Once that's set, you'll see this error at frame 6:
Error: /obj/AutoDopNetwork/car/emptyobject1: required integer point attribute “initialpid” is missing.

I believe the first frame needs to be initialized by the cloth solver. So the expression should probably be:
if($F != 1 && $F<=6,0,1)

See the attached file.

Attachments:
switch_solver.2.hipnc (207.7 KB)

Andrew / アンドリュー
User Avatar
Member
53 posts
Joined: Jan. 2015
Offline
Ahh ok, it makes sense now! I was getting that error and not understanding what it meant. Thanks for clearing that up and posting the example file!
www.carlocarfora.co.uk [www.carlocarfora.co.uk]
User Avatar
Member
53 posts
Joined: Jan. 2015
Offline
I've had a play with the switching between solvers but I can't seem to get it to switch back to RBD after a few frames of collision as a cloth object. The object seems to lose all motion.

I was trying to pull the deformed object back into another RBD object and switch to that but had no luck if that is even the best way to do it!

Any help once again would be hugely appreciated

Attachments:
switch_solver.2_211.hipnc (208.6 KB)

www.carlocarfora.co.uk [www.carlocarfora.co.uk]
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Ah, it's because the “Activation” for bulletedata has an expressin in it that turns it off after frame 6. You probably want just a “1” there. See the attached (3) file.

Then, you'll see some strange “flipping”. To fix that, I think you just need to recalculate the center of mass. This can be done by using an extra rbdstate dop. See the attached (4) file.

Attachments:
switch_solver.3.hipnc (207.7 KB)
switch_solver.4.hipnc (210.4 KB)

Andrew / アンドリュー
User Avatar
Member
53 posts
Joined: Jan. 2015
Offline
Thanks for being so helpful, I certainly need to pay more attention to the settings and expressions used on nodes!

With your help I got a result I'm happy with now, and learnt lots in the process about setting up the switch solver.

Attachments:
switch_solver.2_211.hipnc (211.0 KB)

www.carlocarfora.co.uk [www.carlocarfora.co.uk]
  • Quick Links