MultiServos - Types
RealFlow provides four individual nodes for different applications. They can be found under:
Edit > Add > Object > MultiServo > [ MultiServo type ]
A MultiServo system always consists of at least two elements: two rigid bodies linked via a MultiServo node. This is already the entire setup and the objects can be either passive or active, have different shapes or size or are absolutely identical. It is up to you. In the following descriptions we will only discuss a two-body system, because it is much easier to understand, but everything said here is also valid for three or more objects. In this system we have body A with active rigid body dynamics properties and body B in passive mode. Object B is located in the scene's origin. Normally, all targets refer to object B's local system, but in this special case we can use the world coordinate system for convenience.
When we talk about a moving body we have to look at the performed kind of motion. Does it move along a certain path or rotate around a hub? The first case is also called linear motion and this is something you experience when you ride a bike, drive a car or go by train. In the second case, the motion is a rotation, e.g. the blades of a fan. Although all these motions appear differently, there have two things in common:
To get a body in motion, a force is needed and this force depends on the body's mass and the amount of friction the object experiences. Both parameters can be found in an object's “Rigid body” panel: “@ mass” and “@ object friction”.
The second similarity is that a moving body always has a certain velocity. The object's speed is the result of acceleration. You can observe acceleration processes in daily life, for example when a train leaves a station after a halt. At the beginning, the motion is very slow, but becomes faster and faster until the body has reached its final (or target) velocity. From this moment, the object does not have to be accelerated anymore. With rotations it is the same. When you switch on a fan, it also takes some time until the blades have reached their maximum speed.
Until now, our object performs a motion at a certain velocity, but that is only one part of the story, because the body should stop when it has reached a certain point in space or lower its speed at least. The process is called braking or deceleration. The strength of the braking process again depends on a force that must be high enough to counteract the body's motion and slow it down.
With these everyday examples, we have already covered the entire MultiServo's system:
- MultiServo Position Linear. The object tries to achieve a certain position. The velocity of the resulting motion depends on the adjusted forces, powers, mass and friction values, as well as other parameters.
- MultiServo Position Angular. Here, it is slightly different, because a mounted object cannot reach a given position, so in this case we are talking about angular positions, e.g. orientations.
- MultiServo Velocity Linear. When you use this node, the object tries to reach a certain target velocity.
- MultiServo Velocity Angular. In this case, the target is the angular velocity, or more commonly, the amount of degrees a body covers within a certain time-span.
Target vs. Target
One thing that has to be clarified is the “target” term, because, so far, it has been used in different ways. We have talked about target positions and target velocities, but what does that actually mean for a simulation?
The target position is the point in space the objects want to reach. A body's target velocity, on the other hand, is the speed the bodies want to acquire. All target position and velocity settings are made under the MultiServo's “Target” panel and there you have to specify three values for X, Y and Z. The following table shows you the different meanings of the “Target” values:
MultiServo Position Linear | The target distance the object should cover in metres. |
---|---|
MultiServo Position Angular | The targeted amount of degrees the object should cover. |
MultiServo Velocity Linear | The target velocity the object should achieve given in metres per second. |
MultiServo Velocity Angular | The target rotation speed the object should achieve, given in degrees per second. |
Please remember that these explanations are simplified and describe a two-body system with two objects: A and B. All targets refer to the object B's local system instead of the world system. In the case that object B is located in the scene's origin, the world system can be used. To get a better idea of these relations, please take a look at following examples:
In the first scenario we have a car (active rigid body) in front of a house (passive rigid body). The car should move away from the house in X direction with a velocity of 8 m/s. Here, the car is object A and the house is object B – the reference node. The “Target” values of the used “MultiServo Velocity Linear” are [8.0, 0.0, 0.0].
The second scene contains a vase with dry flowers (passive rigid body) and a candle (active rigid body). Both objects have a certain distance to each other. Now you want to avoid the candle's flame igniting the flowers. For this purpose, the candle should be moved away from the vase by 0.2 m in X direction. The vase acts as the reference object here and is tagged as “Object B”, while the candle is “Object A”. To perform the desired motion, a “MultiServo Position Linear” is used with a “Target” of [0.2, 0.0, 0.0].
As you can see from this example, it is important which node acts as object A or B, because each action will be performed relative to object B.
Physical Interaction of Bodies Linked by a MultiServo
Another interesting thing with the MultiServos system is how the coupled bodies move. Since the objects are physically related, they react on each other's behaviour. As a consequence, MultiServos allow you to simulate realistic phenomena like recoiling effects. For example, if both elements are free to move and you have entered a target distance of 20 m in X direction then each object will move 10 m – but only if they have exactly the same properties (mass, object friction, air friction etc.). If they are different, RealFlow will automatically calculate which distance each object will cover. If one object is fixed, the movable node will cover the entire 20 m. With velocities it is similar and both nodes “share” the target velocity accordingly.
Forces, Torques, Power
In order to accelerate the bodies, a force is required and if the motion is circular, we refer to torques. A torque is what you apply when you open a pickle jar or the cap of a bottle, and is measured in Newton metres [Nm]. The unit of forces is Newton [N].
Another parameter you can see is “Power” and it is given in Watts [W]. When you think of MultiServo's as small motors then you will recognize that power plays an important role as well. Power is responsible for how fast a current state can be changed in order to achieve the required target. The following example helps you to understand the role power plays with MultiServos:
Imagine a MultiServo with a very high force, but low power. In this case, the force creates a linear displacement, but this change of position is carried out slowly. When you use the same force as before and increase power to a very high value, the displacement is carried out immediately.
So, the main question is which force/torque or power you finally need to accelerate the engine? Of course, there is a physically correct method to calculate these values using masses, frictions and velocities, but we recommend starting with these values:
Force Total mass of the linked objects * 100
Power Force * 10
Brake force Force * 10
Brake power Power * 10
When you simulate, Caronte starts up in order to produce the change you want with the conditions you set. However, once the goal is achieved, it is necessary to stop and not go beyond it. This is why our motor also needs values for force and power to break (with the same meaning you saw before, but now the target is just to stop producing the change).
For example, imagine you want to move an object a certain distance. You start your motor and begin to push the object away, increasing the covered distance. Once you have covered exactly the distance you wanted, you have to brake, to not go too far from your final goal. If you do not have enough force or power to break immediately, the object will miss its target position and tries to go back to it again.
Multiple Targets
With a single target position we can create a linear motion: our two bodies will move until the final target position has been reached. Once this has happened, the MultiServo's forces stop acting on the bodies. However, there are many occasions where this linear motion is not enough; for example with cars. A car can perform turns or drive around curves, as a result of multiple targets. To achieve such behaviour, the individual “Target” values can be animated, but this is normally a rather difficult task. Therefore, another, more convenient method can be used instead:
- Add a basic object to the scene in your 3D program (cube, sphere etc.). This object will serve as a proxy for a more complex body, for example a fully featured car. The basic object should perform all the motions you want to see later in RealFlow. The object's motion can be stored in an animation path and exported as an SD file.
- Import the SD file into RealFlow and put the object (e.g. the car rig) at the exact initial position of the imported object.
- Add a “MultiServo Position Linear” node between the proxy object (“Rigids B”) and the object you want to move (“Object A”). The “Target” values are [ 0,0,0 ]. This means that both objects will perform exactly the same motion, because the main object will follow the proxy node, as it will try to keep its relative position in relation to the proxy: the relative positions between these nodes will remain the same, though the linked objects can move. Hide the proxy object and simulate the scene.
If the proxy object and the body you want to move (here, the car) should also have the same orientation, you must also add a “MultiServo Position Angular” node.