Actors

A piece of cloth, a rope, a fluid emitter or a softbody, they are all actors. All actors take a blueprint as input. The actor will instantiate the information (particles and constraints) contained in the blueprint, so that the solver can simulate it. You can reuse the same blueprint across multiple actors.

An actor must be child of a solver if you want it to be included in a simulation. At runtime you can reparent an actor to a new solver, or take it out of its current solver's hierarchy if you want to.

A fluid emitter and a softbody as children of a solver.

The steps needed to get a simulation up and running are pretty similar regardless of what type of actor you're going to create:

  • Create a blueprint asset of the appropiate type. Generate it, then edit it if needed.
  • Create the actor, and feed it the blueprint.

You can create any actor by going to GameObject->3DObject->Obi. For instance, to create a cloth actor you'd go to GameObject->3DObject->Obi->Obi Cloth, to create a rope GameObject->3DObject->Obi->Obi Rope and so on.

When you first create an actor in the scene, Obi will look for a ObiSolver component to add the actor to. If it cannot find a suitable solver, it will create one. When creating a solver, it will also automatically add it to the first ObiFixedUpdater found in the scene.

Actors expose some parameters that let you modify its behavior (E.g. you can change the force required to tear cloth, or the plasticity of a softbody). Changing these parameters will not affect the original blueprint in any way, only the instance generated by the actor.

Go to each actor blueprint page to learn more about specific actors/blueprints:



Rope:
Modeled as a chain of particles, linked together by constraints that force them to stay within a certain distance of each other (distance constraints).

Cloth:
Here, a square piece of cloth is represented as a bidimensional grid of particles, linked together by distance and bend constraints.

Fluid emitter:
Spawns new particles, that repel or attract other particles around them to try and maintain a constant density (mass per volume unit).