SmartTools
← All projects
Rigging & animation

The mechanical swimmer

Watch the six linked segments turn in sequence, with the forked tail following the head in a three-second swimming cycle.

Swimming cycle · 3 seconds, silent. Watch the turn travel from the body to the tail.

What you need

Blender 5.3.0

For the project exercises

SmartTools Selector

Click the tail photo to select its control bone

The head, body and tail are custom picture buttons. Click the head or tail to move the cyan selection to the corresponding control bone.

Selection after clicking the head photo
Selection after clicking the head photo
Custom browser buttons with the tail selected
Custom browser buttons with the tail selected
Selection after clicking the tail photo
Selection after clicking the tail photo
  1. Build the swimmer with this lesson and go to frame 9. Enable the browser selector in Smart Selector.
  2. Download Nautilus.json. Open the current project folder from Smart Selector, place the file there, refresh the list and open it in Play mode.
  3. Click the tail photo to select the tail control in Blender. In the picker’s Edit mode you can replace each picture and assign a bone from your own character.
Download this fish picker (JSON)
SmartTools Workspace

Select a key combination to see its assignments

These captures show Ctrl+S and Ctrl+Shift+S in the former editor. In Workspace, use the first section, Keymap, to inspect the same shortcuts.

Assignments for Ctrl + S
Assignments for Ctrl + S
Assignments after adding Shift
Assignments after adding Shift
ShortcutAction in 3D View
Shift + Alt + F6Play Animation
Shift + Alt + F6Jump to Endpoint
  1. The example assigns Shift + Alt + F6 to both Play Animation and Jump to Endpoint in the 3D View.
  2. Open the conflict view and compare the two actions and their keymap. Choose which action should keep the shortcut before editing your own bindings.

Recreate the finished image in Blender

No model or texture download is needed. Use the lesson below to build this scene in three passes, from the first shapes to the camera view. Pause between passes to inspect the model and materials.

Select a product name for its manual. In Blender, open Edit → Preferences → Add-ons and enable the products listed here.

This lesson uses neither Auto-Rig Pro nor Simply Cloth Studio.

Start a new study scene

Save your current file and choose File → New → General. Open the Scripting workspace, choose New in the Text Editor, then expand the scene recipe below. Copy all of it and paste it into the Text Editor.

Open the scene recipe
import bpy
import importlib
import math
import random
from math import cos, sin, pi, tau
from mathutils import Vector, Quaternion

def product_module(path):
    base, _, sub = path.partition('.')
    actual = next((a.module for a in bpy.context.preferences.addons if a.module.rsplit('.', 1)[-1] == base), None)
    if actual is None:
        raise RuntimeError('Enable the required SmartTools extension in Preferences: ' + base)
    return importlib.import_module(actual + ('.' + sub if sub else ''))

def product_symbol(path, name):
    module = product_module(path)
    if hasattr(module, name):
        return getattr(module, name)
    return importlib.import_module(module.__name__ + '.' + name)

