Carbon Technology

What is Carbon?

Carbon is the next generation physics library in development at Numerion Software. The goal is to provide a unified physics frame-work supporting the simulation of Soft and Rigid bodies with collision and motion constraints (such as Joints), in an easy to use, high performance package for movie developers, video games and other markets such as virtual fashion and augmented reality. Carbon uses non-linear constraint solvers to deliver a robustness not typically seen in real-time solutions.

Carbon also utilizes a novel algorithmic approach to deliver very high multi-core, multi-cpu performance on the desktop/workstation and cloud server, through a number of techniques including; minimizing memory bandwidth and leveraging nested parallelism. There is also full control of the trade-off between quality and performance, making Carbon well suited to applications with simulation requirements ranging from real-time to interactive and even production.

The Carbon library is built on the fundamental idea of physics modeling. For example the Carbon library does not contain a fixed set of Soft body models, but a set of Soft body building blocks, called primitives, that can be used to assemble the Soft body model that best suits your application. By analogy with graphics, where artists assemble models with primitives such as vertices, edges, triangles and higher order curves and surfaces, the Carbon library makes it possible to assemble Soft body physical models based on physics primitives such as nodes, segments, faces, tetrahedrons, etc. 

The Carbon physics technology is particularly well suited to helping make characters more believable in commercials, visual effects, animated features, video games, virtual fashion and augmented reality.

Carbon is available as a C++ library for programmers and Houdini Plug-ins for Technical Artists.

 

 

What's different about Carbon?

  • Carbon's implementation leads with Soft body simulation - rather than Soft body being a bolt on.
  • Carbon allows Soft bodies, Rigid bodies and Joints to interact/collide seamlessly within your simulation.
  • Carbon uses non-linear constraint solvers to deliver a robustness not typically found in real-time systems.
  • Carbon does not impose physics models, but rather it enables "Physics Modeling" of Soft bodies and Joints - with a tool kit of constraints.
  • Carbon supports great animation with robust, modular Joints and powerful Servo constraints = "animation controllers using inverse dynamics".
  • Carbon provides an advanced collision solution that includes native support for non-convex meshes and full self-collision for Soft bodies
  • Carbon does not need "magic numbers" and has simple intuitive API . So that makes Carbon very easy to set up and understand.
  • Carbon was designed from the ground up for extracting maximum performance from multi-core CPUs, to deliver interactive / real-time simulation.

Carbon Physics Modeling

The Carbon library is built on the fundamental idea of physics modeling. For example the Carbon library does not contain a fixed set of Soft body models, but a set of Soft body building blocks, called primitives, that can be used to assemble the Soft body model that best suits your application. By analogy with graphics, where artists assemble models with primitives such as vertices, edges, triangles and higher order curves and surfaces, the Carbon library makes it possible to assemble Soft body physical models based on physics primitives such as nodes, segments, faces, tetrahedrons, etc.

If, for example, we consider the application of Soft bodies to cloth simulation, typically cloth simulation applications have restrictions on what the underlying mesh has to be and what sort of material behavior they best simulate. For instance the classic stretch, shear and bend spring model is well suited for Cartesian grids, while finite element triangle based models tend to fit better with hexagonal grids where all vertices are roughly connecting 6 triangles. Ultimately, what matters is to achieve the material behavior expected by the user and this can’t be done by imposing a single model and mesh structure. If a user wants to achieve weaved woolen material or polymer fabric then they need to be free to decide what underlying mesh and what sort of primitives best suit their needs. So the Carbon library allows the user to assemble their own physical model in the same way they might assemble graphics geometry. To achieve this, Carbon relies on primitives that can be individually parameterized and combined by the user within a cloth model.

For example, if a user wants a weaved material and decides that a quad grid suits them best, then they can use Carbon Segments to assemble their stretching and shearing network. They can then parameterize those Segments with the stiffness and viscosity that match a fabric texture, control their compression and extension limits to achieve fibers that can’t extend but can compress and even decide what the resting state is relative to the reference length in order to make the cloth shrink around their model. The user can also set up Segments to constrain the bending in a classical way, or use Creases which are pure angular primitives capable of constraining the bending of the cloth around a given pose. As you can see, even in this simple example we already have many combinations and parameterizations possible. The Carbon library comes with a set of example cloth models to get you started.

The same modeling approach is also applied to Carbon Joints and Servos. So rather than only having expensive 6 DOF Joints that have a large overhead when all you want is a 3 DOF Joint, Carbon provides a set of Joint and Servo primitives that can be assembled into the constraint set that you require.

Now you can start to imagine the freedom in physics modeling that Carbon unleashes with all the possible combinations of underlying mesh and physics primitives.

 

