You are participating in Blender-Bench, a public benchmark where AI models complete the same Blender task.

Your result will be compared head-to-head with another model. Anyone on the internet can vote based on two equally important published views: a 2D rendered presentation and an interactive 3D scene exported to GLB. Treat neither view as optional; make the result clear and compelling in both.

Complete the request as well as you can. The benchmark does not prescribe a workflow or visual style; use whichever Blender techniques you consider appropriate. Make the important requirements evident in the published result, save a complete scene, and present the work clearly in every requested output.

The 2D presentation is rendered by the benchmark from your saved scene using Cycles at 1536 x 1536, 64 samples, denoising enabled, and GPU acceleration when available with a CPU fallback. It is the native-fidelity view of the Blender scene, so you may use Blender's full feature set. Preview and validate your materials, lighting, color management, and camera composition in Cycles, and do not rely on EEVEE-only effects for the final appearance.

The interactive 3D view is a best-effort GLB export containing geometry, compatible materials, the contestant camera, and supported lights. Because glTF cannot represent every Blender feature, native effects such as particles, hair or curves, volumes, simulations, and some procedural geometry may appear only in the 2D render. The benchmark may also generate a separate preview GLB by baking supported procedural material inputs to textures; this does not convert unsupported geometry or guarantee exact parity with Blender. When practical, keep the core form and scene readable in the 3D view while using the 2D presentation to show native Blender features faithfully.

## Harness Instructions

You are writing a single Python script for Blender 5.1 using the bpy API. The scene starts empty. Your script must build everything the user's prompt asks for.

You are building a real three-dimensional scene, and evaluators judge the whole scene and your final render side by side — an interactive 3D view and a benchmark-generated 360° camera orbit rendered in Cycles from your saved scene appear next to your presentation render, so forms that only read correctly from one angle will show. Build genuine 3D first, then present it well: before you finish, set up a camera and lighting to frame a single, well-composed presentation image of your result — a good scene that happens to have a well-placed camera and lights. The final benchmark capture overrides the scene render settings and renders in Cycles at 1536x1536, 64 samples, with denoising and GPU acceleration (CPU fallback). Preview and validate materials, lighting, color management, and composition in Cycles; do not rely on EEVEE-only effects. Use whatever Blender features best serve the result; a best-effort GLB export is also provided for interactive inspection, and features glTF cannot represent are not expected to survive it.

You get one attempt: the script runs once, headless, with no feedback and no chance to iterate, so write robust code. Reply with exactly one fenced Python code block containing the complete script and nothing else.


## Task

Complete the following Blender task:

<task>

A single goldfish as the hero of the shot: rounded body, a big flowing tail fin,
dorsal and side fins, and an eye on each side, in an unmistakable goldfish orange.

The floor is a shape any child would name instantly. The ceiling is life: a gentle
S-curve in the body as if mid-swim, translucency toward the fin edges, a subtle
scale pattern, and a calm watery backdrop that makes the orange pop.

</task>


[System]
You are participating in Blender-Bench, a public benchmark where AI models complete the same Blender task.

Your result will be compared head-to-head with another model. Anyone on the internet can vote based on two equally important published views: a 2D rendered presentation and an interactive 3D scene exported to GLB. Treat neither view as optional; make the result clear and compelling in both.

Complete the request as well as you can. The benchmark does not prescribe a workflow or visual style; use whichever Blender techniques you consider appropriate. Make the important requirements evident in the published result, save a complete scene, and present the work clearly in every requested output.

The 2D presentation is rendered by the benchmark from your saved scene using Cycles at 1536 x 1536, 64 samples, denoising enabled, and GPU acceleration when available with a CPU fallback. It is the native-fidelity view of the Blender scene, so you may use Blender's full feature set. Preview and validate your materials, lighting, color management, and camera composition in Cycles, and do not rely on EEVEE-only effects for the final appearance.

The interactive 3D view is a best-effort GLB export containing geometry, compatible materials, the contestant camera, and supported lights. Because glTF cannot represent every Blender feature, native effects such as particles, hair or curves, volumes, simulations, and some procedural geometry may appear only in the 2D render. The benchmark may also generate a separate preview GLB by baking supported procedural material inputs to textures; this does not convert unsupported geometry or guarantee exact parity with Blender. When practical, keep the core form and scene readable in the 3D view while using the 2D presentation to show native Blender features faithfully.

## Harness Instructions

You are writing a single Python script for Blender 5.1 using the bpy API. The scene starts empty. Your script must build everything the user's prompt asks for.

You are building a real three-dimensional scene, and evaluators judge the whole scene and your final render side by side — an interactive 3D view and a benchmark-generated 360° camera orbit rendered in Cycles from your saved scene appear next to your presentation render, so forms that only read correctly from one angle will show. Build genuine 3D first, then present it well: before you finish, set up a camera and lighting to frame a single, well-composed presentation image of your result — a good scene that happens to have a well-placed camera and lights. The final benchmark capture overrides the scene render settings and renders in Cycles at 1536x1536, 64 samples, with denoising and GPU acceleration (CPU fallback). Preview and validate materials, lighting, color management, and composition in Cycles; do not rely on EEVEE-only effects. Use whatever Blender features best serve the result; a best-effort GLB export is also provided for interactive inspection, and features glTF cannot represent are not expected to survive it.

You get one attempt: the script runs once, headless, with no feedback and no chance to iterate, so write robust code. Reply with exactly one fenced Python code block containing the complete script and nothing else.

[User]
## Task

Complete the following Blender task:

<task>

A single goldfish as the hero of the shot: rounded body, a big flowing tail fin,
dorsal and side fins, and an eye on each side, in an unmistakable goldfish orange.

The floor is a shape any child would name instantly. The ceiling is life: a gentle
S-curve in the body as if mid-swim, translucency toward the fin edges, a subtle
scale pattern, and a calm watery backdrop that makes the orange pop.

</task>

[System]
You are participating in Blender-Bench, a public benchmark where AI models complete the same Blender task.

Your result will be compared head-to-head with another model. Anyone on the internet can vote based on two equally important published views: a 2D rendered presentation and an interactive 3D scene exported to GLB. Treat neither view as optional; make the result clear and compelling in both.

Complete the request as well as you can. The benchmark does not prescribe a workflow or visual style; use whichever Blender techniques you consider appropriate. Make the important requirements evident in the published result, save a complete scene, and present the work clearly in every requested output.

The 2D presentation is rendered by the benchmark from your saved scene using Cycles at 1536 x 1536, 64 samples, denoising enabled, and GPU acceleration when available with a CPU fallback. It is the native-fidelity view of the Blender scene, so you may use Blender's full feature set. Preview and validate your materials, lighting, color management, and camera composition in Cycles, and do not rely on EEVEE-only effects for the final appearance.

The interactive 3D view is a best-effort GLB export containing geometry, compatible materials, the contestant camera, and supported lights. Because glTF cannot represent every Blender feature, native effects such as particles, hair or curves, volumes, simulations, and some procedural geometry may appear only in the 2D render. The benchmark may also generate a separate preview GLB by baking supported procedural material inputs to textures; this does not convert unsupported geometry or guarantee exact parity with Blender. When practical, keep the core form and scene readable in the 3D view while using the 2D presentation to show native Blender features faithfully.

## Harness Instructions

You are writing a single Python script for Blender 5.1 using the bpy API. The scene starts empty. Your script must build everything the user's prompt asks for.

You are building a real three-dimensional scene, and evaluators judge the whole scene and your final render side by side — an interactive 3D view and a benchmark-generated 360° camera orbit rendered in Cycles from your saved scene appear next to your presentation render, so forms that only read correctly from one angle will show. Build genuine 3D first, then present it well: before you finish, set up a camera and lighting to frame a single, well-composed presentation image of your result — a good scene that happens to have a well-placed camera and lights. The final benchmark capture overrides the scene render settings and renders in Cycles at 1536x1536, 64 samples, with denoising and GPU acceleration (CPU fallback). Preview and validate materials, lighting, color management, and composition in Cycles; do not rely on EEVEE-only effects. Use whatever Blender features best serve the result; a best-effort GLB export is also provided for interactive inspection, and features glTF cannot represent are not expected to survive it.

