Search - User list
Full Version: Scaling RBDs in Rest Space
Root » Technical Discussion » Scaling RBDs in Rest Space
toadstorm
I'm struggling to figure out a way to scale packed RBDs in the rest space of each packed primitive.

When you set v@scale in an RBD sim, the scaling is applied relative to the p@orient attribute that's computed during the simulation. However, this doesn't take into account the 4@restxform attribute that's automatically set from the intrinsic transforms at the beginning of the simulation. This means that if your objects are rotated pre-sim and you want them to scale up along a local axis, there doesn't seem to be any way to do it by setting v@scale alone.

I've tried a few different ways to transform the scale vector based on the restxform, but scale is weird and isn't as easy to manipulate as orientation. I've kind of reached the limits of what I understand mathematically here. I know I can get around this by setting the transform intrinsic post-solve, but I would really like to know if it's possible to calculate the scale vector in the correct local space per-primitive.
tamte
to my understanding the issue of trying to do this just inside is that within Bullet Solver SOP after the sim the pieces are transformed using initial world space orientation as a starting point and the points within DOPs record only delta from there, so regardless of how you would massage p@orient and 4@restxform inside the sim, it will not change the initial alignment of pieces being transformed and therefore in what axis the scale would be applied in, since the pieces are not corrected to match modified 4@restxform before being transformed which could allow for that

however
what you can do is axis align all your pieces before Bullet Solver SOP and record the initial rotation
then once emitted into DOPs apply this rotation to orient, see example
toadstorm
Thanks Tomas! Been a while.

Yeah I'd come up with more or less the same solution, and it does work, I was just hoping I wouldn't have to go through the extra pre-sim step as it requires wrapping up an extra tool to make that work rather than having it all work through a single tool. If there's any way to do it at all in a single step, I'd love to hear any ideas. Appreciate your time in any case!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB