Start with this task
How do rigid plates follow a swimming motion?
Watch the six linked segments turn in sequence, with the forked tail following the head in a three-second swimming cycle.
Blender 5.3.0
The head, body and tail are custom picture buttons. Click the head or tail to move the cyan selection to the corresponding control bone.
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.
| Shortcut | Action in 3D View |
|---|---|
| Shift + Alt + F6 | Play Animation |
| Shift + Alt + F6 | Jump to Endpoint |
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.
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.
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.

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.
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.
Each plate follows one bone. Offsetting the rotation down the spine sends a wave into 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 TailSmart Rig builds the six-bone chain and rigidly binds the armor, fins and joints.
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.
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 exampleSmart Animation’s Hermite tween blends segment rotations. Larger offsets at the tail give it a wider sweep.
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.
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 exampleA target-tracking camera holds the framing.
SmartTools CamLight walkthrough ↗All controls and documentationA brushed metal material gives the brass parts their directional highlights.
SmartTools Shader walkthrough ↗All controls and documentationSales open January 1, 2027. One-time prices in USD. Local taxes may apply.
How do rigid plates follow a swimming motion?
Total for these individual tools $91
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
The Auto-Rig Pro workflow requires a separate purchase. Hair chains and weights work in Smart Rig alone. Integration requirements