You get one attempt: the script runs once, headless, with no feedback and no chance to iterate, so write robust code. Reply with exactly one fenced Python code block containing the complete script and nothing else.

[User]
## Task

Complete the following Blender task:

<task>

A single goldfish as the hero of the shot: rounded body, a big flowing tail fin,
dorsal and side fins, and an eye on each side, in an unmistakable goldfish orange.

The floor is a shape any child would name instantly. The ceiling is life: a gentle
S-curve in the body as if mid-swim, translucency toward the fin edges, a subtle
scale pattern, and a calm watery backdrop that makes the orange pop.

</task>

payment=(self "https://checkout.stripe.com" "https://connect-js.stripe.com" "https://js.stripe.com" "https://*.js.stripe.com" "https://hooks.stripe.com")

{"id":"gen-1784228192-cgo8RsQAAUbGjEAFqweL","object":"chat.completion","created":1784228192,"model":"openai/gpt-5.6-luna","provider":"OpenAI","system_fingerprint":null,"service_tier":"default","choices":[{"index":0,"logprobs":null,"finish_reason":"stop","native_finish_reason":"completed","message":{"role":"assistant","content":"```python\nimport bpy, math\nfrom mathutils import Vector\n\n# ------------------------------------------------------------\n# Clean scene\n# ------------------------------------------------------------\nbpy.ops.object.select_all(action='SELECT')\nbpy.ops.object.delete(use_global=False)\nfor datablocks in (bpy.data.meshes, bpy.data.curves, bpy.data.materials,\n                   bpy.data.cameras, bpy.data.lights):\n    pass\n\n# ------------------------------------------------------------\n# Materials\n# ------------------------------------------------------------\ndef mat(name, color, metallic=0.0, roughness=0.45, transmission=0.0, alpha=1.0):\n    m = bpy.data.materials.new(name)\n    m.diffuse_color = (*color, alpha)\n    m.use_nodes = True\n    bs = m.node_tree.nodes.get(\"Principled BSDF\")\n    bs.inputs[\"Base Color\"].default_value = (*color, 1)\n    bs.inputs[\"Metallic\"].default_value = metallic\n    bs.inputs[\"Roughness\"].default_value = roughness\n    if \"Transmission Weight\" in bs.inputs:\n        bs.inputs[\"Transmission Weight\"].default_value = transmission\n    if \"IOR\" in bs.inputs:\n        bs.inputs[\"IOR\"].default_value = 1.36\n    if alpha < 1:\n        bs.inputs[\"Alpha\"].default_value = alpha\n        m.surface_render_method = 'DITHERED'\n    return m\n\norange = mat(\"Goldfish orange\", (0.95, 0.19, 0.025), metallic=0.05, roughness=0.28)\norange_light = mat(\"Scale highlights\", (1.0, 0.42, 0.055), metallic=0.05, roughness=0.24)\norange_dark = mat(\"Fin orange\", (0.78, 0.075, 0.012), roughness=0.3)\nfinmat = mat(\"Translucent orange fins\", (1.0, 0.16, 0.018), roughness=0.24, transmission=0.22, alpha=0.82)\nfin_edge = mat(\"Fin edge glow\", (1.0, 0.44, 0.06), roughness=0.18, transmission=0.3, alpha=0.68)\nwhite = mat(\"Warm eye white\", (0.95, 0.9, 0.72), roughness=0.2)\nblack = mat(\"Deep black pupils\", (0.004, 0.002, 0.001), metallic=0.1, roughness=0.12)\ngold = mat(\"Iris gold\", (1.0, 0.48, 0.035), metallic=0.2, roughness=0.18)\nwater = mat(\"Calm turquoise water\", (0.025, 0.19, 0.26), roughness=0.28)\nwater_light = mat(\"Water glow\", (0.05, 0.38, 0.43), roughness=0.25)\nsand = mat(\"Soft aqua floor\", (0.06, 0.30, 0.31), roughness=0.6)\nstone_mats = [\n    mat(\"Pebble teal\", (0.08, 0.23, 0.25), roughness=0.75),\n    mat(\"Pebble blue\", (0.10, 0.34, 0.35), roughness=0.7),\n    mat(\"Pebble gold\", (0.32, 0.32, 0.17), roughness=0.72)\n]\n\n# ------------------------------------------------------------\n# Helpers\n# ------------------------------------------------------------\ndef uv(name, loc, scale, material, seg=32, rings=16):\n    bpy.ops.mesh.primitive_uv_sphere_add(segments=seg, ring_count=rings, location=loc)\n    o = bpy.context.object\n    o.name = name\n    o.scale = scale\n    bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)\n    o.data.materials.append(material)\n    return o\n\ndef cube(name, loc, scale, material, bevel=0.0):\n    bpy.ops.mesh.primitive_cube_add(location=loc)\n    o = bpy.context.object\n    o.name = name\n    o.scale = scale\n    bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)\n    o.data.materials.append(material)\n    if bevel:\n        mod = o.modifiers.new(\"Soft edges\", 'BEVEL')\n        mod.width = bevel\n        mod.segments = 4\n    return o\n\ndef cylinder(name, loc, radius, depth, material, vertices=64):\n    bpy.ops.mesh.primitive_cylinder_add(vertices=vertices, radius=radius, depth=depth, location=loc)\n    o = bpy.context.object\n    o.name = name\n    o.data.materials.append(material)\n    bevel = o.modifiers.new(\"Rounded rim\", 'BEVEL')\n    bevel.width = 0.05\n    bevel.segments = 3\n    return o\n\ndef fin_mesh(name, points, thickness, material):\n    # polygon in x,z plane, extruded along y\n    verts = [(x, -thickness/2, z) for x,z in points] + [(x, thickness/2, z) for x,z in points]\n    n = len(points)\n    faces = [tuple(range(n)), tuple(range(n,2*n))[::-1]]\n    for i in range(n):\n        j=(i+1)%n\n        faces.append((i,j,n+j,n+i))\n    me = bpy.data.meshes.new(name+\"Mesh\")\n    me.from_pydata(verts, [], faces)\n    me.materials.append(material)\n    ob = bpy.data.objects.new(name, me)\n    bpy.context.collection.objects.link(ob)\n    return ob\n\ndef tube_between(name, a, b, radius, material):\n    mid=(Vector(a)+Vector(b))/2\n    direction=Vector(b)-Vector(a)\n    bpy.ops.mesh.primitive_cylinder_add(vertices=16, radius=radius, depth=direction.length, location=mid)\n    o=bpy.context.object\n    o.name=name\n    o.rotation_mode='QUATERNION'\n    o.rotation_quaternion=direction.to_track_quat('Z','Y')\n    o.data.materials.append(material)\n    return o\n\n# ------------------------------------------------------------\n# Circular child-recognizable floor / aquarium base\n# ------------------------------------------------------------\ncylinder(\"Round ocean floor\", (0,0,-1.55), 5.4, 0.28, sand)\ncylinder(\"Blue glassy inner floor\", (0,0,-1.38), 4.9, 0.055, water_light)\n\n# Pebbles arranged clearly around the floor\nfor i in range(26):\n    a = i * math.tau / 26\n    r = 3.45 + 0.32*math.sin(i*2.7)\n    x,y = r*math.cos(a), r*math.sin(a)\n    s = 0.13 + 0.08*((i*7)%5)/4\n    p = uv(\"Rounded aquarium pebble\", (x,y,-1.18+s*0.35), (s*1.45,s,s*0.65), stone_mats[i%3], 16, 8)\n    p.rotation_euler[2]=a\n\n# ------------------------------------------------------------\n# Watery backdrop and abstract gentle light bands\n# ------------------------------------------------------------\ncube(\"Water backdrop\", (0, 3.2, 1.2), (6.8, 0.18, 3.2), water, bevel=0.3)\n# vertical soft turquoise ribbons\nfor i in range(7):\n    x=-5.2+i*1.7\n    band=cube(\"Backdrop water ribbon\", (x,3.0,1.0), (0.11,0.04,2.5), water_light, bevel=0.12)\n    band.rotation_euler[1]=0.17*math.sin(i)\n\n# bubbles\nfor i in range(15):\n    a=i*1.77\n    x=-3.8+((i*1.31)%7.0)\n    z=-0.9+((i*0.73)%3.5)\n    y=-0.4+0.25*math.sin(a)\n    bpy.ops.mesh.primitive_torus_add(major_radius=0.055+0.015*(i%3), minor_radius=0.012,\n                                      major_segments=16, minor_segments=6, location=(x,y,z),\n                                      rotation=(math.pi/2,0,0))\n    bpy.context.object.name=\"Tiny rising bubble\"\n    bpy.context.object.data.materials.append(water_light)\n\n# ------------------------------------------------------------\n# Goldfish curved body\n# ------------------------------------------------------------\n# Custom ring body, bending gently in an S curve\nrings=22\nsides=32\nverts=[]\nfor i in range(rings):\n    x=-1.72 + i*(3.35/(rings-1))\n    t=i/(rings-1)\n    # fuller toward head, tapered at tail\n    radius=0.12 + 0.74*(math.sin(math.pi*(0.06+0.88*t))**0.58)\n    zc=0.16*math.sin(t*math.pi*1.75-0.55)\n    # slight narrowing at snout\n    radius *= (1.0-0.20*max(0,t-0.88)/0.12)\n    for j in range(sides):\n        ang=math.tau*j/sides\n        y=radius*math.cos(ang)\n        z=zc+radius*math.sin(ang)*0.82\n        verts.append((x,y,z))\nfaces=[]\nfor i in range(rings-1):\n    for j in range(sides):\n        nj=(j+1)%sides\n        faces.append((i*sides+j, i*sides+nj, (i+1)*sides+nj, (i+1)*sides+j))\nfaces.append(tuple(range(sides-1,-1,-1)))\nfaces.append(tuple((rings-1)*sides+j for j in range(sides)))\nme=bpy.data.meshes.new(\"Curved goldfish body mesh\")\nme.from_pydata(verts,[],faces)\nme.materials.append(orange)\nbody=bpy.data.objects.new(\"Rounded S-curve goldfish body\",me)\nbpy.context.collection.objects.link(body)\nsub=body.modifiers.new(\"Smooth body\", 'SUBSURF'); sub.levels=2; sub.render_levels=2\nbpy.context.view_layer.objects.active=body\nbody.select_set(True)\nbpy.ops.object.shade_smooth()\nbody.select_set(False)\n\n# mouth lips and tiny barbels\nuv(\"Soft round mouth\", (1.60,-0.01,0.03), (0.15,0.18,0.11), orange_dark)\nfor side in (-1,1):\n    tube_between(\"Goldfish mouth barbel\", (1.57,side*0.10,-0.02), (1.76,side*0.18,-0.13), 0.018, orange_dark)\n\n# ------------------------------------------------------------\n# Large flowing split tail\n# ------------------------------------------------------------\ntail_upper=[(-1.35,0.36),(-1.85,0.62),(-2.48,1.16),(-3.30,1.33),(-3.02,0.42),(-2.25,0.08)]\ntail_lower=[(-1.35,-0.28),(-2.25,-0.08),(-3.02,-0.45),(-3.34,-1.23),(-2.46,-1.00),(-1.82,-0.56)]\nfor idx,poly in enumerate((tail_upper,tail_lower)):\n    f=fin_mesh(\"Flowing tail lobe\", poly, 0.18, finmat)\n    f.location.y=0\n    # decorative glowing leading edge\n    for k in range(len(poly)-1):\n        if k in (0,1,2):\n            tube_between(\"Translucent tail vein\", (poly[k][0],-0.105,poly[k][1]),\n                         (poly[k+1][0],-0.105,poly[k+1][1]), 0.018, fin_edge)\n\n# dorsal fin, side fins\ndorsal=[(-0.55,0.52),(0.02,1.10),(0.52,1.48),(1.04,1.08),(0.86,0.56)]\nd=fin_mesh(\"Tall dorsal fin\", dorsal, 0.12, finmat)\nd.location.y=0.04\nfor k in range(len(dorsal)-1):\n    tube_between(\"Dorsal fin ray\", (dorsal[k][0],-0.075,dorsal[k][1]),\n                 (dorsal[k+1][0],-0.075,dorsal[k+1][1]), 0.014, fin_edge)\n\n# pectoral fins on both sides, oriented as extruded triangular surfaces\nfor side in (-1,1):\n    pts=[(0.45,0.05),(0.85,-0.18),(1.46,-0.85),(0.72,-0.48)]\n    # create in x,z then rotate/position: visible near side extends down\n    p=fin_mesh(\"Side pectoral fin\", pts, 0.10, finmat)\n    p.location.y=side*0.56\n    p.rotation_euler[1]=side*0.18\n\n# small lower fin\nfin_mesh(\"Lower balancing fin\", [(-0.25,-0.43),(0.25,-0.75),(0.70,-0.50),(0.35,-0.35)], 0.10, finmat).location.y=0.08\n\n# ------------------------------------------------------------\n# Eyes on BOTH sides\n# ------------------------------------------------------------\nfor side in (-1,1):\n    y=side*0.64\n    eye=uv(\"Eye white left\" if side<0 else \"Eye white right\", (1.18,y,0.39), (0.25,0.16,0.25), white)\n    # iris and pupil pushed outward\n    iris=uv(\"Golden iris\", (1.22,side*0.785,0.40), (0.125,0.045,0.135), gold)\n    pupil=uv(\"Black pupil\", (1.24,side*0.825,0.41), (0.062,0.022,0.075), black)\n    uv(\"Eye catchlight\", (1.27,side*0.846,0.49), (0.018,0.010,0.022), white, 12, 6)\n\n# ------------------------------------------------------------\n# Subtle scale pattern across visible and far sides\n# ------------------------------------------------------------\nfor side in (-1,1):\n    for row in range(4):\n        for col in range(10):\n            x=-1.10 + col*0.27 + (0.13 if row%2 else 0)\n            # approximate curved body surface\n            t=max(0,min(1,(x+1.72)/3.35))\n            zc=0.16*math.sin(t*math.pi*1.75-0.55)\n            rad=0.12+0.74*(math.sin(math.pi*(0.06+0.88*t))**0.58)\n            z=zc-0.20+row*0.14\n            if abs(z-zc)<rad*0.9:\n                y=side*(math.sqrt(max(0.03,rad*rad-(z-zc)**2))*0.96)\n                sc=uv(\"Subtle fish scale\", (x,y,z), (0.095,0.024,0.072),\n                      orange_light if (row+col)%4==0 else orange, 12, 6)\n                sc.rotation_euler[1]=0.15*math.sin(x*3)\n\n# ------------------------------------------------------------\n# Lighting / camera\n# ------------------------------------------------------------\nworld=bpy.context.scene.world\nworld.use_nodes=True\nworld.node_tree.nodes[\"Background\"].inputs[\"Color\"].default_value=(0.008,0.025,0.035,1)\nworld.node_tree.nodes[\"Background\"].inputs[\"Strength\"].default_value=0.22\n\ndef area(name, loc, energy, size, color):\n    bpy.ops.object.light_add(type='AREA', location=loc)\n    l=bpy.context.object\n    l.name=name\n    l.data.energy=energy\n    l.data.shape='DISK'\n    l.data.size=size\n    l.data.color=color\n    direction=Vector((0,0,0.0))-l.location\n    l.rotation_euler=direction.to_track_quat('-Z','Y').to_euler()\n    return l\narea(\"Warm key light\", (3.5,-5.0,5.0), 950, 4.0, (1.0,0.55,0.28))\narea(\"Cool aquarium fill\", (-4.0,-2.0,2.0), 700, 5.0, (0.20,0.65,0.85))\narea(\"Tail rim light\", (-3.5,2.0,2.8), 1100, 3.0, (0.12,0.55,0.9))\narea(\"Top soft light\", (0,0,6), 800, 3.5, (1.0,0.78,0.55))\n\nbpy.ops.object.camera_add(location=(6.2,-10.8,3.6))\ncam=bpy.context.object\ncam.name=\"Hero goldfish camera\"\ncam.data.lens=52\ncam.data.sensor_width=36\ndirection=Vector((-0.35,0,0.02))-cam.location\ncam.rotation_euler=direction.to_track_quat('-Z','Y').to_euler()\nbpy.context.scene.camera=cam\n\n# ------------------------------------------------------------\n# Render settings\n# ------------------------------------------------------------\nscene=bpy.context.scene\nscene.render.engine='BLENDER_EEVEE_NEXT'\nscene.render.resolution_x=1536\nscene.render.resolution_y=1536\nscene.render.resolution_percentage=100\nscene.render.image_settings.file_format='PNG'\nscene.render.film_transparent=False\nscene.render.filepath='/tmp/goldfish_hero.png'\nscene.view_settings.look='AgX - Medium High Contrast'\nscene.render.image_settings.color_mode='RGBA'\n\n# Ground contact / atmospheric depth\nscene.render.use_file_extension=True\nbpy.ops.wm.save_as_mainfile(filepath='/tmp/goldfish_hero.blend')\n```","refusal":null,"reasoning":"**Crafting a script**\n\nI need to craft a script that focuses solely on the code and creates a robust scene. The phrase \"the floor is a shape any child would name instantly\" likely refers to a literal floor. But I wonder if it could be more ambiguous, perhaps evoking images of the ocean or even a circle. There's a poetic feel to it. Additionally, should I consider using a starfish for the floor element? It seems I need to prioritize that goldfish aspect too!**Designing the aquarium scene**\n\nI'm envisioning a detailed aquarium scene with a watery backdrop and a floor shaped like a blue oval or pebbles. I could even consider making the floor a giant friendly cloud, with a child naming it a \"circle.\" Using a sandy seabed with stones would highlight the circular floor. \n\nFor the goldfish, I want to focus on the body, flowing tail, and fins, with a translucent effect and scales. I'll ensure the geometry is GLB-compatible, employ UV spheres, and mesh fins. The camera should capture the fish from a 3/4 view, and I need to pay attention to the placement of its eyes as well!**Creating the fish model**\n\nI need to create a goldfish body using a UV sphere, possibly bending it into an S-shape with three overlapping ellipsoids in orange for a segmented look. I can make a custom mesh along the X-axis with a sinusoidal center along Z. The tail fins should be placed at x=-2.1, with two triangular lobes for thickness, using translucent materials.\n\nI'll incorporate dorsal and pectoral fins while applying principled transmission for the materials. For the backdrop, a large vertical plane could work well, paired with a circular floor. I want to ensure I add a caustic water style without relying on compositing. A large cyclorama could serve as the backdrop, with the camera positioned thoughtfully!","reasoning_details":[{"type":"reasoning.summary","summary":"**Crafting a script**\n\nI need to craft a script that focuses solely on the code and creates a robust scene. The phrase \"the floor is a shape any child would name instantly\" likely refers to a literal floor. But I wonder if it could be more ambiguous, perhaps evoking images of the ocean or even a circle. There's a poetic feel to it. Additionally, should I consider using a starfish for the floor element? It seems I need to prioritize that goldfish aspect too!**Designing the aquarium scene**\n\nI'm envisioning a detailed aquarium scene with a watery backdrop and a floor shaped like a blue oval or pebbles. I could even consider making the floor a giant friendly cloud, with a child naming it a \"circle.\" Using a sandy seabed with stones would highlight the circular floor. \n\nFor the goldfish, I want to focus on the body, flowing tail, and fins, with a translucent effect and scales. I'll ensure the geometry is GLB-compatible, employ UV spheres, and mesh fins. The camera should capture the fish from a 3/4 view, and I need to pay attention to the placement of its eyes as well!**Creating the fish model**\n\nI need to create a goldfish body using a UV sphere, possibly bending it into an S-shape with three overlapping ellipsoids in orange for a segmented look. I can make a custom mesh along the X-axis with a sinusoidal center along Z. The tail fins should be placed at x=-2.1, with two triangular lobes for thickness, using translucent materials.\n\nI'll incorporate dorsal and pectoral fins while applying principled transmission for the materials. For the backdrop, a large vertical plane could work well, paired with a circular floor. I want to ensure I add a caustic water style without relying on compositing. A large cyclorama could serve as the backdrop, with the camera positioned thoughtfully!","format":"openai-responses-v1","index":0},{"type":"reasoning.encrypted","data":"gAAAAABqWSlqe8kvhoOh2a4-bMrVQTnak_3ymkNKEF5vydeH2JFXksTgqPp7Qc0R1HNsrZkXZg-d_JgW71WpAKhyTVK4pWTi2eNb1YHfRjb0ejUnVM3IDBsBrueH0ZZkmIyCN_5g2aachw5lkIAU-Cb1Hyt0WJ2YbZpG0vMbuLHdpv-jYatdBQ7DZABJtf4jBn7byypnstVwdi3H3DvVmK9l9TtYRrDyWoqHUpYXrZCbJOueu507jzfwTnRe_P-BtQckqnXVcNo3HUYSJwFdN46lQPzo2W5e0tmnTd9vAG5G1X7yqIivAwRHftDCP0K_c-b4fPUwJY496i763Y81xnUx4OfDVFRvK0yLMazipuwK8d6u9MrkFdhuuT0dFldFOuJvWxvXFpa62ySrxq2zN7BZ9nNYQ7NvkZ15lBIq_dx7xwPFPIBH7aOyBVTTzC_XUwjXi_27T4JdBj6nJdiQ0jjkvlYu59VW1E_QNBwzfbZ99zX1eH6pyxp3yTJKUWrbLBfm9zi5vOQGVI0bbRV6fWkcU6-7gtXRlq0xtBqakN0jOc650AZKec2vZTGt9s-BHKzerdlAYlL1iHVyj6oSVNXicP_EKeB-dAXit11T2tEYRz86aDvrdMh8hW7v1UAn1zKYppUehKKC4P0goQP2xLlosoz_fbMrsuEDeKLVEmiJVRryVQut49tgQAphp74BO_Jj-h0_5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KIM4LqAQ5-mgh0z1O7vKLmKqqlawRipg4cIYvworFxPgsL96Cxf7HDaRgDdb9Uyk-8yT7gqxeKfidRxjXfWeciecEOV65IPKdOy2Tse4eh6s7VgwDIwtwfauCFIvszK3ir96_Eqk4q2dYM68iLAwpeuPc3WNc8prLgTXg==","format":"openai-responses-v1","id":"rs_072781b717f67cb6016a592960d12481938e0b04d3db9413cc","index":1},{"type":"reasoning.summary","summary":"**Visualizing a backdrop**\n\nI'm considering a vertical water backdrop at a plane of y=3. The camera is positioned to look up along the y-axis. The backdrop is behind the camera along the positive y-direction. I need to set the plane at y=3 and rotate it 90 degrees on the x-axis. Let’s move forward with producing this! It sounds like an interesting visual setup. I want to ensure everything aligns well in the scene.","format":"openai-responses-v1","index":2},{"type":"reasoning.encrypted","data":"gAAAAABqWSlrglOiCW9ZAoqZ6ngAfLseKw4hiLGOqxS3w3cUv_zHN94fiJVi1JcyYrU0GNroY7cii-aAIVaWshT6i4kBh78y4Wix7NR0YV1proq2Wz2E2Cz-6ZWmYZXnBZ4KkMcwfL0p_I7PN7KirwTbTPAM9zx0MUzNG37ZtnTldEhpVDcIwDnnhPeBeF45MvVl3KMi-0KC0Xrsbe4SLbqOIgEx1EH_boaTPynGK-v1pVROHzksstMqxOEZy5qu1NVl_GyovEcnQ8G-FfKyBBVVX3s5NK9rWLDYLWIqLhBMdevI9QeIUlnZzM7rYQHuvWMugpMbSvH-9stn7oSaJerRuFhqiKtWWd2Ez9augPIh6tgEyHuNYa8IBt7bZJn9Uwz87YUZgU5mxUgYcdDUHexhWgi3stYFqvXlPvuDoWnM9BlMynAdseR0QLafDF4q0VElqZhEXGIVSrn7WwkGiNFuMJBeYS7Ih745H5mYuT-npSiDYjttDqfhDkg8FqN7yI4C87Dl-FvKX9OnFhQhzao1-_xO0uJmYZ0F5poQiQYWFWk-lC0yvP3Lqoq1a1E0OPi_eaLq5erxbnidGx1zTTLhqvuGaJh1rzz8KTfpBAv8vuCTOdZv5a4lG3kr9QOWudr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MLfL_3kuFSJGZu39xRrmPT8pqid9IEbVMqS4G9-9v1bYd-Si62SPKTcPVzyA8owpb-Q5rsXT5xJ9EMSGB8Ro7LgXVW7OHl5SUo3_6KoVwyupSw4VL_6E0aV_5c1P6d8xXIQ7TQ2iL1oA7H2hQUy0kl1GzbQgn6JbE6hqA1dL98VJOYxAACfPIXLYZiSiYexfmw6TnRzq523yRAdfY9FIzIIoBBUG-pLOt9ylzzQN_AhRdcAwUw2Kn918CmkJHpiWr7uXH0H6B4UIWrlqJyEqwZnPXZzUbWGNfGvGNrUv7l2Y24bREcM2gkYQyes1aXdBDdWBRqUglx48Xv8g3H7YWaSM-lvIKZijAMAycZlnj7mbwWHwml0WI257LlFI_wZ1bKK2nHWj_LJOvOqn2G7a4oiw5I3jhJj5JMXc7Q0fOB93ntRtQNa1TezGP463Dp8w68gpmhbkHnht8sCJyJuyP51FuWk5k=","format":"openai-responses-v1","id":"rs_072781b717f67cb6016a59296a08f08193b5905296d19ef4f5","index":3}]}}],"usage":{"prompt_tokens":778,"completion_tokens":4988,"total_tokens":5766,"cost":0.030706,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.030706,"upstream_inference_prompt_cost":0.000778,"upstream_inference_completions_cost":0.029928},"completion_tokens_details":{"reasoning_tokens":1002,"image_tokens":0,"audio_tokens":0}}}

