Box#2 Soft Bodies and Deformations

NOTE: This page is still WIP, I am adding a few more illustrations.

This is a quick tutorial on how to set up a soft body in Particle Flow Tools Box#2. A further example below will show you how to “hold” that deformation to simulate a “dent” in the object.

Part – 1

1. Create a Geosphere radius 25.0 segments 4 Position X:0.0,Y:0.0,Z:100.0 (do not use a standard sphere, vertex placement is important) and clone(copy) it. Hide the Clone for now.

2. Create a new PhysX Flow.

3. Replace the Birth Grid with a standard Birth Operator. Set the particle count to the amount of vertices in the Geosphere. It should be 162.

Vertex Count

4. Add a Position Object operator and add Geosphere01, set the placement to Vertices All.

5. Set the Shape operator to sphere, size 3.0 –This size is as important as the vertex position. If the shapes are to large they can overlap, if you don’t compensate for the amount of overlap (in the PhysX Shape Interpenetration Tolerance) you will get the typical physics engine explosion when you start your simulation.

6. Set the PhysX Shape operator Collide As: to Sphere and adjust the Static and Dynamic frictions to 5.0 –use frictions to give items a less jelly like feel

7. Remove the Spin operator.

8. Select the PhysX World and set the Static and Dynamic frictions to 2.0 and under the Advanced Parameters, set the Sub-frame Factor to 4 –The Sub-frame factor determines how many times the simulation is calculated per frame. So if your integration step is set to Half-Frame and your Sub-frame factor is set to 4 the system will do 8 calculations per frame. More calculations in this case = stiffer object deformations.

8. Add a PhysX Glue operator, use the Rigid Bind Type, enable Visualize Binding. Adjust the bind length to create a binding web to the surrounding particles. Bind Length 12 and max Binds per particle to 6. Set the Rigid Solver factor to 0 .5 to decrease the solvers accuracy. –You’ll can play with the amount of binds and the binding lengths to create different types of rigidity. For instance with the Visualize Binding on you can see the “web” of binds try using some higher values in both parameters and test the results. You will notice some interesting effects.

Hit Play

9. Set the Pf Source Render op to Phantom –In Phantom mode the particle flow system will still run its usual course through the events, this is what you typically want when using Particle Skinner, this way the system will update BUT Particle Flow geometry will not render.

10. Hide Geosphere01

11. Unhide the Geosphere02 Clone

12. Add a Particle Skinner Modifier to Geosphere02 (Step 1)

13. Add the PF Source 01 to the Particle Skinner Modifier (Step 2)

14. Enable Particle Skinner (Step 3)

Hit Play – and squish stuff Very Happy

Scene File Max 2010: Box2_SoftBody.max

Part-2

Now that you have the soft body set up, you will see how you can hold that deformation.

1. Open Particle View, select the PhysX Glue operator in Event 01, and go to its parameter panel in the Particle View

2. Enable “Breakable By Force” Set the Max Force to 1.000 and the Max Torque to 800. –You can alter these settings depending upon “how much” deformation you want to achieve. Lower values will cause more deformation and higher value will cause less, If the binds do not break you will not get any deformation.

3. Enable “True True when Particles” and select “Break Any Bindings” –You want to send broken binding particles to the new event

4. Select and right-click copy the PhysX World operator in Event 01

5. Below Event 01 in an empty space right-click and Paste Instance the copy to the PhysX World operator–All PhysX enabled events need a COPY or INSTANCE of the Original PhysX World in the system. Or at the very least need to run off of the same PhysX World driver (use this at your own risk, it is recommended that you Copy/Instance the original)

6. Go back to Event 01 and right-click copy the PhysX Glue test.

7. In Event 02 right-click paste (as copy) the Glue test BELOW the PhysX World. –As with all PhysX Tests they need to be below the PhysX World in order to get properly evaluated

8. Switch the Timing to Continuous and Disable the “Breakable By Force” and the “Test True when Particles” options.

Next create an object for the Geosphere to collide with.

9. Active either the Top or Perspective viewport, go to the Create panel, and select Standard Primitives-Box

  1. Use the keyboard entry:
  • X:  25.0
  • Y: 25.0
  • Z: 0.0
  • Length: 50.0
  • Width: 50.0
  • Height: 25.0
  1. Press the “Create” button

10. Switch to Modify mode with new Box01 selected, click the Modifier List dropdown, choose PF Collision Shape WSM, and Activate it –Geometry is the Default Collision Shape which will do fine since it is the only collision object in the scene

11. In the Particle View select Event 01 and add a new PhysX Collision test above the PhysX Glue test

12. Add the Box01 collision object to the PhysX Collision test

Hit Play – Now when the Geosphere hits the box the bindings in Event 01 will break, these particles are then passed on to Event 02 where they are re-glued and continuously bound rigid.

Scene File Max 2010: Box2_SB_Deform.max

Enjoy:)

5 Comments to Box#2 Soft Bodies and Deformations

  1. That’s great! Post it in the PFlow thread :)
    And on the pflow facebook group :D

    kind regards,
    Ansi

  2. Anselm von Seherr-Thoss on April 12th, 2010
  3. Thanks Ansi, I am still working on it, I still need to add some images.

  4. admin on April 12th, 2010
  5. Really great tips, keep it up ;)

  6. DeKo on April 26th, 2010
  7. Thanks Deko :)

  8. admin on May 9th, 2010
  9. [...] Tutorial sobre as propriedades dinâmicas do Plug-in Particle Flow Tools Box 2, que permite simular corpos maleáveis e amassar objetos em colisões. Publicado: Julho 9, 2010 por carlozcg em Destaques do mundo CG 0 http://4rand.com/learn-stuff/box2-soft-bodies-and-deformations/ [...]

  10. Tutorial sobre as propriedades dinâmicas do Plug-in Particle Flow Tools Box 2, que permite simular corpos maleáveis e amassar objetos em colisões. « Carlozcg's Blog on July 9th, 2010

Leave a comment

Search

 

Archives