Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

render

БесплатноБез исполняемых скриптовНе проверен

Renders photoreal images and videos of a text-to-cad model, a STEP or an xbf with Blender - a hero shot, a product or README picture, a turntable, or a film…

earthtojakeот earthtojake★ 27 943 звезды на GitHub

Об этом скилле

Renders for people

A render is a picture for a person: a hero image, a README picture, a turntable, a film of a mechanism. The model goes to Blender as a GLB, loaded by cad.blender.load; the scene (camera, lights, world, engine, output) is an ordinary Python script that imports bpy, Blender as a Python module, and cad run runs it. Geometry is judged with cad model snapshot, never a render: lens, light and depth of field make it a poor measure.

Start with the task

Task Start with Reference
A still of a model Export a GLB, write a render.py that loads it, cad run render.py The script, scene script
Draft, then a final An EEVEE draft at 1080p, looked at, before Cycles Draft then final
A pose, or a frame of an animation model.play(name) and the frame Load the GLB
A turntable The camera on an empty that turns once Turntables
A film of a motion or an animation model.play(name), then an mp4 Films
Motion blur, depth of field, a glow The scene's and the camera's settings; a keyed emission Shots
Looks and materials Set in the model, exported again Looks
A .blend for the person bpy.ops.wm.save_as_mainfile at the end of the script A .blend
The GPU, or a machine with no graphics driver Cycles' device, chosen in the script Engines, no driver

Setup

Written for cad==0.11.21. Before first use in a chat, run cad --version. If it fails, or cad is missing or older than 0.11.12, run uv tool install --force cad. If it is older than the release this skill was written for, run cad update.

If cad is a major or minor version newer than this skill, tell the person to update the text-to-cad plugin: https://github.com/earthtojake/text-to-cad A project written for an earlier version may need changes; the migration guides say what: https://github.com/earthtojake/text-to-cad/tree/main/docs/migrations

cad run sees import bpy and makes the script an environment with bpy 5.2.3 (Blender 5.2 LTS) on Python 3.13 beside cad, once: a download of 260 to 430 MB, so the first run is slow. Nothing starts the Blender app, and the person's own Blender settings and add-ons never load. bpy has no build for Intel Macs or Linux on ARM, where cad run refuses the script by name.

Export the model

cad model export "$ID" scene.glb --tolerance 0.02 --angle 5

$ID is the model's id; a STEP or an xbf exports the same way (cad step export part.step scene.glb --tolerance 0.02 --angle 5). The GLB is in metres, Z up once imported, with the assembly's tree as nested empties, a PBR material per look, and each motion and animation() as a clip. --tolerance (mm) and --angle (degrees) mesh it finer than the viewer's, so a close camera shows no facets, at the cost of triangles: start near 0.02 mm and 5 degrees for a close-up of a hand-sized part, coarser for a large assembly seen whole. The GLB is a copy: export again after every model change.

The script

# render.py: cad run render.py
import math
from pathlib import Path

import bpy
from mathutils import Vector

from cad.blender import load

HERE = Path(__file__).resolve().parent

bpy.ops.wm.read_factory_settings(use_empty=True)  # no person's startup file, no default cube
scene = bpy.context.scene
model = load(HERE / "scene.glb")  # every part where cad placed it

scene.render.resolution_x, scene.render.resolution_y = 1920, 1080
aim = bpy.data.objects.new("aim", None)
aim.location = model.center
camera = bpy.data.objects.new("camera", bpy.data.cameras.new("camera"))
camera.data.lens = 85
view = math.tan(camera.data.angle / 2) * min(1, scene.render.resolution_y / scene.render.resolution_x)
distance = model.size.length / 2 / view * 1.1  # the whole box in the frame's shorter side
camera.location = model.center + distance * Vector((1, -1, 0.6)).normalized()
camera.constraints.new("TRACK_TO").target = aim
sun = bpy.data.objects.new("sun", bpy.data.lights.new("sun", "SUN"))
sun.data.energy, sun.rotation_euler = 3.0, (0.8, 0.2, 0.6)
for item in (aim, camera, sun):
    scene.collection.objects.link(item)
scene.camera = camera
scene.world = bpy.data.worlds.new("world")
scene.world.node_tree.nodes["Background"].inputs["Strength"].default_value = 0.4

scene.render.engine = "BLENDER_EEVEE"  # a draft; "CYCLES" for the final
scene.render.filepath = str(HERE / "hero.png")
bpy.ops.render.render(write_still=True)
cad run render.py

The script is the scene: every run starts empty and adds its camera, lights and world in Python. Arguments after the script's name reach it as sys.argv[1:]. Lights, the

Полный SKILL.md на GitHub

Установить render в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSEagents/openai.yamlreferences/scene-script.mdreferences/shots.md

FAQ

Что делает скилл render?

Renders photoreal images and videos of a text-to-cad model, a STEP or an xbf with Blender - a hero shot, a product or README picture, a turntable, or a film of a model's motion. Use when the person wants a picture or a video for people to look at. Not for checking geometry, which the cad skill's snapshot does.

Как установить скилл render?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл render запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить render с