```python
import bpy, math
from mathutils import Vector

# ------------------------------------------------------------
# Clean scene
# ------------------------------------------------------------
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)
for datablocks in (bpy.data.meshes, bpy.data.curves, bpy.data.materials,
                   bpy.data.cameras, bpy.data.lights):
    pass

# ------------------------------------------------------------
# Materials
# ------------------------------------------------------------
def mat(name, color, metallic=0.0, roughness=0.45, transmission=0.0, alpha=1.0):
    m = bpy.data.materials.new(name)
    m.diffuse_color = (*color, alpha)
    m.use_nodes = True
    bs = m.node_tree.nodes.get("Principled BSDF")
    bs.inputs["Base Color"].default_value = (*color, 1)
    bs.inputs["Metallic"].default_value = metallic
    bs.inputs["Roughness"].default_value = roughness
    if "Transmission Weight" in bs.inputs:
        bs.inputs["Transmission Weight"].default_value = transmission
    if "IOR" in bs.inputs:
        bs.inputs["IOR"].default_value = 1.36
    if alpha < 1:
        bs.inputs["Alpha"].default_value = alpha
        m.surface_render_method = 'DITHERED'
    return m

orange = mat("Goldfish orange", (0.95, 0.19, 0.025), metallic=0.05, roughness=0.28)
orange_light = mat("Scale highlights", (1.0, 0.42, 0.055), metallic=0.05, roughness=0.24)
orange_dark = mat("Fin orange", (0.78, 0.075, 0.012), roughness=0.3)
finmat = mat("Translucent orange fins", (1.0, 0.16, 0.018), roughness=0.24, transmission=0.22, alpha=0.82)
fin_edge = mat("Fin edge glow", (1.0, 0.44, 0.06), roughness=0.18, transmission=0.3, alpha=0.68)
white = mat("Warm eye white", (0.95, 0.9, 0.72), roughness=0.2)
black = mat("Deep black pupils", (0.004, 0.002, 0.001), metallic=0.1, roughness=0.12)
gold = mat("Iris gold", (1.0, 0.48, 0.035), metallic=0.2, roughness=0.18)
water = mat("Calm turquoise water", (0.025, 0.19, 0.26), roughness=0.28)
water_light = mat("Water glow", (0.05, 0.38, 0.43), roughness=0.25)
sand = mat("Soft aqua floor", (0.06, 0.30, 0.31), roughness=0.6)
stone_mats = [
    mat("Pebble teal", (0.08, 0.23, 0.25), roughness=0.75),
    mat("Pebble blue", (0.10, 0.34, 0.35), roughness=0.7),
    mat("Pebble gold", (0.32, 0.32, 0.17), roughness=0.72)
]

# ------------------------------------------------------------
# Helpers
# ------------------------------------------------------------
def uv(name, loc, scale, material, seg=32, rings=16):
    bpy.ops.mesh.primitive_uv_sphere_add(segments=seg, ring_count=rings, location=loc)
    o = bpy.context.object
    o.name = name
    o.scale = scale
    bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
    o.data.materials.append(material)
    return o

def cube(name, loc, scale, material, bevel=0.0):
    bpy.ops.mesh.primitive_cube_add(location=loc)
    o = bpy.context.object
    o.name = name
    o.scale = scale
    bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
    o.data.materials.append(material)
    if bevel:
        mod = o.modifiers.new("Soft edges", 'BEVEL')
        mod.width = bevel
        mod.segments = 4
    return o

def cylinder(name, loc, radius, depth, material, vertices=64):
    bpy.ops.mesh.primitive_cylinder_add(vertices=vertices, radius=radius, depth=depth, location=loc)
    o = bpy.context.object
    o.name = name
    o.data.materials.append(material)
    bevel = o.modifiers.new("Rounded rim", 'BEVEL')
    bevel.width = 0.05
    bevel.segments = 3
    return o

def fin_mesh(name, points, thickness, material):
    # polygon in x,z plane, extruded along y
    verts = [(x, -thickness/2, z) for x,z in points] + [(x, thickness/2, z) for x,z in points]
    n = len(points)
    faces = [tuple(range(n)), tuple(range(n,2*n))[::-1]]
    for i in range(n):
        j=(i+1)%n
        faces.append((i,j,n+j,n+i))
    me = bpy.data.meshes.new(name+"Mesh")
    me.from_pydata(verts, [], faces)
    me.materials.append(material)
    ob = bpy.data.objects.new(name, me)
    bpy.context.collection.objects.link(ob)
    return ob

def tube_between(name, a, b, radius, material):
    mid=(Vector(a)+Vector(b))/2
    direction=Vector(b)-Vector(a)
    bpy.ops.mesh.primitive_cylinder_add(vertices=16, radius=radius, depth=direction.length, location=mid)
    o=bpy.context.object
    o.name=name
    o.rotation_mode='QUATERNION'
    o.rotation_quaternion=direction.to_track_quat('Z','Y')
    o.data.materials.append(material)
    return o

# ------------------------------------------------------------
# Circular child-recognizable floor / aquarium base
# ------------------------------------------------------------
cylinder("Round ocean floor", (0,0,-1.55), 5.4, 0.28, sand)
cylinder("Blue glassy inner floor", (0,0,-1.38), 4.9, 0.055, water_light)

# Pebbles arranged clearly around the floor
for i in range(26):
    a = i * math.tau / 26
    r = 3.45 + 0.32*math.sin(i*2.7)
    x,y = r*math.cos(a), r*math.sin(a)
    s = 0.13 + 0.08*((i*7)%5)/4
    p = uv("Rounded aquarium pebble", (x,y,-1.18+s*0.35), (s*1.45,s,s*0.65), stone_mats[i%3], 16, 8)
    p.rotation_euler[2]=a

# ------------------------------------------------------------
# Watery backdrop and abstract gentle light bands
# ------------------------------------------------------------
cube("Water backdrop", (0, 3.2, 1.2), (6.8, 0.18, 3.2), water, bevel=0.3)
# vertical soft turquoise ribbons
for i in range(7):
    x=-5.2+i*1.7
    band=cube("Backdrop water ribbon", (x,3.0,1.0), (0.11,0.04,2.5), water_light, bevel=0.12)
    band.rotation_euler[1]=0.17*math.sin(i)

# bubbles
for i in range(15):
    a=i*1.77
    x=-3.8+((i*1.31)%7.0)
    z=-0.9+((i*0.73)%3.5)
    y=-0.4+0.25*math.sin(a)
    bpy.ops.mesh.primitive_torus_add(major_radius=0.055+0.015*(i%3), minor_radius=0.012,
                                      major_segments=16, minor_segments=6, location=(x,y,z),
                                      rotation=(math.pi/2,0,0))
    bpy.context.object.name="Tiny rising bubble"
    bpy.context.object.data.materials.append(water_light)

# ------------------------------------------------------------
# Goldfish curved body
# ------------------------------------------------------------
# Custom ring body, bending gently in an S curve
rings=22
sides=32
verts=[]
for i in range(rings):
    x=-1.72 + i*(3.35/(rings-1))
    t=i/(rings-1)
    # fuller toward head, tapered at tail
    radius=0.12 + 0.74*(math.sin(math.pi*(0.06+0.88*t))**0.58)
    zc=0.16*math.sin(t*math.pi*1.75-0.55)
    # slight narrowing at snout
    radius *= (1.0-0.20*max(0,t-0.88)/0.12)
    for j in range(sides):
        ang=math.tau*j/sides
        y=radius*math.cos(ang)
        z=zc+radius*math.sin(ang)*0.82
        verts.append((x,y,z))
faces=[]
for i in range(rings-1):
    for j in range(sides):
        nj=(j+1)%sides
        faces.append((i*sides+j, i*sides+nj, (i+1)*sides+nj, (i+1)*sides+j))
faces.append(tuple(range(sides-1,-1,-1)))
faces.append(tuple((rings-1)*sides+j for j in range(sides)))
me=bpy.data.meshes.new("Curved goldfish body mesh")
me.from_pydata(verts,[],faces)
me.materials.append(orange)
body=bpy.data.objects.new("Rounded S-curve goldfish body",me)
bpy.context.collection.objects.link(body)
sub=body.modifiers.new("Smooth body", 'SUBSURF'); sub.levels=2; sub.render_levels=2
bpy.context.view_layer.objects.active=body
body.select_set(True)
bpy.ops.object.shade_smooth()
body.select_set(False)

# mouth lips and tiny barbels
uv("Soft round mouth", (1.60,-0.01,0.03), (0.15,0.18,0.11), orange_dark)
for side in (-1,1):
    tube_between("Goldfish mouth barbel", (1.57,side*0.10,-0.02), (1.76,side*0.18,-0.13), 0.018, orange_dark)

# ------------------------------------------------------------
# Large flowing split tail
# ------------------------------------------------------------
tail_upper=[(-1.35,0.36),(-1.85,0.62),(-2.48,1.16),(-3.30,1.33),(-3.02,0.42),(-2.25,0.08)]
tail_lower=[(-1.35,-0.28),(-2.25,-0.08),(-3.02,-0.45),(-3.34,-1.23),(-2.46,-1.00),(-1.82,-0.56)]
for idx,poly in enumerate((tail_upper,tail_lower)):
    f=fin_mesh("Flowing tail lobe", poly, 0.18, finmat)
    f.location.y=0
    # decorative glowing leading edge
    for k in range(len(poly)-1):
        if k in (0,1,2):
            tube_between("Translucent tail vein", (poly[k][0],-0.105,poly[k][1]),
                         (poly[k+1][0],-0.105,poly[k+1][1]), 0.018, fin_edge)

# dorsal fin, side fins
dorsal=[(-0.55,0.52),(0.02,1.10),(0.52,1.48),(1.04,1.08),(0.86,0.56)]
d=fin_mesh("Tall dorsal fin", dorsal, 0.12, finmat)
d.location.y=0.04
for k in range(len(dorsal)-1):
    tube_between("Dorsal fin ray", (dorsal[k][0],-0.075,dorsal[k][1]),
                 (dorsal[k+1][0],-0.075,dorsal[k+1][1]), 0.014, fin_edge)

# pectoral fins on both sides, oriented as extruded triangular surfaces
for side in (-1,1):
    pts=[(0.45,0.05),(0.85,-0.18),(1.46,-0.85),(0.72,-0.48)]
    # create in x,z then rotate/position: visible near side extends down
    p=fin_mesh("Side pectoral fin", pts, 0.10, finmat)
    p.location.y=side*0.56
    p.rotation_euler[1]=side*0.18

# small lower fin
fin_mesh("Lower balancing fin", [(-0.25,-0.43),(0.25,-0.75),(0.70,-0.50),(0.35,-0.35)], 0.10, finmat).location.y=0.08

# ------------------------------------------------------------
# Eyes on BOTH sides
# ------------------------------------------------------------
for side in (-1,1):
    y=side*0.64
    eye=uv("Eye white left" if side<0 else "Eye white right", (1.18,y,0.39), (0.25,0.16,0.25), white)
    # iris and pupil pushed outward
    iris=uv("Golden iris", (1.22,side*0.785,0.40), (0.125,0.045,0.135), gold)
    pupil=uv("Black pupil", (1.24,side*0.825,0.41), (0.062,0.022,0.075), black)
    uv("Eye catchlight", (1.27,side*0.846,0.49), (0.018,0.010,0.022), white, 12, 6)

# ------------------------------------------------------------
# Subtle scale pattern across visible and far sides
# ------------------------------------------------------------
for side in (-1,1):
    for row in range(4):
        for col in range(10):
            x=-1.10 + col*0.27 + (0.13 if row%2 else 0)
            # approximate curved body surface
            t=max(0,min(1,(x+1.72)/3.35))
            zc=0.16*math.sin(t*math.pi*1.75-0.55)
            rad=0.12+0.74*(math.sin(math.pi*(0.06+0.88*t))**0.58)
            z=zc-0.20+row*0.14
            if abs(z-zc)<rad*0.9:
                y=side*(math.sqrt(max(0.03,rad*rad-(z-zc)**2))*0.96)
                sc=uv("Subtle fish scale", (x,y,z), (0.095,0.024,0.072),
                      orange_light if (row+col)%4==0 else orange, 12, 6)
                sc.rotation_euler[1]=0.15*math.sin(x*3)

# ------------------------------------------------------------
# Lighting / camera
# ------------------------------------------------------------
world=bpy.context.scene.world
world.use_nodes=True
world.node_tree.nodes["Background"].inputs["Color"].default_value=(0.008,0.025,0.035,1)
world.node_tree.nodes["Background"].inputs["Strength"].default_value=0.22

def area(name, loc, energy, size, color):
    bpy.ops.object.light_add(type='AREA', location=loc)
    l=bpy.context.object
    l.name=name
    l.data.energy=energy
    l.data.shape='DISK'
    l.data.size=size
    l.data.color=color
    direction=Vector((0,0,0.0))-l.location
    l.rotation_euler=direction.to_track_quat('-Z','Y').to_euler()
    return l
area("Warm key light", (3.5,-5.0,5.0), 950, 4.0, (1.0,0.55,0.28))
area("Cool aquarium fill", (-4.0,-2.0,2.0), 700, 5.0, (0.20,0.65,0.85))
area("Tail rim light", (-3.5,2.0,2.8), 1100, 3.0, (0.12,0.55,0.9))
area("Top soft light", (0,0,6), 800, 3.5, (1.0,0.78,0.55))

bpy.ops.object.camera_add(location=(6.2,-10.8,3.6))
cam=bpy.context.object
cam.name="Hero goldfish camera"
cam.data.lens=52
cam.data.sensor_width=36
direction=Vector((-0.35,0,0.02))-cam.location
cam.rotation_euler=direction.to_track_quat('-Z','Y').to_euler()
bpy.context.scene.camera=cam

# ------------------------------------------------------------
# Render settings
# ------------------------------------------------------------
scene=bpy.context.scene
scene.render.engine='BLENDER_EEVEE_NEXT'
scene.render.resolution_x=1536
scene.render.resolution_y=1536
scene.render.resolution_percentage=100
scene.render.image_settings.file_format='PNG'
scene.render.film_transparent=False
scene.render.filepath='/tmp/goldfish_hero.png'
scene.view_settings.look='AgX - Medium High Contrast'
scene.render.image_settings.color_mode='RGBA'

# Ground contact / atmospheric depth
scene.render.use_file_extension=True
bpy.ops.wm.save_as_mainfile(filepath='/tmp/goldfish_hero.blend')
```