def drawing(scene):
    builders=product_module('smart_shader_suite.builders')
    def bx(name, loc, dim, m, r=0.04):
        bpy.ops.mesh.primitive_cube_add(size=1, location=loc)
        o = bpy.context.object
        o.dimensions = dim
        bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
        return finish(o, name, m, r)
    def finish(o, name, m, r=0):
        o.name = name
        o.data.materials.append(m)
        if r:
            be = o.modifiers.new('Highlight radius', 'BEVEL')
            be.width = r
            be.segments = 4
            be.harden_normals = True
            o.modifiers.new('Planar normals', 'WEIGHTED_NORMAL')
        return o
    def ball(name, loc, scale, m):
        bpy.ops.mesh.primitive_uv_sphere_add(segments=48, ring_count=32, location=loc)
        o = bpy.context.object
        o.scale = scale
        for f in o.data.polygons:
            f.use_smooth = True
        return finish(o, name, m)
    def cyl(name, loc, r, d, m, rot=(0, 0, 0), edge=0.015):
        bpy.ops.mesh.primitive_cylinder_add(vertices=80, radius=r, depth=d, location=loc, rotation=rot)
        o = bpy.context.object
        for f in o.data.polygons:
            f.use_smooth = len(f.vertices) == 4
        return finish(o, name, m, edge)
    def mesh(name, loc, verts, faces, m):
        me = bpy.data.meshes.new(name)
        me.from_pydata(verts, [], faces)
        me.update()
        o = bpy.data.objects.new(name, me)
        scene.collection.objects.link(o)
        o.location = loc
        for f in me.polygons:
            f.use_smooth = True
        return finish(o, name, m)
    def mat(name, c, metal=0, rough=0.4, em=0):
        m = bpy.data.materials.new(name)
        m.use_nodes = True
        b = m.node_tree.nodes.get('Principled BSDF')
        b.inputs['Base Color'].default_value = (*c, 1)
        b.inputs['Roughness'].default_value = rough
        b.inputs['Metallic'].default_value = metal
        if em:
            b.inputs['Emission Color'].default_value = (*c, 1)
            b.inputs['Emission Strength'].default_value = em
        return m
    def shader(name, fn, c, **props):
        m = bpy.data.materials.new(name)
        getattr(builders, fn)(m, dict(base_color=[*c, 1], **props))
        assert any((n.type == 'BSDF_PRINCIPLED' for n in m.node_tree.nodes))
        return m
    def brushed(name, c):
        return shader(name, 'build_brushed_metal', c, roughness=0.29, anisotropy=0.48, brush_scale=145, detail_bump=0.014)
    def aim(o, p):
        o.rotation_euler = (Vector(p) - o.location).to_track_quat('-Z', 'Y').to_euler()
    def light(name, pos, target, power, col, w, h=None):
        d = bpy.data.lights.new(name, 'AREA')
        d.energy = power
        d.color = col
        d.shape = 'RECTANGLE'
        d.size = w
        d.size_y = h or w
        o = bpy.data.objects.new(name, d)
        scene.collection.objects.link(o)
        o.location = pos
        aim(o, target)
    def studio(bg, lightcol=(1, 0.85, 0.65)):
        bx('Seamless studio floor', (0, 0, -0.24), (200, 200, 0.45), mat('Set', bg), 0)
        light('Large diffusion', (-4.4, -5, 7), (0, 0, 1.6), 640, (1, 0.91, 0.8), 5)
        light('Warm rim', (1.3, 3, 5), (0, 0, 1.5), 760, lightcol, 3.8)
        light('Cool strip', (4, -1.2, 3.1), (0, 0, 1.4), 300, (0.6, 0.82, 1), 1.5, 4)
    def shoot(pos, target, scale, lens=None):
        cd = bpy.data.cameras.new('Art direction')
        cam = bpy.data.objects.new('Art direction', cd)
        scene.collection.objects.link(cam)
        scene.camera = cam
        cam.location = pos
        aim(cam, target)
        if lens:
            cd.lens = lens
        else:
            cd.type = 'ORTHO'
            cd.ortho_scale = scale
        bpy.context.view_layer.update()
        cd.smart_camlight_settings.rig_target_distance = (Vector(target) - cam.location).length
        assert bpy.ops.smart_camlight_suite.create_camera_rig(camera_name=cam.name) == {'FINISHED'}
        assert any((c.type == 'TRACK_TO' and c.target for c in cam.constraints))
    world = bpy.data.worlds.new('Ambient')
    scene.world = world
    world.use_nodes = True
    world.node_tree.nodes['Background'].inputs[0].default_value = (0.26, 0.34, 0.44, 1)
    world.node_tree.nodes['Background'].inputs[1].default_value = 0.27
    scene.render.engine = 'CYCLES'
    scene.cycles.samples = 24
    scene.cycles.use_denoising = True
    scene.render.threads_mode = 'FIXED'
    scene.render.threads = 5
    scene.render.resolution_x = 1120
    scene.render.resolution_y = 730
    scene.render.resolution_percentage = 100
    scene.render.image_settings.color_mode = 'RGB'
    deep = mat('Petrol enamel', (0.018, 0.16, 0.2), 0.52, 0.24)
    cream = mat('Porcelain enamel', (0.79, 0.84, 0.78), 0.36, 0.26)
    orange = mat('Vermilion lacquer', (0.92, 0.105, 0.018), 0.46, 0.25)
    steel = mat('Machined stainless', (0.39, 0.48, 0.52), 0.83, 0.22)
    glass = mat('Signal cyan', (0.04, 0.82, 0.78), 0.2, 0.23, 0.8)
    def fin(name, outline, thickness, material):
        pts = [(x, y + dy, z) for dy in (-thickness / 2, thickness / 2) for (x, y, z) in outline]
        n = len(outline)
        faces = [tuple(range(n - 1, -1, -1)), tuple(range(n, n * 2))] + [(i, (i + 1) % n, (i + 1) % n + n, i + n) for i in range(n)]
        o = mesh(name, (0, 0, 0), pts, faces, material)
        for p in o.data.polygons:
            p.use_smooth = False
        bevel = o.modifiers.new('Rounded rim', 'BEVEL')
        bevel.width = 0.026
        bevel.segments = 3
        return o
    black = mat('Graphite', (0.016, 0.022, 0.029), 0.55, 0.28)
    gold = brushed('Champagne brass', (0.61, 0.36, 0.13))

    hair_chain = product_symbol('smart_rig_suite', 'hair_chain')
    advanced_tween_value = product_symbol('smart_animation_suite.algorithms', 'advanced_tween_value')
    studio((0.02, 0.057, 0.074), (0.42, 0.94, 1))
    rig = bpy.data.objects.new('Nautilus | articulated swimmer', bpy.data.armatures.new('Spine'))
    scene.collection.objects.link(rig)
    xs = [-2.1, -0.87, -0.15, 0.53, 1.11, 1.67, 2.2]
    z = 1.43
    pts = [Vector((x, 0, z)) for x in xs]
    (report, error) = hair_chain.build(rig, [dict(key='axial', points=pts, bone_length=0.72)], prefix='swim', master=False, roll_target=(0, 0, 1))
    assert report and (not error) and (len(rig.pose.bones) == 6), (report, error)
    wh = [(0.82, 0.51, 0.58), (0.62, 0.49, 0.6), (0.53, 0.39, 0.51), (0.45, 0.31, 0.4), (0.37, 0.23, 0.29), (0.34, 0.15, 0.2)]

    yield
    for (i, (a, b)) in enumerate(zip(xs, xs[1:])):
        group = []
        mid = (a + b) / 2
        (rx, ry, rz) = wh[i]
        group.append(ball('Armored hull', (mid, 0, z), (rx, ry, rz), cream if i in (0, 2, 4) else deep))
        group.append(ball('Dorsal shell', (mid + 0.02, 0, z + rz * 0.55), (rx * 0.82, ry * 0.86, rz * 0.47), orange if i in (0, 3) else deep))
        if i < 5:
            group.append(ball('Articulating joint', (b, 0, z), (0.24, ry * 0.8, rz * 0.7), black))
        for side in (-1, 1):
            group.append(cyl('Fin pivot', (mid + 0.13, side * ry * 0.9, z - 0.03), 0.13 if i < 3 else 0.075, 0.04, gold, (pi / 2, 0, 0)))
            if i == 0:
                group.append(ball('Optical bezel', (mid - 0.28, side * ry * 0.88, z + 0.14), (0.19, 0.076, 0.18), black))
                group.append(ball('Optic', (mid - 0.3, side * ry * 0.99, z + 0.145), (0.087, 0.026, 0.083), glass))
            if i == 1:
                group.append(fin('Paired diving plane', [(mid - 0.32, side * 0.28, z + 0.08), (mid - 0.12, side * 0.64, z), (mid + 0.52, side * 1.19, z - 0.4), (mid + 0.39, side * 0.65, z - 0.2), (mid + 0.43, side * 0.29, z)], 0.065, orange))
        if i in (1, 2, 3):
            group.append(fin('Dorsal vane', [(a + 0.06, 0, z + rz * 0.68), (a + 0.33, 0, z + rz + 0.29), (b + 0.13, 0, z + rz + 0.44), (b - 0.02, 0, z + rz * 0.71)], 0.07, deep))
        if i == 5:
            group.append(fin('Forked caudal fin', [(mid - 0.14, 0, z), (mid + 0.19, 0, z + 0.31), (mid + 0.99, 0, z + 0.91), (mid + 0.78, 0, z + 0.29), (mid + 0.55, 0, z), (mid + 0.83, 0, z - 0.6), (mid + 0.93, 0, z - 0.88), (mid + 0.12, 0, z - 0.32)], 0.12, orange))
        (rr, err) = hair_chain.bind_rigid(group, rig, f'swim_axial_{i + 1:02d}', group_prefix='swim')
        assert rr and (not err) and all((any((m.type == 'ARMATURE' for m in o.modifiers)) for o in group))

    yield
    shoot((-4.5, -8.4, 6.2), (0.17, 0, 1.45), 6.8)
    for f in range(49):
        for (i, pb) in enumerate(rig.pose.bones):
            phase = f / 48 * 8 - i * 0.69
            k = math.floor(phase)
            off = phase - k

            def angle(n):
                return sin(n * tau / 8) * (0.13 + i * 0.083)
            a = advanced_tween_value(angle(k - 1), angle(k), angle(k + 1), angle(k + 2), off, 'HERMITE')
            axis = pb.bone.matrix_local.to_3x3().inverted() @ Vector((0, 0, 1))
            pb.rotation_mode = 'QUATERNION'
            pb.rotation_quaternion = Quaternion(axis.normalized(), a)
            pb.keyframe_insert(data_path='rotation_quaternion', frame=f)
        rig.location = (0.16 * cos(f * tau / 48), 0.09 * sin(f * tau / 48), 0.09 * sin(f * tau / 48))
        rig.keyframe_insert(data_path='location', frame=f)
    scene.frame_set(9)

    yield


