Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbody for Vehicles?
#4
(06-02-2019, 08:56 PM)StudioTatsu Wrote: Awesome that fixed it.
I think there a bug. At first, I thought it was model but it did the same thing on the DeformableBarrels scene.
It prematurely deforms if rotated before the scene starts.

To Repro: 
1. Open the DeformableBarrels scene.
2. change any barrel Y position to 0.1
3. change that same barrel X Rotation to 90
4. click pause, then play button.

Notice how it deforms as the scene starts
It's not as noticeable here, definitely more noticeable with a different model (see attached image)
Not sure if it's a wrong setting or a bug.

Okay now that I reported that, here are my follow on questions:
1. Can I set the mass or weight of a softbody? How if possible.
2. Can a softbody be completely driven by a rigidbody? Alternatively, can I manipulate a softbody like a rigidbody (add forces, impulses, etc.,)?
3. Is there a way to return deformation value of a softbody? How bad is it damaged?

Thanks,
BTW This plugin has already surpassed my expectations, I love it.

Hi! Will try to reproduce the issue and get back to you asap.

Regarding your questions:

1.- Yes, in fact you can set the mass on a per-particle basis. Enter particle edit mode, select the particles you want to edit, and set their mass in the mass input field. See:
http://obi.virtualmethodstudio.com/tutor...iting.html

2.- Yes and yes. Use pin constraints to attach particles to a collider/rigidbody combo. This establishes a two-way relationship between the particles and the rigid body. See:
http://obi.virtualmethodstudio.com/tutor...aints.html
http://obi.virtualmethodstudio.com/tutor...ments.html

To add forces or impulses, use softbody.AddForce() or softbody.AddTorque(). They behave in exactly the same way as their Rigidbody counterparts. Note that softbody.AddForce applies the force/torque at the soft body's center of mass. If you want to apply an off-center force, then set solver.externalForces[solverParticleIndex]. This lets you add forces on a per-particle basis. See:
http://obi.virtualmethodstudio.com/tutor...icles.html

3.- Not currently, though we do calculate this internally. For each cluster, we have a 3x3 deformation matrix. Calculating the frobenius norm of the difference between this matrix and the identity matrix (undeformed state) we determine how deformed the cluster is. In the future we will expose either the norms (scalar values, 0 is undeformed and high values mean higher deformation), the deformation matrices, or both (yet to decide).
Reply


Messages In This Thread
Softbody for Vehicles? - by StudioTatsu - 06-02-2019, 04:46 PM
RE: Softbody for Vehicles? - by josemendez - 06-02-2019, 06:48 PM
RE: Softbody for Vehicles? - by StudioTatsu - 06-02-2019, 08:56 PM
RE: Softbody for Vehicles? - by josemendez - 07-02-2019, 10:39 AM
RE: Softbody for Vehicles? - by josemendez - 07-02-2019, 05:37 PM
RE: Softbody for Vehicles? - by StudioTatsu - 08-02-2019, 01:59 AM
RE: Softbody for Vehicles? - by josemendez - 08-02-2019, 08:23 AM
RE: Softbody for Vehicles? - by StudioTatsu - 07-02-2019, 06:52 PM
RE: Softbody for Vehicles? - by StudioTatsu - 08-02-2019, 01:21 PM