On this page |
Overview ¶
Wire simulations are useful for simulating anything long and flexible, for example grass, fur, or even scaffolding. When wire objects are used with constraints, they can be used to simulate things such as ropes swinging, bungee jumping cords springing, or a tail of a kite, as well as for effects like a structure of collapsing girders.
{Pic}
Houdini’s wire solver is quite fast. It’s often worth trying to find ways to use the wire solver to achieve effects involving bending or springy objects, because it’s so fast.
How to ¶
To... | Do this | ||||||||
---|---|---|---|---|---|---|---|---|---|
Create a field of curves to use as wires |
Creating a field of wires is really just creating a field of curves at the geometry (SOP) level and then importing that geometry into a dynamics network with the Wire Object node. One way to create a field of curves at the SOP level is:
{Pic} |
||||||||
Convert an object to wires |
See configuring wires below. |
||||||||
Constrain wire points |
The tools on the Wires shelf tab let you set up constraints on the positions of wire points. To pin to a position in space, use the Wire Pin Constraint or Wire Spring Constraint. |
||||||||
Pin wires to a simulated object |
(see the helpfor Attach Wire to Surface for more on how to use the tool). |
||||||||
Pin wires to a surface |
You can pin wire points to their positions in the source geometry with the In the wire source geometry network, create a group containing the root points, and use the AttribCreate node to create the attribute. Use the following settings:
|
||||||||
Deform geometry based on a dynamics wire |
You can use a curve being controlled by a wire simulation to drive the deformation of a model. For example, you can model a snake and control it with a dynamics wire. Deforming geometry based on a dynamics wire is basically the same problem as deforming geometry based on a curve. Create a control curve to represent the object you want to deform, and make it a simulated wire using the shelf tools. Add any constraints and forces you want to the simulated wire. Then, create the Wire Capture surface node to capture the geometry you want to deform to the wire geometry. In the Wire Capture node’s parameters, click the Capture tab and set the Min/Max weight to |
Wire network ¶
TBD.
Configuring wires ¶
-
Click the Physical tab to set the physical properties of the wire. The density and width affect the overall mass of the wire. The width also affects collisions. You can also set these (as well as per-point mass) through attributes on the source geometry.
-
The Linear spring constant is the wire’s resistance to stretching. Decrease this value to make the wire more stretchy.
-
The Angular spring constant is the wire’s resistance to bending. Decrease this value to make the wire looser, or increase it to make the wire more stiff.
-
To get a completely loose wire (like a rope or string), set Angular spring constant to 0. However, when Angular spring constant is 0, you must add an Angular damping constant (such as
0.001
). If both Angular spring constant and Angular damping constant are0
, the wire can go crazy. -
To simulate “fat” wires, change the Width on the Wire Object node’s Physical tab. This affects the mass of the wires (it is multiplied by the Density) as well as collisions with other objects. You can visualize the width of the wires by turning on Width on the Wire Object’s Visualization tab. This displays the wires as tubes in the viewport.
-
To set physical properties per-point, use point attributes on the source geometry (see below).
-
To have the wires in a wire object collide with themselves and each other, turn on Self collisions on the Wire Object’s Collisions tab. This will slow down the simulation but not by much. If you still find fast moving wires are interpenetrating, turn up the Minimum Substeps parameter on the Wire Solver DOP.
Useful point attributes ¶
You can override or scale (depending on the attribute) the default properties set up by the Wire Object node using point attributes on the wires. See the Wire Object help for a list of attributes used by wires.
The wire solver uses the values of the attributes if they are present on the wire geometry, otherwise it uses the defaults defined by the parameters of the Wire Object node.
pintoanimation
Setting this to 1
on a point will prevent the wire solver from affecting the point’s position, meaning it will use its position any any animation from the source geometry.
This is very useful to anchor root points on an object, and have them follow the object’s animation.
gluetoanimation
Like pintoanimation
, but in addition to position it uses the point’s normal in the source geometry to orient the wire.
The wire solver automatically keeps the point position and the v
(velocity) point attribute, angvel
(angular velocity) attribute, and orient
(orientation quaternion) attribute up to date.
Example: toppling scaffolding ¶
-
Convert your curves or lines to wire objects using the Wire Object tool on the Wires tab of the shelf.
-
Use either a Wire Pin Constraint or a Wire Spring Constraint to constrain the points of the pieces of scaffolding together.
-
If you used a wire pin constraint, keyframe when the constraint should break by changing the Activation to 0.
If you used a wire spring constraint, you can either keyframe when the constraint should break by changing the Activation to 0 or set a Maximum Force or Maximum Length on the Spring tab of the parameter editor. Once the spring reaches the maximum force or length the constraint will break.
Note
Using a Wire Spring Constraint will allow you to set a Maximum Force or Maximum Length on the Spring tab in the parameter editor to indicate when the constraint should break. However, the Wire Pin Constraint does not have these parameters.
-
Create a Rigid Body Object that will bump into the scaffolding.
-
Apply Gravity to the objects in your scene to make them look as if they are falling naturally.