[AI Collaboration] Learning English through AI-Driven 3D Modeling: Precise Canary Construction

Learning English through AI-Driven 3D Modeling: Precise Canary Construction

The Story

Replicating the vibrant hues and delicate form of a canary in 3D requires precision in placement and proportion. By analyzing the reference image, Gemini developed a Python script that constructs this charming bird using a series of scaled UV spheres and cones. This project serves as a practical medium to master English terms related to biological structures and technical concepts like parenting in Blender.

Canary Reference

Reference Image

Canary 3D Model

3D Model Render


AI's Explanation

  1. Anatomical Transformation: "To match the canary's profile, I applied specific scaling to UV spheres for the body and wings, ensuring the proportions reflect the bird's natural roundness."
  2. Hierarchical Parenting: "Each component, from the wings to the beak, was parented to the main body or head. This ensures that any global transformations affect the entire model consistently."
  3. Material Assignment: "I defined distinct materials for the feathers, beak, and legs, and assigned them to the respective meshes to achieve the iconic 'Red Factor' appearance."

Key Words and Phrases

scaling

The process of resizing an object along the X, Y, and Z axes in 3D space to achieve desired proportions.

Context: "I applied specific scaling to the UV spheres."

parenting

The act of establishing a hierarchical relationship where one object (the child) follows the transformations of another (the parent).

Context: "The wings were parented to the body."

assign

To link a specific material or texture to a selected mesh so it takes on those visual properties.

Context: "I assigned the RedFactor material to the body mesh."

Script Preview

Copy and paste the code below into Blender's Text Editor to generate your own 3D canary.

Python
import bpy
import math

def create_precise_canary():
    # Clear scene
    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete()

    # Materials
    def create_material(name, color, roughness=0.5):
        mat = bpy.data.materials.new(name=name)
        mat.use_nodes = True
        nodes = mat.node_tree.nodes
        bsdf = nodes.get("Principled BSDF")
        bsdf.inputs['Base Color'].default_value = color
        bsdf.inputs['Roughness'].default_value = roughness
        return mat

    red_mat = create_material("RedFactor", (1.0, 0.25, 0.0, 1.0))
    beak_mat = create_material("Beak", (0.9, 0.7, 0.6, 1.0))
    leg_mat = create_material("Leg", (0.7, 0.5, 0.4, 1.0))
    eye_mat = create_material("Eye", (0.01, 0.01, 0.01, 1.0), roughness=0.1)

    # 1. Body
    bpy.ops.mesh.primitive_uv_sphere_add(radius=1, location=(0, 0, 0))
    body = bpy.context.active_object
    body.name = "Body"
    body.scale = (1.2, 0.8, 0.9)
    bpy.ops.object.transform_apply(scale=True)
    body.data.materials.append(red_mat)

    # 2. Wings
    for side in [-1, 1]:
        side_str = "R" if side == -1 else "L"
        bpy.ops.mesh.primitive_uv_sphere_add(radius=1)
        wing = bpy.context.active_object
        wing.name = f"Wing_{side_str}"
        wing.scale = (0.817, 0.201, 0.463)
        wing.location = (-0.38222, side * 0.71835, 0.12956)
        wing.rotation_euler = (math.radians(-12.0), math.radians(-14.32), math.radians(side * -4.2376))
        wing.data.materials.append(red_mat)
        wing.parent = body

    # 3. Head
    bpy.ops.mesh.primitive_uv_sphere_add(radius=0.6, location=(0.8, 0, 0.6))
    head = bpy.context.active_object
    head.name = "Head"
    bpy.ops.object.transform_apply(scale=True)
    head.data.materials.append(red_mat)
    head.parent = body

    # 4. Eyes
    for side in [-1, 1]:
        side_str = "L" if side > 0 else "R"
        bpy.ops.mesh.primitive_uv_sphere_add(segments=12, ring_count=6, radius=0.08, location=(1.1, side * 0.45, 0.8))
        eye = bpy.context.active_object
        eye.name = f"Eye_{side_str}"
        eye.data.materials.append(eye_mat)
        eye.parent = head

    # 5. Beak
    bpy.ops.mesh.primitive_cone_add(vertices=16, radius1=0.15, depth=0.4, location=(1.35, 0, 0.6))
    beak = bpy.context.active_object
    beak.name = "Beak"
    beak.rotation_euler = (0, math.radians(90), 0)
    beak.data.materials.append(beak_mat)
    beak.parent = head

    # 6. Tail
    bpy.ops.mesh.primitive_cube_add(size=1, location=(-1.4, 0, -0.1))
    tail = bpy.context.active_object
    tail.name = "Tail"
    tail.scale = (1.0, 0.4, 0.05)
    bpy.ops.object.transform_apply(scale=True)
    tail.data.materials.append(red_mat)
    tail.parent = body

    # 7. LEGS & FEET
    leg_tilt_y = math.radians(-12)
    for i in [-1, 1]:
        side_str = "L" if i > 0 else "R"
        leg_x, leg_y, leg_z = -0.35, i * 0.25, -1.0
        
        bpy.ops.mesh.primitive_cylinder_add(radius=0.03, depth=1.0, location=(leg_x, leg_y, leg_z))
        leg = bpy.context.active_object
        leg.name = f"Leg_{side_str}"
        leg.rotation_euler[1] = leg_tilt_y
        bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
        leg.data.materials.append(leg_mat)
        leg.parent = body
        
        # Middle Toe
        bpy.ops.mesh.primitive_cube_add(size=1)
        m_toe = bpy.context.active_object
        m_toe.name = f"M_Toe_{side_str}"
        m_toe.scale = (0.4, 0.03, 0.02)
        m_toe.location = (0.18946, 0, -0.55067)
        m_toe.rotation_euler = (0, math.radians(18.879), 0)
        m_toe.data.materials.append(leg_mat)
        m_toe.parent = leg
        
        # Outer Toes
        for idx, z_rot_deg in enumerate([-25.798, 25.798]):
            bpy.ops.mesh.primitive_cube_add(size=1)
            f_toe = bpy.context.active_object
            f_toe.name = f"F_Toe_{side_str}_{idx+1}"
            f_toe.scale = (0.4, 0.03, 0.02)
            f_toe.location = (0.17085, (z_rot_deg/25.798) * 0.08452, -0.54843)
            f_toe.rotation_euler = (math.radians(3.054 * (z_rot_deg/25.798)), 
                                    math.radians(18.216), 
                                    math.radians(z_rot_deg))
            f_toe.data.materials.append(leg_mat)
            f_toe.parent = leg
            
        # Back Toe
        bpy.ops.mesh.primitive_cube_add(size=1)
        b_toe = bpy.context.active_object
        b_toe.name = f"B_Toe_{side_str}"
        b_toe.scale = (0.3, 0.03, 0.02)
        b_toe.location = (-0.14627, 0, -0.48244)
        b_toe.data.materials.append(leg_mat)
        b_toe.parent = leg

if __name__ == "__main__":
    create_precise_canary()

Comments

Popular posts from this blog

シャキシャキ美味しい!スナップエンドウ、英語でどう言う?

[AI & Seasonal English]: 半夏生編 -「半夏生」で日本の美しい暦と英語を学ぼう!

[AI & Seasonal English] 【スパイス香る】ドイツのクリスマスパン「シュトーレン(Stollen)」の歴史と「しっとり感」を語る英語