この作業から始める
白い陶器が平板で、丸みが伝わらない
釉薬の違う二つの花器を同じ展示台に置き、口縁と肩に入る光を見せています。
Blender 5.3.0
作品用のモデルやテクスチャのダウンロードは不要です。下の教材で、形を組むところからカメラで撮るところまでを3回に分けて進めます。各段階で手を止めて、形や材質を自分の画面で確認できます。
製品名を押すと各解説書が開きます。Blenderの「編集」→「プリファレンス」→「アドオン」で上記の製品を有効にします。
作業中のファイルを保存し、「ファイル」→「新規」→「全般」を開きます。画面上の「Scripting」を開き、テキストエディターの「新規」を押します。下の「教材コード」を開いて全文をコピーし、テキストエディターに貼り付けます。
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 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 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 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'
gold = brushed('Champagne brass', (0.61, 0.36, 0.13))
studio((0.145, 0.077, 0.073), (1, 0.58, 0.33))
glaze = shader('Celadon glaze', 'build_ceramic_coat', (0.25, 0.53, 0.44), roughness=0.22, coat_weight=0.65, coat_roughness=0.04, speckle_scale=160.0)
ivoryglaze = shader('Ivory porcelain', 'build_ceramic_coat', (0.89, 0.75, 0.53), roughness=0.19, coat_weight=0.65, coat_roughness=0.04, speckle_scale=160.0)
plinth = mat('Sandstone', (0.5, 0.32, 0.22), 0, 0.59)
bx('Gallery step', (0, 0.5, 0.11), (3.65, 2.11, 0.22), plinth, 0.035)
for (name, x, y, size, m) in [('Celadon vessel', -0.53, 0.24, 1.0, glaze), ('Ivory vase', 0.68, 0.08, 0.66, ivoryglaze)]:
v = lathe(name, (x, y, 0.22), [(0.19, 0), (0.32, 0.03), (0.49, 0.24), (0.54, 0.54), (0.46, 0.78), (0.24, 1.0), (0.18, 1.19), (0.19, 1.27), (0.16, 1.28), (0.146, 1.22), (0.14, 1.06), (0.22, 0.86)], m)
v.scale = (size, size, size * 1.23)
geo_ring('Metal foot', (x, y, 0.24), 0.25 * size, 0.018, gold)
yield
for i in range(3):
tip = (-1.05 + 0.2 * i, 0.3 + 0.11 * i, 2.21 + 0.14 * i)
line('Dried stem', [(-0.53, 0.24, 1.64), (-0.55 - 0.07 * i, 0.27, 1.92), tip], 0.012, gold)
for j in range(3):
ball('Seed pod', (tip[0] + 0.032 * j, tip[1], tip[2] - 0.073 * j), (0.038, 0.023, 0.071), gold)
yield
shoot((2.05, -5.3, 2.75), (0, 0.21, 1.24), 4.32)
yield
course_key = 'SmartTools lesson / ceramics'
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']:
product_module(required)
scene = bpy.data.scenes.new('Study / ceramics')
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()
テキストエディター上部の ▶「スクリプト実行」を1回ずつ、合計3回押します。1回目で教材専用シーンに切り替わります。各回の間に、3Dビューにカーソルを置き「Home」で全体を表示できます。

「ビュー」→「カメラ」→「アクティブカメラ」で上の掲載画像と構図を見比べます。「レンダー」→「画像をレンダリング」(F12)を選び、表示された画像の「画像」→「名前を付けて保存」でPNGを保存します。教材シーンを後から編集するには、.blendファイルも保存します。
「Celadon vessel」を選んでシェーダーエディターを開くと、釉薬のノードを確認できます。隣の「Ivory vase」には別の釉薬が割り当てられています。
途中でファイルを閉じた場合は、新規ファイルで教材を最初から実行してください。
釉薬にはコートの反射、足元には細い金属の縁を加え、輪郭の違いを光で見せました。
セラミックコートの色と粗さを変え、青磁と白磁を同じ照明で撮り分けています。
SmartTools Shader の操作を見る ↗全機能と操作解説径の違うリングを生成し、花器の高台に沿わせました。
SmartTools Geometry の操作を見る ↗全機能と操作解説台座の奥行きと花器の高さが見える位置にカメラリグを置きました。
SmartTools CamLight の操作を見る ↗全機能と操作解説2027年1月1日発売予定。表示は税込・買い切り価格です。
白い陶器が平板で、丸みが伝わらない
掲載した単品の合計 ¥4,440
この作品で使った収録製品
SmartTools Shader · SmartTools CamLight
セット外の使用製品
SmartTools Geometry
パックとセット外の掲載単品の合計 ¥6,460
掲載機能だけなら、単品の合計が¥2,020安くなります。
ほかに含まれる製品例
SmartTools Paint · SmartTools Node