Start with this task
Finish a face without losing its expressions
A lit smile behind a curved visor, with the jacket, receiver and antenna visible in the same frame.
Blender 5.3.0
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.
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 rod(name, a, b, r, m):
v = Vector(b) - Vector(a)
o = cyl(name, (Vector(a) + Vector(b)) / 2, r, v.length, m, edge=min(r / 3, 0.024))
o.rotation_euler = v.to_track_quat('Z', 'Y').to_euler()
return o
def line(name, coords, r, m):
cu = bpy.data.curves.new(name, 'CURVE')
cu.dimensions = '3D'
cu.resolution_u = 16
cu.bevel_depth = r
cu.bevel_resolution = 4
sp = cu.splines.new('BEZIER')
sp.bezier_points.add(len(coords) - 1)
for (p, c) in zip(sp.bezier_points, coords):
p.co = c
p.handle_left_type = 'AUTO'
p.handle_right_type = 'AUTO'
o = bpy.data.objects.new(name, cu)
scene.collection.objects.link(o)
cu.materials.append(m)
return o
def lathe(name, loc, profile, m, scale_y=1):
verts = []
faces = []
n = 96
for (r, z) in profile:
for i in range(n):
a = tau * i / n
verts.append((r * cos(a), scale_y * r * sin(a), z))
for j in range(len(profile) - 1):
for i in range(n):
faces.append((j * n + i, j * n + (i + 1) % n, (j + 1) * n + (i + 1) % n, (j + 1) * n + i))
return mesh(name, loc, verts, faces, m)
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 lacquer(name, c):
return shader(name, 'build_auto_clearcoat', c, roughness=0.24, metallic=0.18, clearcoat=0.8, clearcoat_roughness=0.14, flake_scale=240, flake_bump=0.008)
def geo_ring(name, loc, major, minor, m):
data = vars(product_module('smart_geometry_suite.max_procedural_primitives.mesh_generators'))['make_torus'](dict(radius1=major, radius2=minor, segments=112, sides=16))
return mesh(name, loc, data['verts'], data['faces'], m)
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 text_obj(name, body, loc, size, m, rot=(pi / 2, 0, 0), align='CENTER'):
cu = bpy.data.curves.new(name, 'FONT')
cu.body = body
cu.size = size
cu.align_x = align
cu.align_y = 'CENTER'
cu.extrude = 0.001
o = bpy.data.objects.new(name, cu)
scene.collection.objects.link(o)
o.location = loc
o.rotation_euler = rot
cu.materials.append(m)
return o
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))
def active(o):
bpy.ops.object.select_all(action='DESELECT')
o.select_set(True)
bpy.context.view_layer.objects.active = o
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'
black = mat('Graphite', (0.016, 0.022, 0.029), 0.55, 0.28)
gold = brushed('Champagne brass', (0.61, 0.36, 0.13))
studio((0.056, 0.148, 0.16), (1, 0.46, 0.21))
cap = lacquer('Sea-glass enamel', (0.036, 0.4, 0.36))
cream = lacquer('Warm ceramic shell', (0.81, 0.71, 0.5))
jacket = shader('Woven amber jacket', 'build_fabric_wool', (0.69, 0.23, 0.048), roughness=0.7, sheen=0.38, fiber_scale=68, fuzz_strength=0.03)
glass = mat('Deep teal visor', (0.015, 0.081, 0.077), 0.65, 0.21)
lit = mat('Mint readout', (0.35, 0.98, 0.72), 0.05, 0.28, 0.9)
cyl('Ivory display base', (0, 0, 0.08), 1.34, 0.17, cream)
geo_ring('Brass edge', (0, 0, 0.165), 1.3, 0.022, gold)
for x in (-0.38, 0.38):
ball('Boot', (x, -0.1, 0.35), (0.3, 0.43, 0.21), black)
ball('Pant', (x, 0.015, 0.65), (0.23, 0.24, 0.41), cap)
lathe('Field jacket', (0, 0, 0), [(0.39, 0.7), (0.59, 0.78), (0.63, 1.12), (0.56, 1.4), (0.43, 1.57), (0.31, 1.58)], jacket, 0.78)
for side in (-1, 1):
a = (side * 0.5, 0, 1.44)
b = (side * 0.71, -0.09, 1.05)
rod('Sleeve', a, b, 0.18, jacket)
ball('Glove', (b[0], b[1] - 0.035, 0.91), (0.176, 0.16, 0.2), cream)
bx('Pocket', (-0.29, -0.449, 1.15), (0.24, 0.039, 0.24), cap, 0.047)
bx('Pocket tag', (-0.29, -0.48, 1.21), (0.13, 0.016, 0.027), gold, 0.009)
line('Jacket piping', [(0.12, -0.423, 0.8), (0.12, -0.502, 1.09), (0.12, -0.437, 1.39)], 0.019, gold)
yield
ball('Helmet', (0, 0, 2.02), (0.75, 0.66, 0.68), cap)
ball('Visor gasket', (0, -0.39, 2.06), (0.637, 0.339, 0.449), black)
ball('Visor pane', (0, -0.448, 2.055), (0.603, 0.318, 0.408), glass)
for x in (-0.22, 0.22):
ball('Display eye', (x, -0.745, 2.105), (0.059, 0.022, 0.092), lit)
mouth = ball('Expression strip', (0, -0.76, 1.928), (0.169, 0.019, 0.022), lit)
yield
active(mouth)
mouth.shape_key_add(name='Basis')
smile = mouth.shape_key_add(name='Smile')
for p in smile.data:
p.co.z += 1.45 * p.co.x ** 2
mod = mouth.modifiers.new('Surface finish', 'SMOOTH')
mod.factor = 0.15
mod.iterations = 1
apply_modifiers_with_shape_keys = product_symbol('smart_shapekey_suite.apply_modifiers_with_shape_keys.functions', 'apply_modifiers_with_shape_keys')
(ok, why) = apply_modifiers_with_shape_keys(bpy.context, [mod.name])
assert ok, why
assert mouth.data.shape_keys.key_blocks.get('Smile')
mouth.data.shape_keys.key_blocks['Smile'].value = 1
for s in (-1, 1):
cyl('Earpiece', (s * 0.71, -0.03, 2.0), 0.22, 0.13, gold, (0, pi / 2, 0))
cyl('Receiver', (s * 0.78, -0.03, 2), 0.155, 0.04, cream, (0, pi / 2, 0))
rod('Aerial', (0.46, 0.05, 2.48), (0.6, 0.07, 2.95), 0.032, gold)
ball('Aerial beacon', (0.6, 0.07, 2.95), (0.069,) * 3, lit)
text_obj('Base mark', 'FIELD / 03', (0, -1.344, 0.089), 0.079, black)
shoot((2.55, -7.7, 3.42), (0, 0, 1.45), 4.77)
yield
course_key = 'SmartTools lesson / character'
session = bpy.app.driver_namespace
current = session.get(course_key)
if not current or current[0] != bpy.context.scene:
for required in ['smart_camlight_suite', 'smart_geometry_suite', 'smart_shader_suite', 'smart_shapekey_suite']:
product_module(required)
scene = bpy.data.scenes.new('Study / character')
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.
Select Expression strip. In Object Data Properties, lower the Smile shape key from 1 to 0 to flatten the corners of the mouth. Set it back to 1 for the published expression.
If you close the file between steps, start the lesson again in a new file.
The mouth keeps its Smile shape key after smoothing, so the expression can still be adjusted for the shot.
The mouth has Basis and Smile keys. A single Smooth pass at 0.15 softens it. Smart Shapekey preserves Smile, set to 1 for this frame.
Apply Subdivision While Keeping Shape KeysApplied a Smooth modifier while preserving the shape key, then used it to lift the corners of the mouth.
Store the smoothed mouth’s Smile coordinates in two UV layers and restore them into a new shape key. The original key is set to zero in both shots.



Look at the wireframe lines. After applying, the mesh itself has become finer. If you then set smile to 1, both sides of the mouth rise, which shows that the Shape Keys still work.
View the captured exampleClear-coated enamel and a woven fabric shader give the helmet and jacket different highlights.
SmartTools Shader walkthrough ↗All controls and documentationGenerated the thin brass ring around the display base.
SmartTools Geometry walkthrough ↗All controls and documentationA target-tracking camera frames the full figure around a point between its face and body.
SmartTools CamLight walkthrough ↗All controls and documentationSales open January 1, 2027. One-time prices in USD. Local taxes may apply.
Finish a face without losing its expressions
Total for these individual tools $81
Included tools used here
SmartTools Shapekey
Tools used here outside this bundle
SmartTools Shader · SmartTools Geometry · SmartTools CamLight
Bundle plus the listed tools outside it: $121
For just the listed tools, individual purchases cost $40 less.
Also in the bundle
SmartTools Rig · SmartTools Animation