RBD bullet SOP solver simulating points off
1523 3 2- phenn
- Member
- 3 posts
- Joined: 8月 2017
- Offline
Hello everyone,
I have an issue regarding my cache of simulating points. I have two simulations, one influencing the second one. The first one is there to get the main motion, on the second one I just picked a few pieces and refractured them. So basically I want these more tiny pieces following the main simulation and then get activated at some point. I use the "deforming" attribute to drive the animation. However when I do a point simulation cache for the second one, the simulations points are completely off.
I attached a file to demonstrate what I want to achieve. The first set up is working but caching the geometry would be really heavy for a complex scene. Which is why I'd prefer using the second set up but using a transform pieces produce a wrong result, and I can't figure out why...
Thank you in advance for your help.
I have an issue regarding my cache of simulating points. I have two simulations, one influencing the second one. The first one is there to get the main motion, on the second one I just picked a few pieces and refractured them. So basically I want these more tiny pieces following the main simulation and then get activated at some point. I use the "deforming" attribute to drive the animation. However when I do a point simulation cache for the second one, the simulations points are completely off.
I attached a file to demonstrate what I want to achieve. The first set up is working but caching the geometry would be really heavy for a complex scene. Which is why I'd prefer using the second set up but using a transform pieces produce a wrong result, and I can't figure out why...
Thank you in advance for your help.
- polvy
- Member
- 8 posts
- Joined: 6月 2015
- Offline
- npetit
- スタッフ
- 404 posts
- Joined: 2月 2008
- Online
Here's one way of optimising and circumventing the transform offset you're seeing. By adding the RBD Configure before transforming the newly fractured geometry, you can simply make the pieces "animated" instead of "deforming". You just need to make sure to preserve the pieces' previous name so you can transform them accordingly after packing.
This will perform a lot better than using deforming RBDs since the internal rbd geometry doesn't need to be rebuilt on every frame.
The problem you're experiencing with deforming RBDs is that they are getting re-packed on every frame, and thus their relative pivot is changing. So when you freeze the geometry output and try and use the simulation points to transform those pieces, you are losing this change in pivot and not compensating for it. You need to transform the deforming input geometry, until it no longer is deforming (when it switches to being active), at which point the internal rbd geometry stops being updated, so you need to stop updating the geometry you're transforming also - the timeshift SOP set to min($F, 15) does this since you are switching from deforming to animated on frame 15.
Here's a fixed hipfile with both the animated method, and a solution to make it work with the deforming RBDs.
This will perform a lot better than using deforming RBDs since the internal rbd geometry doesn't need to be rebuilt on every frame.
The problem you're experiencing with deforming RBDs is that they are getting re-packed on every frame, and thus their relative pivot is changing. So when you freeze the geometry output and try and use the simulation points to transform those pieces, you are losing this change in pivot and not compensating for it. You need to transform the deforming input geometry, until it no longer is deforming (when it switches to being active), at which point the internal rbd geometry stops being updated, so you need to stop updating the geometry you're transforming also - the timeshift SOP set to min($F, 15) does this since you are switching from deforming to animated on frame 15.
Here's a fixed hipfile with both the animated method, and a solution to make it work with the deforming RBDs.
- phenn
- Member
- 3 posts
- Joined: 8月 2017
- Offline
-
- Quick Links