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 space cowboy in the final seconds before a duel, leaning against the exterior corner of a weathered frontier saloon. One full-body character, one saloon façade, one readable pose.

Character and pose. Create one believable adult human with correct proportions, natural weight distribution, a readable face, and individually posed fingers. The shoulder and hip rest against the wall, one boot is crossed or braced, and the head turns toward an unseen opponent. The gun hand remains open a few centimeters above the pistol grip. The hand, holster, and face must all be clearly visible.

Costume. Combine western clothing with functional space equipment: a long duster coat over a fitted vac-suit, chest-mounted life-support hardware, backpack unit, collar ring, hoses, sealed gloves, and heavy magnetic boots. Use a wide-brimmed hat integrated around a transparent helmet dome. Add a gun belt with an energy revolver in an open holster and cells in belt loops. Leather, cloth, metal, glass, and polymer must read as distinct materials.

Saloon. Model only the exterior corner and entrance of a space-frontier saloon. Required elements: covered porch, support posts, swinging airlock-style doors, dusty windows, riveted metal reinforcement, exposed utility conduits, and a large weathered “SALOON” sign above the entrance. The building should combine Old West proportions with improvised colony construction. Do not build a complete town.

Ground. Use a small area of dusty terrain with grit, footprints, and scattered scrap. A cable tumbleweed may be included, but it must remain secondary.

Lighting. Use a hard, low, warm key light that creates a long sharp shadow across the wall and ground. Add cool ambient fill and a subtle warm glow from inside the saloon. Keep the lighting high-contrast and cinematic while preserving readable anatomy and materials.

Composition. Use a chest-height or slightly low camera in a three-quarter view. The cowboy must dominate the frame, while the saloon entrance and sign remain clearly recognizable. Keep the entire body visible from hat to boots. Avoid extreme perspective distortion and excessive depth of field.

3D evaluation requirements.

- One fully modeled and posed human character.
- Correct anatomy and readable hands.
- Clear contact between body, boots, wall, and ground.
- Real cloth folds and layered costume construction.
- Separate modeled hard-surface components for suit equipment and weapon.
- Distinct material response for leather, fabric, metal, glass, and polymer.
- Modeled saloon architecture with visible construction details.
- No flat image cards, billboard geometry, or texture-only substitutes for major details.

</task>