SmartTools
← All projects
Jewelry & texture painting

Koi enamel medallion

An ivory enamel face with a brass rim and chain. The koi comes from a PSD with separate base, marking and line layers.

Koi enamel medallion

What you need

Blender 5.3.0

Download the three-layer koi PSD · 186 KiB

For the project exercises

SmartTools Node

Untangle eight material nodes without changing their links

Open the material that composites the three layers and arrange its overlapping nodes in connection order. All ten links between the eight nodes remain intact.

Overlapping nodes before layout
Overlapping nodes before layout
Same links arranged in connection order
Same links arranged in connection order
  1. Open Koi / Body + Coral + Ink in the Shader Editor.
  2. Select the nodes and run Hierarchy Layout in Smart Node. Follow Body, Coral and Ink to the nodes that mix the layers.
SmartTools File

Relink a missing image and recover the enamel face

The dial turns magenta when the PNG for its red markings moves. Point the Smart File texture manager at the new folder and run Relink. The same markings reappear in the Image Editor.

Enamel face with the missing image
Enamel face with the missing image
Before relinking, the Coral image used on the face cannot be read
Before relinking, the Coral image used on the face cannot be read
Relink from the recovered folder and the red markings return to the same image
Relink from the recovered folder and the red markings return to the same image
The same face after relinking the PNG
The same face after relinking the PNG
  1. Set the Coral image node to an external Koi-Coral.png. In a copy of the project, move that PNG to a new folder and reload the image.
  2. In Smart File’s Texture Manager, choose the new directory and run Relink. Check the Coral node’s path and the red markings on the medallion.

Recreate the finished image in Blender

Download the three-layer PSD above. Save a new .blend in the same folder as koi-layers.psd, then run the lesson in three passes.

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

Start a new study scene

In the saved .blend, switch to Scripting. In the Text Editor choose New, then copy the full recipe below and paste it into the editor.

Open the scene recipe
"""The three-pass Blender lesson for the koi enamel medallion."""
import bpy
import importlib
import math
import numpy as np
from pathlib import Path
from mathutils import Vector

def addon(name):
    module=next((entry.module for entry in bpy.context.preferences.addons if entry.module.rsplit('.',1)[-1]==name),None)
    if module is None:
        raise RuntimeError('Enable the SmartTools extension: '+name)
    return module

