create-3d-scene
정보
이 Claude Skill은 Python의 bpy 모듈을 사용하여 Blender 3D 장면을 자동으로 생성합니다. 객체, 재질, 조명, 카메라를 프로그래밍 방식으로 구성하여 개발자가 재현 가능한 설정, 배치 렌더링 워크플로우 또는 데이터 파이프라인 통합이 필요할 때 사용할 수 있습니다. 제품 시각화나 건축 시각화와 같은 장면 변형 생성 및 렌더링 작업 자동화에 활용하세요.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/create-3d-sceneClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Create 3D Scene
Blender scene via bpy: objects + materials + lights + camera + env.
Use When
- Repro 3D viz scenes from scratch
- Auto product / architectural render
- Gen multi scene variations
- Template scenes for batch render
- Prototype layouts pre-manual
- 3D viz → data pipelines / reports
In
| In | Type | Desc | Example |
|---|---|---|---|
| Scene spec | Config | Objects, mats, lights | Product dims, colors, lights |
| Out reqs | Params | Res, engine, quality | 1920x1080, Cycles, 128 samples |
| Asset paths | Paths | Models, textures, HDRIs | /path/to/hdri.exr, product_model.obj |
| Camera | Params | Pos, rot, focal, DOF | location=(7,-7,5), lens=50mm |
| Env | Config | World shader, BG, ambient | HDRI, solid, gradient |
Do
1. Script Struct
#!/usr/bin/env python3
"""
Scene setup script for Blender.
Usage: blender --background --python setup_scene.py
"""
import bpy
import math
import os
from pathlib import Path
def clear_scene():
"""Remove all objects from the scene."""
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)
# Clear orphaned data
for block in bpy.data.meshes:
if block.users == 0:
bpy.data.meshes.remove(block)
for block in bpy.data.materials:
if block.users == 0:
bpy.data.materials.remove(block)
def main():
clear_scene()
# Scene setup steps follow
if __name__ == "__main__":
main()
Got: Script w/ clear_scene() + main() If err: Python syntax, bpy import in Blender env
2. Mesh Objects
def add_objects():
"""Add mesh objects to scene."""
# Add cube
bpy.ops.mesh.primitive_cube_add(
size=2.0,
location=(0, 0, 1)
)
cube = bpy.context.active_object
cube.name = "Product_Base"
# Add sphere
bpy.ops.mesh.primitive_uv_sphere_add(
radius=1.0,
segments=32,
ring_count=16,
location=(3, 0, 1)
)
sphere = bpy.context.active_object
sphere.name = "Detail_Sphere"
# Import external model (optional)
# bpy.ops.import_scene.obj(filepath="model.obj")
return cube, sphere
Got: Objects in scene w/ names + pos If err: Op syntax, coords, no name conflicts
3. Node Materials (PBR)
def create_material(name, base_color, metallic=0.0, roughness=0.5):
"""Create a PBR material with node setup."""
# Create material
mat = bpy.data.materials.new(name=name)
mat.use_nodes = True
nodes = mat.node_tree.nodes
links = mat.node_tree.links
# Clear default nodes
nodes.clear()
# Add Principled BSDF
node_bsdf = nodes.new(type='ShaderNodeBsdfPrincipled')
node_bsdf.location = (0, 0)
node_bsdf.inputs['Base Color'].default_value = base_color + (1.0,) # Add alpha
node_bsdf.inputs['Metallic'].default_value = metallic
node_bsdf.inputs['Roughness'].default_value = roughness
# Add Material Output
node_output = nodes.new(type='ShaderNodeOutputMaterial')
node_output.location = (300, 0)
# Link nodes
links.new(node_bsdf.outputs['BSDF'], node_output.inputs['Surface'])
return mat
def apply_materials(cube, sphere):
"""Apply materials to objects."""
# Create materials
mat_red = create_material("RedPlastic", (0.8, 0.1, 0.1), metallic=0.0, roughness=0.4)
mat_metal = create_material("Metal", (0.8, 0.8, 0.8), metallic=1.0, roughness=0.2)
# Assign to objects
if cube.data.materials:
cube.data.materials[0] = mat_red
else:
cube.data.materials.append(mat_red)
if sphere.data.materials:
sphere.data.materials[0] = mat_metal
else:
sphere.data.materials.append(mat_metal)
Got: Mats visible in shader editor If err: Node types, link syntax, color [0,1]
4. Lighting
def setup_lighting():
"""Add lights to scene."""
# Sun light
bpy.ops.object.light_add(
type='SUN',
location=(5, 5, 10)
)
sun = bpy.context.active_object
sun.name = "KeyLight"
sun.data.energy = 3.0
sun.rotation_euler = (math.radians(45), 0, math.radians(45))
# Area light (fill light)
bpy.ops.object.light_add(
type='AREA',
location=(-4, -4, 6)
)
area = bpy.context.active_object
area.name = "FillLight"
area.data.energy = 200.0
area.data.size = 5.0
area.rotation_euler = (math.radians(60), 0, math.radians(-135))
# Point light (rim light)
bpy.ops.object.light_add(
type='POINT',
location=(2, -5, 3)
)
point = bpy.context.active_object
point.name = "RimLight"
point.data.energy = 500.0
Got: 3 lights w/ intensity + pos If err: Tune energy (Cycles vs EEVEE), rot fmt
5. Camera
def setup_camera():
"""Add and configure camera."""
bpy.ops.object.camera_add(
location=(7, -7, 5)
)
camera = bpy.context.active_object
camera.name = "MainCamera"
# Point camera at origin
direction = (0, 0, 1) - camera.location
rot_quat = direction.to_track_quat('-Z', 'Y')
camera.rotation_euler = rot_quat.to_euler()
# Camera settings
camera.data.lens = 50 # Focal length in mm
camera.data.dof.use_dof = True
camera.data.dof.focus_distance = 10.0
camera.data.dof.aperture_fstop = 2.8
# Set as active camera
bpy.context.scene.camera = camera
Got: Camera w/ focal + DOF If err: Simpler rot if track_to fails, lens units
6. World Env
def setup_world():
"""Configure world environment."""
world = bpy.data.worlds['World']
world.use_nodes = True
nodes = world.node_tree.nodes
links = world.node_tree.links
# Clear default nodes
nodes.clear()
# Add Environment Texture (for HDRI)
node_env = nodes.new(type='ShaderNodeTexEnvironment')
node_env.location = (-300, 0)
# Load HDRI if available
hdri_path = "/path/to/hdri.exr"
if os.path.exists(hdri_path):
node_env.image = bpy.data.images.load(hdri_path)
# Add Background shader
node_bg = nodes.new(type='ShaderNodeBackground')
node_bg.location = (0, 0)
node_bg.inputs['Strength'].default_value = 1.0
# Add World Output
node_output = nodes.new(type='ShaderNodeOutputWorld')
node_output.location = (300, 0)
# Link nodes
links.new(node_env.outputs['Color'], node_bg.inputs['Color'])
links.new(node_bg.outputs['Background'], node_output.inputs['Surface'])
Got: World w/ HDRI / solid BG If err: Skip HDRI if missing → BG node + color
7. Render Settings
def setup_render_settings():
"""Configure render settings."""
scene = bpy.context.scene
# Render engine
scene.render.engine = 'CYCLES' # or 'BLENDER_EEVEE'
scene.cycles.samples = 128
scene.cycles.use_denoising = True
# Output settings
scene.render.resolution_x = 1920
scene.render.resolution_y = 1080
scene.render.resolution_percentage = 100
# File format
scene.render.image_settings.file_format = 'PNG'
scene.render.image_settings.color_mode = 'RGBA'
scene.render.image_settings.color_depth = '16'
scene.render.filepath = "/tmp/render_"
Got: Render ready If err: Engine spell, res = pos ints
8. Collections
def organize_collections():
"""Organize objects into collections."""
# Create collections
col_geometry = bpy.data.collections.new("Geometry")
col_lights = bpy.data.collections.new("Lights")
col_cameras = bpy.data.collections.new("Cameras")
# Link to scene
bpy.context.scene.collection.children.link(col_geometry)
bpy.context.scene.collection.children.link(col_lights)
bpy.context.scene.collection.children.link(col_cameras)
# Move objects to collections
for obj in bpy.data.objects:
# Unlink from main collection
bpy.context.scene.collection.objects.unlink(obj)
# Link to appropriate collection
if obj.type == 'MESH':
col_geometry.objects.link(obj)
elif obj.type == 'LIGHT':
col_lights.objects.link(obj)
elif obj.type == 'CAMERA':
col_cameras.objects.link(obj)
Got: Named collections If err: Check exists before create, handle orphans
Check
- Script runs no err in BG mode
- Objects in outliner
- Mat colors + props in shader editor
- Camera frames objects
- Lights adequate (test render)
- World env loads
- Render settings fit out reqs
- Collections logical
- No orphan data blocks
- clear_scene() for repro
Traps
- Name conflicts: Unique names, check existing
- Color fmt: Tuples (r,g,b,a) [0,1]
- Missing alpha:
(r, g, b, 1.0) - Node conn err: Verify I/O before link
- Camera not active:
bpy.context.scene.camera = camera_object - Rel vs abs paths: Use abs / Path() cross-platform
- Units: Blender=meters, lens=mm
- Rot fmt:
math.radians()for deg→rad - Engine diff: EEVEE vs Cycles features
- Mem leak: Clear orphans in batch
→
- script-blender-automation: Procedural + batch
- render-blender-output: Render pipeline + exec
- create-2d-composition: 2D variant
GitHub 저장소
연관 스킬
content-collections
메타이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.
polymarket
메타이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.
creating-opencode-plugins
메타이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.
sglang
메타SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.
