Door Hinges
In this scene, a typical door hinge setup is created. The door is connected to a frame and a rolling ball opens it.
The scene setup for this tutorial.
Here is the nodes list:
- 3 “Cube” objects (door, frame, ground)
- 1 “Sphere” objects (wrecking ball, steering geometry)
- 2 “Null” objects (locators)
- 1 “Gravity” daemon
- 1 “MultiJoint” node
All scene elements can be added from RealFlow's “Edit” menu:
- Add > Objects | Daemons
RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys.
Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD ↔ Curve
Viewport perspective is changed with the 1, 2, 3, and 4 keys.
Shading modes are toggled with the 7, 8, 9, and 0 keys.
The Setup
- Add a cube object and rescale/position it to your needs. This node (“Cube01”) will serve as the ground.
- Another cube (“Cube02”) represents the door. Rescale it with the E key.
- Rename "Cube02" to "Door" with a right-click on the node. Then, choose "Rename" from the context menu.
- The third cube (“Cube03”) is the frame. Leave a small gap between door and frame.
- Rename "Cube03" to "Frame" with a right-click on the node. Then, choose "Rename" from the context menu.
- Null objects are placed in the gap between the frame and the door. Rename the nulls to "Hinge 1" and "Hinge 2"
- “Gravity” introduces a force.
- A sphere is placed near the door: it should hit the door when it is moving.
“Cube01” and “Sphere01” are active rigid bodies, the other polygon objects are passive rigid bodies:
- Selected node > Node Params > Node > Dynamics
Now, add a MultiJoint and open its “Creation” panel under “Node Params”:
Objects A > Cube02
Objects B > Cube03
Select Mode > At locators positions
Locators > Null01, Null02
Create/Recreate
Move the “Sphere01” Node
The sphere is an active rigid body and only attracted by gravity. To make it move in a certain direction it needs some initial velocity:
- Selected node > Node Params > Rigid body > @ velocity
Determine the sphere's motion direction, e.g. in positive or negative X direction and type in an appropriate value. With higher settings, the object will be faster and touch the ground later. The sphere must hit the door to open it. Make some test simulations to find a working “@ velocity” value.
Adjusting the Remaining Parameters
With rigid body dynamics, mass plays an important role. To change the objects' masses, go to
- Selected node > Node Params > Rigid body > @ mass
The door's mass should be smaller than the mass of the sphere. You can experiment with various settings, and also play with different “@ friction”, and “@ elasticity” values.
Simulate
Limit the simulation to 75 frames and click on “Simulate”.