```python
import bpy, math
from mathutils import Vector

# ------------------------------------------------------------
# Clean scene
# ------------------------------------------------------------
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)
for datablocks in (bpy.data.meshes, bpy.data.curves, bpy.data.materials,
                   bpy.data.cameras, bpy.data.lights):
    pass

# ------------------------------------------------------------
# Materials
# ------------------------------------------------------------
def mat(name, color, metallic=0.0, roughness=0.45, transmission=0.0, alpha=1.0):
    m = bpy.data.materials.new(name)
    m.diffuse_color = (*color, alpha)
    m.use_nodes = True
    bs = m.node_tree.nodes.get("Principled BSDF")
    bs.inputs["Base Color"].default_value = (*color, 1)
    bs.inputs["Metallic"].default_value = metallic
    bs.inputs["Roughness"].default_value = roughness
    if "Transmission Weight" in bs.inputs:
        bs.inputs["Transmission Weight"].default_value = transmission
    if "IOR" in bs.inputs:
        bs.inputs["IOR"].default_value = 1.36
    if alpha < 1:
        bs.inputs["Alpha"].default_value = alpha
        m.surface_render_method = 'DITHERED'
    return m

orange = mat("Goldfish orange", (0.95, 0.19, 0.025), metallic=0.05, roughness=0.28)
orange_light = mat("Scale highlights", (1.0, 0.42, 0.055), metallic=0.05, roughness=0.24)
orange_dark = mat("Fin orange", (0.78, 0.075, 0.012), roughness=0.3)
finmat = mat("Translucent orange fins", (1.0, 0.16, 0.018), roughness=0.24, transmission=0.22, alpha=0.82)
fin_edge = mat("Fin edge glow", (1.0, 0.44, 0.06), roughness=0.18, transmission=0.3, alpha=0.68)
white = mat("Warm eye white", (0.95, 0.9, 0.72), roughness=0.2)
black = mat("Deep black pupils", (0.004, 0.002, 0.001), metallic=0.1, roughness=0.12)
gold = mat("Iris gold", (1.0, 0.48, 0.035), metallic=0.2, roughness=0.18)
water = mat("Calm turquoise water", (0.025, 0.19, 0.26), roughness=0.28)
water_light = mat("Water glow", (0.05, 0.38, 0.43), roughness=0.25)
sand = mat("Soft aqua floor", (0.06, 0.30, 0.31), roughness=0.6)
stone_mats = [
    mat("Pebble teal", (0.08, 0.23, 0.25), roughness=0.75),
    mat("Pebble blue", (0.10, 0.34, 0.35), roughness=0.7),
    mat("Pebble gold", (0.32, 0.32, 0.17), roughness=0.72)
]

# ------------------------------------------------------------
# Helpers
# ------------------------------------------------------------
def uv(name, loc, scale, material, seg=32, rings=16):
    bpy.ops.mesh.primitive_uv_sphere_add(segments=seg, ring_count=rings, location=loc)
    o = bpy.context.object
    o.name = name
    o.scale = scale
    bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
    o.data.materials.append(material)
    return o

def cube(name, loc, scale, material, bevel=0.0):
    bpy.ops.mesh.primitive_cube_add(location=loc)
    o = bpy.context.object
    o.name = name
    o.scale = scale
    bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
    o.data.materials.append(material)
    if bevel:
        mod = o.modifiers.new("Soft edges", 'BEVEL')
        mod.width = bevel
        mod.segments = 4
    return o

def cylinder(name, loc, radius, depth, material, vertices=64):
    bpy.ops.mesh.primitive_cylinder_add(vertices=vertices, radius=radius, depth=depth, location=loc)
    o = bpy.context.object
    o.name = name
    o.data.materials.append(material)
    bevel = o.modifiers.new("Rounded rim", 'BEVEL')
    bevel.width = 0.05
    bevel.segments = 3
    return o

def fin_mesh(name, points, thickness, material):
    # polygon in x,z plane, extruded along y
    verts = [(x, -thickness/2, z) for x,z in points] + [(x, thickness/2, z) for x,z in points]
    n = len(points)
    faces = [tuple(range(n)), tuple(range(n,2*n))[::-1]]
    for i in range(n):
        j=(i+1)%n
        faces.append((i,j,n+j,n+i))
    me = bpy.data.meshes.new(name+"Mesh")
    me.from_pydata(verts, [], faces)
    me.materials.append(material)
    ob = bpy.data.objects.new(name, me)
    bpy.context.collection.objects.link(ob)
    return ob

def tube_between(name, a, b, radius, material):
    mid=(Vector(a)+Vector(b))/2
    direction=Vector(b)-Vector(a)
    bpy.ops.mesh.primitive_cylinder_add(vertices=16, radius=radius, depth=direction.length, location=mid)
    o=bpy.context.object
    o.name=name
    o.rotation_mode='QUATERNION'
    o.rotation_quaternion=direction.to_track_quat('Z','Y')
    o.data.materials.append(material)
    return o

# ------------------------------------------------------------
# Circular child-recognizable floor / aquarium base
# ------------------------------------------------------------
cylinder("Round ocean floor", (0,0,-1.55), 5.4, 0.28, sand)
cylinder("Blue glassy inner floor", (0,0,-1.38), 4.9, 0.055, water_light)

# Pebbles arranged clearly around the floor
for i in range(26):
    a = i * math.tau / 26
    r = 3.45 + 0.32*math.sin(i*2.7)
    x,y = r*math.cos(a), r*math.sin(a)
    s = 0.13 + 0.08*((i*7)%5)/4
    p = uv("Rounded aquarium pebble", (x,y,-1.18+s*0.35), (s*1.45,s,s*0.65), stone_mats[i%3], 16, 8)
    p.rotation_euler[2]=a

# ------------------------------------------------------------
# Watery backdrop and abstract gentle light bands
# ------------------------------------------------------------
cube("Water backdrop", (0, 3.2, 1.2), (6.8, 0.18, 3.2), water, bevel=0.3)
# vertical soft turquoise ribbons
for i in range(7):
    x=-5.2+i*1.7
    band=cube("Backdrop water ribbon", (x,3.0,1.0), (0.11,0.04,2.5), water_light, bevel=0.12)
    band.rotation_euler[1]=0.17*math.sin(i)

# bubbles
for i in range(15):
    a=i*1.77
    x=-3.8+((i*1.31)%7.0)
    z=-0.9+((i*0.73)%3.5)
    y=-0.4+0.25*math.sin(a)
    bpy.ops.mesh.primitive_torus_add(major_radius=0.055+0.015*(i%3), minor_radius=0.012,
                                      major_segments=16, minor_segments=6, location=(x,y,z),
                                      rotation=(math.pi/2,0,0))
    bpy.context.object.name="Tiny rising bubble"
    bpy.context.object.data.materials.append(water_light)

# ------------------------------------------------------------
# Goldfish curved body
# ------------------------------------------------------------
# Custom ring body, bending gently in an S curve
rings=22
sides=32
verts=[]
for i in range(rings):
    x=-1.72 + i*(3.35/(rings-1))
    t=i/(rings-1)
    # fuller toward head, tapered at tail
    radius=0.12 + 0.74*(math.sin(math.pi*(0.06+0.88*t))**0.58)
    zc=0.16*math.sin(t*math.pi*1.75-0.55)
    # slight narrowing at snout
    radius *= (1.0-0.20*max(0,t-0.88)/0.12)
    for j in range(sides):
        ang=math.tau*j/sides
        y=radius*math.cos(ang)
        z=zc+radius*math.sin(ang)*0.82
        verts.append((x,y,z))
faces=[]
for i in range(rings-1):
    for j in range(sides):
        nj=(j+1)%sides
        faces.append((i*sides+j, i*sides+nj, (i+1)*sides+nj, (i+1)*sides+j))
faces.append(tuple(range(sides-1,-1,-1)))
faces.append(tuple((rings-1)*sides+j for j in range(sides)))
me=bpy.data.meshes.new("Curved goldfish body mesh")
me.from_pydata(verts,[],faces)
me.materials.append(orange)
body=bpy.data.objects.new("Rounded S-curve goldfish body",me)
bpy.context.collection.objects.link(body)
sub=body.modifiers.new("Smooth body", 'SUBSURF'); sub.levels=2; sub.render_levels=2
bpy.context.view_layer.objects.active=body
body.select_set(True)
bpy.ops.object.shade_smooth()
body.select_set(False)

# mouth lips and tiny barbels
uv("Soft round mouth", (1.60,-0.01,0.03), (0.15,0.18,0.11), orange_dark)
for side in (-1,1):
    tube_between("Goldfish mouth barbel", (1.57,side*0.10,-0.02), (1.76,side*0.18,-0.13), 0.018, orange_dark)

# ------------------------------------------------------------
# Large flowing split tail
# ------------------------------------------------------------
tail_upper=[(-1.35,0.36),(-1.85,0.62),(-2.48,1.16),(-3.30,1.33),(-3.02,0.42),(-2.25,0.08)]
tail_lower=[(-1.35,-0.28),(-2.25,-0.08),(-3.02,-0.45),(-3.34,-1.23),(-2.46,-1.00),(-1.82,-0.56)]
for idx,poly in enumerate((tail_upper,tail_lower)):
    f=fin_mesh("Flowing tail lobe", poly, 0.18, finmat)
    f.location.y=0
    # decorative glowing leading edge
    for k in range(len(poly)-1):
        if k in (0,1,2):
            tube_between("Translucent tail vein", (poly[k][0],-0.105,poly[k][1]),
                         (poly[k+1][0],-0.105,poly[k+1][1]), 0.018, fin_edge)

# dorsal fin, side fins
dorsal=[(-0.55,0.52),(0.02,1.10),(0.52,1.48),(1.04,1.08),(0.86,0.56)]
d=fin_mesh("Tall dorsal fin", dorsal, 0.12, finmat)
d.location.y=0.04
for k in range(len(dorsal)-1):
    tube_between("Dorsal fin ray", (dorsal[k][0],-0.075,dorsal[k][1]),
                 (dorsal[k+1][0],-0.075,dorsal[k+1][1]), 0.014, fin_edge)

# pectoral fins on both sides, oriented as extruded triangular surfaces
for side in (-1,1):
    pts=[(0.45,0.05),(0.85,-0.18),(1.46,-0.85),(0.72,-0.48)]
    # create in x,z then rotate/position: visible near side extends down
    p=fin_mesh("Side pectoral fin", pts, 0.10, finmat)
    p.location.y=side*0.56
    p.rotation_euler[1]=side*0.18

# small lower fin
fin_mesh("Lower balancing fin", [(-0.25,-0.43),(0.25,-0.75),(0.70,-0.50),(0.35,-0.35)], 0.10, finmat).location.y=0.08

# ------------------------------------------------------------
# Eyes on BOTH sides
# ------------------------------------------------------------
for side in (-1,1):
    y=side*0.64
    eye=uv("Eye white left" if side<0 else "Eye white right", (1.18,y,0.39), (0.25,0.16,0.25), white)
    # iris and pupil pushed outward
    iris=uv("Golden iris", (1.22,side*0.785,0.40), (0.125,0.045,0.135), gold)
    pupil=uv("Black pupil", (1.24,side*0.825,0.41), (0.062,0.022,0.075), black)
    uv("Eye catchlight", (1.27,side*0.846,0.49), (0.018,0.010,0.022), white, 12, 6)

# ------------------------------------------------------------
# Subtle scale pattern across visible and far sides
# ------------------------------------------------------------
for side in (-1,1):
    for row in range(4):
        for col in range(10):
            x=-1.10 + col*0.27 + (0.13 if row%2 else 0)
            # approximate curved body surface
            t=max(0,min(1,(x+1.72)/3.35))
            zc=0.16*math.sin(t*math.pi*1.75-0.55)
            rad=0.12+0.74*(math.sin(math.pi*(0.06+0.88*t))**0.58)
            z=zc-0.20+row*0.14
            if abs(z-zc)<rad*0.9:
                y=side*(math.sqrt(max(0.03,rad*rad-(z-zc)**2))*0.96)
                sc=uv("Subtle fish scale", (x,y,z), (0.095,0.024,0.072),
                      orange_light if (row+col)%4==0 else orange, 12, 6)
                sc.rotation_euler[1]=0.15*math.sin(x*3)

# ------------------------------------------------------------
# Lighting / camera
# ------------------------------------------------------------
world=bpy.context.scene.world
world.use_nodes=True
world.node_tree.nodes["Background"].inputs["Color"].default_value=(0.008,0.025,0.035,1)
world.node_tree.nodes["Background"].inputs["Strength"].default_value=0.22

def area(name, loc, energy, size, color):
    bpy.ops.object.light_add(type='AREA', location=loc)
    l=bpy.context.object
    l.name=name
    l.data.energy=energy
    l.data.shape='DISK'
    l.data.size=size
    l.data.color=color
    direction=Vector((0,0,0.0))-l.location
    l.rotation_euler=direction.to_track_quat('-Z','Y').to_euler()
    return l
area("Warm key light", (3.5,-5.0,5.0), 950, 4.0, (1.0,0.55,0.28))
area("Cool aquarium fill", (-4.0,-2.0,2.0), 700, 5.0, (0.20,0.65,0.85))
area("Tail rim light", (-3.5,2.0,2.8), 1100, 3.0, (0.12,0.55,0.9))
area("Top soft light", (0,0,6), 800, 3.5, (1.0,0.78,0.55))

bpy.ops.object.camera_add(location=(6.2,-10.8,3.6))
cam=bpy.context.object
cam.name="Hero goldfish camera"
cam.data.lens=52
cam.data.sensor_width=36
direction=Vector((-0.35,0,0.02))-cam.location
cam.rotation_euler=direction.to_track_quat('-Z','Y').to_euler()
bpy.context.scene.camera=cam

# ------------------------------------------------------------
# Render settings
# ------------------------------------------------------------
scene=bpy.context.scene
scene.render.engine='BLENDER_EEVEE_NEXT'
scene.render.resolution_x=1536
scene.render.resolution_y=1536
scene.render.resolution_percentage=100
scene.render.image_settings.file_format='PNG'
scene.render.film_transparent=False
scene.render.filepath='/tmp/goldfish_hero.png'
scene.view_settings.look='AgX - Medium High Contrast'
scene.render.image_settings.color_mode='RGBA'

# Ground contact / atmospheric depth
scene.render.use_file_extension=True
bpy.ops.wm.save_as_mainfile(filepath='/tmp/goldfish_hero.blend')
```