course_key = 'SmartTools lesson / swimmer'
session = bpy.app.driver_namespace
current = session.get(course_key)
if not current or current[0] != bpy.context.scene:
    for required in ['smart_animation_suite', 'smart_camlight_suite', 'smart_rig_suite', 'smart_shader_suite']:
        product_module(required)
    scene = bpy.data.scenes.new('Study / swimmer')
    bpy.context.window.scene = scene
    current = [scene, drawing(scene), 0]
    session[course_key] = current
if current[2] < 3:
    next(current[1])
    current[2] += 1
    current[0]['Lesson step'] = current[2]
    bpy.context.view_layer.update()

Click ▶ Run Script at the top of the Text Editor once per step, three times in total. The first click opens a separate study scene. Between clicks, hover over the 3D Viewport and press Home to frame the objects.

  1. Build the six-bone spine
  2. Bind the body and fins
  3. Animate the swim and frame pose 9
Geometry after step two: The mechanical swimmer
After step two. The solid view isolates the forms and their positions before the final render.

Render and save the finished image

Choose View → Cameras → Active Camera and compare the framing with the image above. Choose Render → Render Image (F12), then Image → Save As in the render window to save a PNG. Save the .blend file to keep the editable scene.

Change one detail yourself

Alternate between frames 9 and 21. Watch the tail tip and the middle of the body: bending travels through the six segments with a delay.

