|On this page|
Objects that move quickly can cause energy to build up in cloth that’s moving with them. This can occur when a whole character is moving quickly, or when a body part is moving quickly. Velocity blending and reference frame are two methods that can be used to produce more desirable results. Velocity blending is typically used on a quick moving body part, such as a swinging arm. Reference frame is typically used on a whole character moving fast, such as a superhero and his cape.
The parameter that controls Velocity Blending is located on the Vellum Attach node, or more specifically the Vellum Constraints node where the Constraint Type is set to Attach to Geometry. This Velocity Blend parameter is useful to allow the cloth to anticipate motion, which will avoid problems cause by sudden movements. Velocity blending takes the constraints that attach to the geometry and blend in the target’s velocity.
For example, if a character is wearing a bracelet and swinging its arm, you would want the bracelet to stay relatively in the same place. Turning on Velocity Blending solves the problem of having too much built up energy in the constraints that can cause the bracelet to look like it’s bouncing. Velocity blending is also useful to have on sleeves that can follow the end of a fast moving arm. If you wait for the collision to pull the sleeve back, you will have a large drag effect. Forcing the sleeve to start accelerating because the arm is accelerating will solve these issues.
Velocity blending requires the target to have a
v point attribute to provide local velocity. If your geometry doesn’t have velocity, you can use a Point Velocity SOP.
Velocity blending can also be used to subdue rapidly moving cloth, such as a clothing on a fast moving character. In the following video, the character on the right has velocity blending turned on. You can see that his clothing doesn’t build up energy like it does for the character on the left.
The Vellum Reference Frame node ties points in a vellum object to a reference frame that is defined by animated geometry. It is similar to velocity blending, but works globally instead of on a specific part of a character.
This method is useful when you have an character that is moving quickly or parented to another object that’s moving around, and you want its cloth to move with respect to the character, not with respect to the world scene. For example, a cape on a superhero that you want to apply wind force to. It allows you to work in a difference space than the actual world space, while all of the collisions still take place in the larger space.
Reference frame and velocity blending can also be used together in the same simulation. For example, if you have a character that is moving fast, but also jerks his arm up. You could use a reference frame to slow down or re-frame where the simulation is happening, and then use velocity blending on top of that for the sleeve when the character jerks his arm up.
There are attributes on the vellum object’s points that specify whether or not they follow a reference frame. This node changes their velocities and acceleration according to the reference frame change.
Whether you're moving 100km/hr or stopped, the cloth will behave the same, since the acceleration is what causes the cloth to do something interesting. The acceleration component is controlled by the Velocity Compensation parameter. This parameter controls how much it will adjust the velocity to take into account the acceleration of the reference frame. For example, if your animation goes from stopped to suddenly moving very quickly upwards, the cloth would rip down. However, with the proper Velocity Compensation, it will smoothly start moving upwards as a whole.
The second important component is wind forces. Wind forces matter if your character or object is moving 100km/hr. If you have the wind set at 0, 0, 0 and have the object moving 100km/hr to the side, the cloth will be abruptly dragged backwards.
The default Vellum Solver has wind on by default at 0, 0, 0.
One way to compute a wind that cancels out quick motion is by using complicated expressions in the Wind parameter on Vellum Solver. However, an easier way is to use the Drag Compensation parameter on the Vellum Reference Frame node. This parameter will adjust any wind speeds, not just on the Vellum Solver, but also on any POP Wind or POP Drag forces you add, since it adjusts what the target velocity is by the velocity of the reference frame. A value of 0 will keep the wind velocity unchanged, a value of 1 will add in the reference frame velocity, and a value of 0.5 will add in half of the reference frame velocity.
The Acceleration Threshold parameter applies to when to trigger the velocity compensation. For example, if a character is simply walking, you may not need to use the velocity compensation. You will most likely only care about accelerations that are very large, such as when the character suddenly gets dragged to the side. The Acceleration Threshold is meant to handle the amount of acceleration at which it will start doing the velocity compensation.
Make sure the number of Substeps on the Reference Frame node is the same as the number of Substeps on the Vellum Solver. These values must match, because the simulation needs to be computed at the same rate.