Orsonorix
2022年1月24日 10:28:12
Hi,
Is it possible to swap rbd simulated object to different one while simulating? For example bunch of simulated boxes changes at random to spheres which inherit position, rotation and continue to simulate.
cwhite
2022年1月24日 12:48:19
I think you can do this by first replacing the packed prims' contents with the new shape(e.g. with the Pack Inject SOP, or by copying the point attribs over to new packed prims) and then resetting the 'id' point attrib to -1 which will cause the solver to re-import the shape. You might also set 'computecom' and/or 'computemass' to 1 if you want those properties to be recomputed for the new geometry.
Orsonorix
2022年1月24日 16:47:13
Hi,
thanks, it worked! I'm attaching hip if anyone interested.
Cheers
shubhamtripathicga
2026年7月17日 13:03:04
I tried this setup with the rbdsolver. It's not working. It worked if I create the rbd dop network from scratch like but not with the new rbdsolver. I am attaching my hip file here
npetit
2026年7月21日 00:11:11
It kind of is working - internally everything is doing what you want, which is why the spheres are floating above one another over the lower bowl, and if you dive inside the rbd bullet solver, you can see the spheres changing into cubes.
The problem is the rbd bullet solver by default outputs what is plugged into it, transformed by the resulting simulation points. There are a couple of ways of achieving this, first by simply creating an object_merge pointing directly at the dopnet node inside the rbd bullet solver, or you can replicate the swapping outside the rbd bullet solver by tagging the rbd points that are being swapped (you add them to a "swap" prim group, you need to create a point attribute you can add to the attribs to output since we only use the sim points internally - no prims).
Here's an updated hip file with both options.