Under the Hood

Soft Bodies

Carbon Soft bodies follow unified modeling principles, with mass distribution and dynamics handled by a nodal discreet representation and all structures represented by the same Finite model that is capable of high deformation. The structure of the Soft body is provided by the higher order primitives constraining the Nodes.
Carbon's Soft bodies also follow a unified material formulation, with support for per primitive parameterization, constitutive visco-elastic material model and preservation constraints on length, surface, volume and angles.

Carbon Soft primitives can be used to model 2D soft bodies, such as cloth, or 3D volume preserving soft bodies such as flesh.
Read more about Carbon Cloth here.

 
3D Soft Bodies - 
Tetrahedrons are one of the five soft body primitives that can be used in Carbon to assemble models. It's purpose is volume preservation and it is inspired by porous media type of materials. The idea is that by controlling the compression and expansion limits of the volume for each individual tetra, preserving volumes becomes a special case of equal compression and expansion ratios.
 
In terms of stability Carbon Tetra does not have rotational issues such as the ones found with some FEM corotational formulations. Also it does not have recovery issues with inverted or collapsed tetras since the volume preservation constraints take advantage of the signed volume formulation.
 
In terms of performance, the "noodle" example below is simulating at approx 6.14 Million tetras per second including solve and collision. Collision and self collision are active, volume preservation is maximum, object stiffness is medium. The models are using a total of 184320 tetrahedron primitives and 255600 edge primitives. Also this sim is leveraging Carbon's great parallel implementation, scaling in performance all the way up to the 28 cores available! Read more about Carbon Tetras here.
 

 

Joints

Joints are constraints limiting the relative motion of a pair of Rigid bodies. In Carbon, Joints are split into linear joints (such as Ball & Socket and Prismatic) and angular joints (such as swing axle or swing cone) expressed in terms of swing and twist (a natural representation avoiding twist induction issues). 

Carbon Joints are best described as "Lego" style modular primitives constraining 3 linear or 3 angular degrees of freedom. By design, Carbon Joints are simple entities with minimal parametrization, code, memory and performance overhead and processed by robust non-linear solvers. By combining these simple Joint modules you can achieve the desired complex mechanisms involving 2 or more rigid bodies.

A torture test for Joints - the boxes are all the same mass (although different sizes to ease visualization).

 

Servos

While a Joint is not limited in strength, it will always apply the minimum force necessary to achieve its goal. A Servo is different; its purpose is to maintain an animated pose between a pair of objects. While the Servo will try to apply the minimum force to maintain this pose, it is limited in strength and will give up if the task requires more effort than the Servo is capable of delivering.

The goal with Servos in Carbon is to integrate the physics with animation using inverse dynamics. If nothing in the scene prevents the Servos to play the animation then the result will be similar to what the animation alone would produce. But, if for example, a collision occurs and the Servos are not strong enough to fight the perturbation, then the animation will be modified by the dynamic event. This is a very powerful feature that can be used to easily create animations that are very difficult to create with just animation data, such as grasping an object with a hand.

One example where the Carbon Servo technology is used is for goalposing a Carbon Cloth or Carbon Tetra object. This allows for effects such as creating a simulation that loops seamlessly.

Looping flag in the wind.

  

Carbon Collision

The goal for Carbon collision is seamless integration of rigid body, soft body and soft self collision, at high fidelity, without sacrificing performance or ease of use.

 

To achieve this goal, a number of different approaches to contact generation were evaluated.
In the end we found that a simple general purpose fat geometry mesh, with native non-convex support,
gave us the fidelity, performance and ease of use we were looking for.

So Carbon has a general purpose fat geometry mesh based kinematic BVH, with a cascading subspace 
contact generation algorithm. It provides seamless collision from broad phase > narrow phase > contact generation.

The general purpose fat geometry mesh can be:

  • Made of points or edges or faces.
  • Convex or non-convex.
  • Deformable or solid.
  • Single or double sided.

Of course, the benefits from mesh collision with non-convex support are huge:

  • Seamless integration of rigid body, soft body and soft self collision.
  • No simplification of geometry into convex meshes.
  • No aggregation of general primitives.
  • No pre-processing of authored geometry.
  • Easy to understand, code and author.

Other key points:

  • Fully multi-threaded with great scaling - e.g. great contact scaling across 28 cores ( 2 x 14).
  • Deterministic.
  • Supports collision between non-convex objects.
  • Supports soft body self collision.

Carbon's collision objects are also flexibly bound to the underlying simulated object: for example, you can have a box represented by a soft body made up of tetrahedrons, and have the collision object for this soft made of  faces. This significantly helps the performance by reducing the complexity of the collision models from O(n^3) to O(n^2).