Skill 详情
blender-cameras
Core Blender camera, framing, and depth-of-field support.
使用前先检查
自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。
SKILL.md
这段内容是审核时保存的快照。外部来源才是完整且最新的版本。
---
name: blender-cameras
description: Set up Blender cameras with cinematic intent — focal length, depth of field (f-stop / focus object), composition (rule of thirds, leading lines), animated cameras (orbit, dolly, push-in), tracking constraints. Use whenever the user asks to "set up the camera", "frame the shot", "make it look cinematic / hero / portrait / wide-angle / telephoto", "add depth of field", "orbit the camera", or any composition/framing request. Make sure to use this skill even if the user does not say "camera" — also covers "hero shot", "close-up", "from above", "shallow focus", "85mm portrait look".
when_to_use: Any camera placement, framing, focal length, DoF, or animated camera setup in Blender.
allowed-tools: Read Bash mcp__blender__execute_blender_code mcp__blender__get_scene_info mcp__blender__get_object_info
---
# Blender Cameras
Set up cameras with the same decisions a real cinematographer makes: focal length for feel, f-stop for focus, composition for storytelling.
## Focal length cheat sheet
| Length | Feel | Use |
|--------|------|-----|
| 14–24mm | Very wide, distorted | Architecture, claustrophobic interiors, exaggerated perspective |
| 28–35mm | Wide, "documentary" | Establishing shots, environments |
| **50mm** | Neutral (≈ human eye) | Default storytelling |
| **85mm** | Short telephoto | Portraits, character close-ups (flattering) |
| 100–135mm | Telephoto | Hero product shots, isolated subjects |
| 200mm+ | Long tele | Wildlife, surveillance look, heavy compression |
**Quick rule**: 85mm for intimacy, 24mm for spectacle, 50mm for neutral.
## Aperture / f-stop
| f-stop | DoF | Use |
|--------|-----|-----|
| f/1.2–2.0 | Razor thin | Hero portraits, dreamy |
| f/2.8 | Shallow | Standard portrait |
| f/4 | Moderate | Two subjects in frame |
| f/5.6–8 | Medium-deep | Group portraits, environments |
| f/11+ | Very deep | Landscape, "everything sharp" |
## Recipes
### Recipe 0 — Bbox-aware hero camera (preferred for orchestrator chains)
Use this when you have a specific subject. Computes the subject's bounding box, places camera at a distance that fits the subject in ~80% of the frame vertically, and aims via Track-To.
```python
import bpy, math
from mathutils import Vector
# Choose subject — all meshes named GEO-* by default, or pass a specific list
subject_meshes = [o for o in bpy.data.objects if o.type == 'MESH' and o.name.startswith('GEO-')]
if not subject_meshes:
raise RuntimeError("No subject meshes found (looking for GEO- prefix)")
# World-space bbox
deps = bpy.context.evaluated_depsgraph_get()
all_verts = []
for o in subject_meshes:
eo = o.evaluated_get(deps); em = eo.to_mesh()
for v in em.vertices:
all_verts.append(o.matrix_world @ v.co)
eo.to_mesh_clear()
xs = [v.x for v in all_verts]; ys = [v.y for v in all_verts]; zs = [v.z for v in all_verts]
center = Vector(((min(xs)+max(xs))/2, (min(ys)+max(ys))/2, (min(zs)+max(zs))/2))
height = max(zs) - min(zs)
width = max(xs) - min(xs)
biggest = max(height, width)
# Frame fit: at distance D, vertical frame = D × (sensor_h / focal). Solve for D.
focal_mm = 60 # 60mm gives a flattering not-too-wide hero shot
sensor_h_mm = 24 # full-frame
frame_per_meter = sensor_h_mm / focal_mm # 0.4 m vertical frame per metre of distance
target_fill = 0.80
camera_distance = biggest / (frame_per_meter * target_fill)
# Camera positioned in front (negative Y) with slight X offset for a 3/4 angle
cam_pos = Vector((center.x + camera_distance * 0.3, center.y - camera_distance, center.z))
# Empty for tracking
empty_name = 'Empty-camera_target'
empty = bpy.data.objects.get(empty_name) or bpy.data.objects.new(empty_name, None)
if empty.name not in [o.name for o in bpy.context.collection.objects]:
bpy.context.collection.objects.link(empty)
empty.location = center
# Camera
cam_data = bpy.data.cameras.new('CAM-hero')
cam_data.lens = focal_mm
cam_data.dof.use_dof = True
cam_data.dof.aperture_fstop = 4.0
cam_data.dof.focus_在 GitHub 阅读完整来源 (打开外部页面)