def make_medallion(scene, source):
    def material(name,rgb,metal=0,rough=.32):
        mat=bpy.data.materials.new(name);mat.diffuse_color=(*rgb,1);mat.use_nodes=True
        bs=mat.node_tree.nodes.get('Principled BSDF')
        bs.inputs['Base Color'].default_value=(*rgb,1)
        bs.inputs['Metallic'].default_value=metal;bs.inputs['Roughness'].default_value=rough
        return mat
    def cylinder(label,radius,depth,z,mat):
        bpy.ops.mesh.primitive_cylinder_add(vertices=128,radius=radius,depth=depth,location=(0,0,z))
        ob=bpy.context.object;ob.name=label;ob.data.materials.append(mat)
        for f in ob.data.polygons:f.use_smooth=(len(f.vertices)==4)
        return ob
    def ring(name,radius,tube,xyz,mat):
        bpy.ops.mesh.primitive_torus_add(major_segments=128,minor_segments=16,major_radius=radius,minor_radius=tube,location=xyz)
        ob=bpy.context.object;ob.name=name;ob.data.materials.append(mat)
        for f in ob.data.polygons:f.use_smooth=True
        return ob
    def point(obj,where):obj.rotation_euler=(Vector(where)-obj.location).to_track_quat('-Z','Y').to_euler()
    def light(label,xyz,color,power,size):
        bpy.ops.object.light_add(type='AREA',location=xyz)
        ob=bpy.context.object;ob.name=label;ob.data.energy=power;ob.data.color=color;ob.data.shape='DISK';ob.data.size=size;point(ob,(0,0,0))
    gold=material('Brushed champagne brass',(.63,.39,.13),.89,.24)
    ink=material('Deep petrol enamel',(.012,.072,.09),.25,.23)
    ivory=material('Porcelain enamel',(.88,.81,.65),.12,.23)
    base=cylinder('Brass blank',1.8,.19,.105,gold)
    assert bpy.ops.object.ms_add_modifier(mod_type='BEVEL')=={'FINISHED'}
    bevel=next(m for m in base.modifiers if m.type=='BEVEL');bevel.width=.05;bevel.segments=4
    cylinder('Inlaid enamel',1.735,.048,.207,ink)
    cylinder('Ivory ground',1.474,.018,.236,ivory)
    for i,(r,thick) in enumerate([(1.765,.024),(1.535,.013),(1.48,.017)]):
        ring('Turned brass rim '+str(i+1),r,thick,(0,0,.244),gold)
    for i in range(52):
        a=2*math.pi*i/52
        bpy.ops.mesh.primitive_uv_sphere_add(segments=12,ring_count=6,radius=.019 if i%4 else .032,location=(1.635*math.cos(a),1.635*math.sin(a),.232))
        stud=bpy.context.object;stud.name='Gilt border stud';stud.scale.z=.35;stud.data.materials.append(gold)
    ring('Suspension eye',.20,.052,(0,1.86,.13),gold)
    # Each oval links the next at a different angle.
    for i in range(6):
        ob=ring('Chain link '+str(i+1),.15,.026,(.10*i,2.10+.20*i,.15),gold)
        ob.scale.y=1.38;ob.rotation_euler=(0,math.radians(56 if i%2 else 9),-.40)
    yield
    psd=importlib.import_module(addon('smart_paint_suite')+'.external_bridge.psd_lite')
    doc=psd.open_psd(source)
    assert [r.name for r in doc.records]==['Body','Coral','Ink']
    art=bpy.data.materials.new('Koi / Body + Coral + Ink');art.use_nodes=True
    nodes=art.node_tree.nodes;links=art.node_tree.links;bs=nodes.get('Principled BSDF')
    bs.inputs['Roughness'].default_value=.23;bs.inputs['Metallic'].default_value=.12
    previous=None
    for idx,record in enumerate(doc.records):
        pixels,(x,y,xx,yy)=psd.record_rgba_fast(doc,record.index)
        rgba=np.zeros((doc.height,doc.width,4),dtype=np.float32)
        rgba[y:yy,x:xx]=pixels.astype(np.float32)/255.0
        image=bpy.data.images.new('Koi / '+record.name,width=doc.width,height=doc.height,alpha=True)
        image.alpha_mode='STRAIGHT';image.pixels.foreach_set(np.ascontiguousarray(rgba[::-1]).ravel());image.update();image.pack()
        layer=nodes.new('ShaderNodeTexImage');layer.name=record.name;layer.label=record.name;layer.image=image;layer.location=(-750,300-300*idx)
        mix=nodes.new('ShaderNodeMixRGB');mix.name=record.name+' over';mix.location=(-450+155*idx,300-260*idx)
        mix.inputs[1].default_value=(.88,.81,.65,1)
        if previous is not None:links.new(previous,mix.inputs[1])
        links.new(layer.outputs['Alpha'],mix.inputs[0]);links.new(layer.outputs['Color'],mix.inputs[2]);previous=mix.outputs[0]
    links.new(previous,bs.inputs['Base Color'])
    # A circular UV face keeps the surrounding enamel continuous.
    count=128;rr=1.47
    coords=[(rr*math.cos(i*2*math.pi/count),rr*math.sin(i*2*math.pi/count),.247) for i in range(count)]
    mesh=bpy.data.meshes.new('Enamel face UV');mesh.from_pydata(coords,[],[list(range(count))]);mesh.update()
    face=bpy.data.objects.new('Three-layer koi enamel',mesh);scene.collection.objects.link(face);face.data.materials.append(art)
    uv=mesh.uv_layers.new(name='Enamel UV')
    for loop in mesh.loops:
        x,y,_=coords[loop.vertex_index];uv.data[loop.index].uv=(.5+x/(rr*2),.5+y/(rr*2))
    yield
    floor=material('Slate blue paper',(.022,.055,.067),0,.63)
    bpy.ops.mesh.primitive_plane_add(size=200,location=(0,0,0));bpy.context.object.name='Studio surface';bpy.context.object.data.materials.append(floor)
    cam_data=bpy.data.cameras.new('Medallion lens');cam=bpy.data.objects.new('Medallion camera',cam_data);scene.collection.objects.link(cam);scene.camera=cam
    cam.location=(2.35,-4.85,8.15);point(cam,(0,.12,0));cam.data.type='ORTHO';cam.data.ortho_scale=5.65
    assert bpy.ops.smart_camlight_suite.create_camera_rig(camera_name=cam.name)=={'FINISHED'}
    if cam.constraints and cam.constraints[-1].target:cam.constraints[-1].target.location=(0,.12,.12)
    light('Silk key',(-4,-3,6),(1,.93,.82),570,4)
    light('Cool fill',(3,2,5),(.66,.82,1),390,3.2)
    light('Rim strip',(0,5,2),(1,.78,.42),170,2.2)
    scene.world=bpy.data.worlds.new('Medallion studio');scene.world.use_nodes=True
    scene.world.node_tree.nodes.get('Background').inputs[0].default_value=(.24,.29,.32,1)
    scene.world.node_tree.nodes.get('Background').inputs[1].default_value=.48
    scene.render.engine='CYCLES';scene.cycles.samples=32;scene.cycles.use_denoising=True
    scene.render.resolution_x=1120;scene.render.resolution_y=730;scene.render.resolution_percentage=100
    scene.render.image_settings.file_format='PNG';scene.render.image_settings.color_mode='RGB'
    yield