The still uses frame 9. Play frames 0–47 on the timeline to watch the bend travel down the body.

If you close the file between steps, start the lesson again in a new file.

Use this when

How do rigid plates follow a swimming motion?

Each plate follows one bone. Offsetting the rotation down the spine sends a wave into the tail.

Detail from the finished render
Watch the turn travel down the tailDetail from the finished render

Watch the turn travel down the tail

Six bones run from the body to the tail, each carrying a shell segment. Pause the clip and scrub forward to see the tail change direction after the head.

Build a Bone Chain on a Tail

Where the tools were used

  1. 01

    Spine and tail rig

    Smart Rig builds the six-bone chain and rigidly binds the armor, fins and joints.

    Bind the armor to a six-bone spine

    The armor and fins follow a six-bone chain. The spine shown here is projected from the actual head and tail of each pose bone, through the scene camera at each frame.

    Frame 9, with the six bones visible inside the armor
    Frame 9, with the six bones visible inside the armor
    Frame 32, with the tail bending along the same chain
    Frame 32, with the tail bending along the same chain
    SmartTools Rig walkthrough ↗All controls and documentation
    Related worked example · Build a Bone Chain on a Tail
    1. Put the rig in "Target Rig Armature" under "1. Setup and Parts" > "Workflow Targets".
    2. In Object Mode, select the tail mesh.
    3. In "4. Hair, Costume & Hard Parts" > "Chain on Selected Part", set the shape to "Strand", the name to "tail", "Bones" to 6, "From" to head, and the jiggle to "Short hair".
    4. Set the joint field to "Even" and click "Build Chain".

    In "After", six bones run from the base to the tip inside the tail. The third picture shows the chain bones bent a little, and the tail mesh bends along with the bones, which shows that the binding and weights are done.

    View the captured example
  2. 02

    Timing the swim

    Smart Animation’s Hermite tween blends segment rotations. Larger offsets at the tail give it a wider sweep.

    Carry the wave down the articulated tail

    Hermite interpolation connects the joint rotations. Compare frames 9 and 32 from the same camera, then play the cycle at the top of this page.

    Tail curve at frame 9
    Tail curve at frame 9
    Rotation curves driving the turn, with the playhead at frame 32
    Rotation curves driving the turn, with the playhead at frame 32
    Tail returning at frame 32
    Tail returning at frame 32
    SmartTools Animation walkthrough ↗All controls and documentation
    Related worked example · Create an In-Between Weighted Toward the End Between Two Poses
    1. Select a cube with keys at frames 1 and 41, and place the playhead at frame 21.
    2. In "Motion Director", set "Mode" to "Tween Only" and "Tween" to 0.85.
    3. Click "Run Motion Director".

    Before, at frame 21 the cube is exactly midway between the two frames and has rotated only halfway (45 degrees). After, the new in-between key moves it close to the right frame (the next key), and the rotation also approaches the orientation of the next key.

    View the captured example
  3. 03

    Camera

    A target-tracking camera holds the framing.

    SmartTools CamLight walkthrough ↗All controls and documentation
    Create Camera Rig
    1. Creates the rig and leaves the target selected. When you move the target, the camera turns to face it. This camera's previous rig markers and constraints are replaced with new ones.
  4. 04

    Metal highlights

    A brushed metal material gives the brass parts their directional highlights.

    SmartTools Shader walkthrough ↗All controls and documentation
    Compare six materials on the same shape
    1. Select the mesh and switch the viewport to Material Preview.
    2. Press N. In Smart Shader → PBR Material Generator, select the PBR category and the Brushed Metal preset.
    3. Create the preset look material. In the Shader Editor, inspect the new material. Its Principled shader has Metallic set to 1.0.

Choose products for this work

Sales open January 1, 2027. One-time prices in USD. Local taxes may apply.

Extend your workflow

Included tools used here
SmartTools Rig · SmartTools Animation

Tools used here outside this bundle
SmartTools CamLight · SmartTools Shader

Bundle plus the listed tools outside it: $102
For just the listed tools, individual purchases cost $11 less.

Also in the bundle
SmartTools Shapekey · SmartTools Selector

Compare all four bundles and the complete collection →

The Auto-Rig Pro workflow requires a separate purchase. Hair chains and weights work in Smart Rig alone. Integration requirements

← Explore more projects