Hello, i have scene where i want to emit rbd piece every frame into sim. After that i want to have proper attributes(actual transforms from rest state) on points because i want use them in "Instancer LOP". By default points from RBD dont take into account transforms made before sim of objects. So i have to bring them back, to achieve this i am using 4@restxform which solver returns to me on every piece. I think I almost have it with scale and rotation, but i have slighty offset on everypiece and I don't know what it comes from.
I made a test scene to illustrate scenario I'm talking about. The whole setup is done in LOPs and rbd sim is in the "Instancer LOP".
Image Not Found
If anyone has an idea what this offset is caused by or has a better way to deal with this scenario, I would be grateful ^^ Thanks, Dawid
The problem is you have "Compute Center of Mass" on on the RBD Packed Object > Physical. This changes the pivot of the RBD points.
Either turn that off, or if you want to keep the automatically computed center of mass, you'll need to create a new transform for each point that considers the original restxform and the new pivot.
Hey, i have one more question (your solution works perfectly but I'm curious if it's possible). After using method you showed using maketransform(), points change their positions and only after copy to points, everything looks as in RBD sim. I wonder if it would be possible to have a perfect representation of the point position in space already before copy to points(with correct rotation and scale at this points).
Dawid Wizor Hey, i have one more question (your solution works perfectly but I'm curious if it's possible). After using method you showed using maketransform(), points change their positions and only after copy to points, everything looks as in RBD sim. I wonder if it would be possible to have a perfect representation of the point position in space already before copy to points(with correct rotation and scale at this points).
Unfortunately not ;/ That's why I made this thread. Points from RBD sim don't take into account transformations made just before simulation and have an offsets on the pivot. Approach that npetit showed is fine, just in case I wanted to ask if it is possible to achieve good transforms with good point position after copy to poitns because this method moves points.
Hey, I haven't checked this solution before, but now it would be useful to me. What is "transform" wrangle? Before checking I thought you meant about deformation wrangle but this code doesn't work here.
Here's an updated hip file with it working in all cases - the point position however doesn't reflect the pivot offset but should still give you a pretty decent idea of where the pieces are.
Hello, it's me again xD This method actually works in almost every case, except when using RBD SOP Solver, I assume it does something under the hood(there's a little offset of pieces). Maybe you have a way to make it work here too.
The RBD Bullet Solver SOP stores all the emitted geometry in a solver SOP, at its emission position, rotation and scale. From there it's a straight forward transform pieces SOP. The reason it does this is there is no guarantee that all the unique emitted geometry is always available through the first and/or third inputs. For example, on frame 1 you have a cube plugged into the first frame - a cube is emitted. On frame 2 you switch to no geometry, so nothing gets emitted and on frame 3 you switch to a sphere which gets emitted. On frame 4 and up you switch to no geo. Without caching the emitted geo, you'd only see the cube on the first frame and the sphere on the 3rd frame and then nothing.
Storing the emitted geo at its emission position, rotation and scale is the same as baking in its rest xform.