key='SmartTools lesson / koi-medallion'
session=bpy.app.driver_namespace
state=session.get(key)
if not state or state[0]!=bpy.context.scene:
    for required in ('smart_modifier_suite','smart_paint_suite','smart_camlight_suite'):addon(required)
    source=Path(bpy.path.abspath('//koi-layers.psd'))
    if not source.is_file():raise RuntimeError('Save this .blend beside the lesson file koi-layers.psd.')
    scene=bpy.data.scenes.new('Study / koi-medallion');bpy.context.window.scene=scene
    state=[scene,make_medallion(scene,source),0];session[key]=state
if state[2]<3:
    next(state[1]);state[2]+=1;state[0]['Lesson step']=state[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 metal blank, rim and chain
  2. Layer the three PSD records on the face
  3. Frame and light the finished piece
Geometry after step two: Koi enamel medallion
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

In the Shader Editor, disconnect Alpha from the factor of Coral over and set it to zero. The markings disappear while the eyes and base remain. Undo to restore the photographed pattern.

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

Use this when

Change the painted design after the metalwork is finished

The markings live on their own layer. Edit the coral pattern without disturbing the bezel geometry or finish.

Detail from the finished render
Change just the coral markingsDetail from the finished render

Change just the coral markings

The coral markings on the face are the PSD’s Coral layer. Edit them independently of the eyes and body.

Save a PSD Including Adjustment Layers with "Save Image As" and "Save Image"

Where the tools were used

  1. 01

    Round the brass blank

    Add a four-segment bevel, width 0.05, to the brass blank. The modifier remains editable after the final render.

    SmartTools Modifier walkthrough ↗All controls and documentation
    Related worked example · Fix the Original Shape and See the Final Shape at the Same Time (Show End Result)
    1. Add Subdivision Surface and Displace (Strength 0.3) to Suzanne.
    2. Click the "Base Object" row in the stack, then click it again to enter Edit Mode.
    3. Press the eye icon ("Show End Result") to the right of "Add Modifier".
    4. Press Alt+Z to turn on X-ray.
    5. Of the points you can see through the shape, select the point at the top of the head and move it up.

    Pressing the eye icon keeps you in Edit Mode. With X-ray, you can see the points of the original shape and the swollen final shape at the same time. When you move a point of the original shape, the final shape moves along with it.

    View the captured example
  2. 02

    Paint in Blender, then hide only the markings in Photoshop

    A brushstroke on the left fin belongs to Coral. Open the PSD saved by Smart Paint in Photoshop and the stack still reads Ink, Coral, Body. Hiding Coral removes the markings and the new stroke together.

    Paint on Coral in Blender
    Paint on Coral in Blender
    Open the same PSD in Photoshop
    Open the same PSD in Photoshop
    Hide only Coral in Photoshop
    Hide only Coral in Photoshop
    SmartTools Paint walkthrough ↗All controls and documentation
    Related worked example · Save a PSD Including Adjustment Layers with "Save Image As" and "Save Image"
    1. In "Paint", choose red and click "Fill"
    2. Add "Hue / Saturation / Lightness" with the color icon ("Add Adjustment Layer"), and set "Hue" in "Properties" to 0.66
    3. Click the overlapping squares icon ("Save Image As") and save with a name ending in .psd
    4. Set "Hue" to -0.66, overwrite-save with the floppy disk icon ("Save Image"), and click "Live" again
    5. Later, open that PSD with the folder icon ("Open Image") and click "Live"

    The artwork stays red; only its appearance changes, from green to blue. Even after reopening, the adjustment layer and the last saved value (blue) remain.

    View the captured example
  3. 03

    Frame the medallion

    Aim the camera rig at the enamel face to show the brass edge and chain together.

    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.

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 Paint · SmartTools CamLight

Tools used here outside this bundle
SmartTools Modifier

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

Also in the bundle
SmartTools Shader · SmartTools Node

Compare all four bundles and the complete collection →
← Explore more projects