/blender-vfx:blender-materials-shadersfrom blender-vfx
Creates Blender shader node trees, PBR materials, and procedural textures with EEVEE_NEXT and Cycles compatibility notes. Covers Principled BSDF input changes, parametric geometry texturing, and object-space coordinate pitfalls.
Ships in blender-vfx. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Version: 2.1.3 Last Updated: 2026-10-30 Dependencies: Blender 5.1+
import bpy
# Render engine (5.1+)
bpy.context.scene.render.engine = 'BLENDER_EEVEE' # Not 'BLENDER_EEVEE'
# Principled BSDF input names changed in 4.5.0 - use names not indices
bsdf.inputs['Transmission Weight'].default_value = 1.0 # was 'Transmission'
bsdf.inputs['Subsurface Weight'].default_value = 0.2 # was 'Subsurface'
bsdf.inputs['Emission Color'].default_value = (1,1,1,1) # was 'Emission'
bsdf.inputs['Base Color'].default_value = (0.8, 0.2, 0.2, 1.0)
import bpy
mat = bpy.data.materials.new("PBR_Material")
mat.use_nodes = True
nodes = mat.node_tree.nodes
links = mat.node_tree.links
nodes.clear()
bsdf = nodes.new('ShaderNodeBsdfPrincipled')
bsdf.inputs['Base Color'].default_value = (0.8, 0.2, 0.2, 1.0)
bsdf.inputs['Roughness'].default_value = 0.5
bsdf.inputs['Metallic'].default_value = 0.0
output = nodes.new('ShaderNodeOutputMaterial')
links.new(bsdf.outputs['BSDF'], output.inputs['Surface'])
# Assign to active object
obj = bpy.context.active_object
if obj and obj.type == 'MESH':
obj.data.materials.append(mat)
print(f"Material '{mat.name}' assigned to '{obj.name}'")
Use When: Natural materials (stone, wood, rust) without image textures
import bpy
mat = bpy.data.materials.new("Procedural_Stone")
mat.use_nodes = True
nodes = mat.node_tree.nodes
links = mat.node_tree.links
nodes.clear()
texcoord = nodes.new('ShaderNodeTexCoord')
noise = nodes.new('ShaderNodeTexNoise')
noise.inputs['Scale'].default_value = 5.0
noise.inputs['Detail'].default_value = 8.0
noise.inputs['Roughness'].default_value = 0.6
ramp = nodes.new('ShaderNodeValToRGB')
ramp.color_ramp.elements[0].color = (0.2, 0.2, 0.2, 1.0) # dark stone
ramp.color_ramp.elements[1].color = (0.7, 0.7, 0.7, 1.0) # light stone
bsdf = nodes.new('ShaderNodeBsdfPrincipled')
bsdf.inputs['Roughness'].default_value = 0.85
output = nodes.new('ShaderNodeOutputMaterial')
links.new(texcoord.outputs['Object'], noise.inputs['Vector'])
links.new(noise.outputs['Fac'], ramp.inputs['Fac'])
links.new(ramp.outputs['Color'], bsdf.inputs['Base Color'])
links.new(bsdf.outputs['BSDF'], output.inputs['Surface'])
print("Procedural stone material created")
import bpy
mat = bpy.data.materials.new("Glass")
mat.use_nodes = True
mat.blend_method = 'BLEND'
nodes = mat.node_tree.nodes
links = mat.node_tree.links
nodes.clear()
bsdf = nodes.new('ShaderNodeBsdfPrincipled')
bsdf.inputs['Transmission Weight'].default_value = 1.0 # 4.5+ name
bsdf.inputs['IOR'].default_value = 1.45
bsdf.inputs['Roughness'].default_value = 0.0
output = nodes.new('ShaderNodeOutputMaterial')
links.new(bsdf.outputs['BSDF'], output.inputs['Surface'])
# EEVEE_NEXT: enable ray tracing for refractions
bpy.context.scene.eevee.use_raytracing = True
print("Glass material created")
Use When: Combining materials (metal + rust, clean + dirty, worn + fresh)
import bpy
mat = bpy.data.materials.new("Layered_Metal")
mat.use_nodes = True
nodes = mat.node_tree.nodes
links = mat.node_tree.links
nodes.clear()
# Clean metal
bsdf_metal = nodes.new('ShaderNodeBsdfPrincipled')
bsdf_metal.inputs['Metallic'].default_value = 1.0
bsdf_metal.inputs['Roughness'].default_value = 0.2
bsdf_metal.inputs['Base Color'].default_value = (0.7, 0.7, 0.7, 1.0)
# Rust / weathering layer
bsdf_rust = nodes.new('ShaderNodeBsdfPrincipled')
bsdf_rust.inputs['Base Color'].default_value = (0.5, 0.2, 0.1, 1.0)
bsdf_rust.inputs['Roughness'].default_value = 0.9
# Noise-based mask
noise = nodes.new('ShaderNodeTexNoise')
noise.inputs['Scale'].default_value = 10.0
mix = nodes.new('ShaderNodeMixShader')
output = nodes.new('ShaderNodeOutputMaterial')
links.new(noise.outputs['Fac'], mix.inputs['Fac'])
links.new(bsdf_metal.outputs['BSDF'], mix.inputs[1])
links.new(bsdf_rust.outputs['BSDF'], mix.inputs[2])
links.new(mix.outputs['Shader'], output.inputs['Surface'])
print("Layered metal/rust material created")
import bpy
# Create a reusable weathering node group
group = bpy.data.node_groups.new("Weathering", 'ShaderNodeTree')
group_in = group.nodes.new('NodeGroupInput')
group_out = group.nodes.new('NodeGroupOutput')
# Interface (5.1+ uses interface API)
iface = group.interface
iface.new_socket("Scale", in_out='INPUT', socket_type='NodeSocketFloat')
iface.new_socket("Mask", in_out='OUTPUT', socket_type='NodeSocketColor')
noise = group.nodes.new('ShaderNodeTexNoise')
group.links.new(group_in.outputs['Scale'], noise.inputs['Scale'])
group.links.new(noise.outputs['Color'], group_out.inputs['Mask'])
# Use the group in a material
mat = bpy.data.materials.new("Weathered")
mat.use_nodes = True
nodes = mat.node_tree.nodes
node_group = nodes.new('ShaderNodeGroup')
node_group.node_tree = group
node_group.inputs['Scale'].default_value = 5.0
print(f"Node group '{group.name}' created and referenced")
import bpy
engine = bpy.context.scene.render.engine
if engine == 'BLENDER_EEVEE':
# EEVEE: performance-conscious, keep it simple
mat.refraction_depth = 0.1
# Real-time: avoid expensive SSS and volumetrics unless needed
else: # CYCLES
# Full ray tracing - enable SSS, caustics, etc.
bsdf.inputs['Subsurface Weight'].default_value = 0.1
bsdf.inputs['Subsurface Radius'].default_value = (0.1, 0.05, 0.03)
import bpy
# Set viewport to Material Preview or Rendered shading
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
for space in area.spaces:
if space.type == 'VIEW_3D':
space.shading.type = 'MATERIAL' # NOT 'MATERIAL_PREVIEW' (4.5+)
# 'NodeSocketShader' has no default_value - it only accepts links
# [FAIL] bsdf.outputs['BSDF'].default_value = ...
# [OK] Just connect it:
links.new(bsdf.outputs['BSDF'], output.inputs['Surface'])
mesh.materials.clear() resets every face's material_index to 0. A mesh built
from bmesh parts (faces given index 0 and 1) and then cleared and re-appended
rendered with one material; the build's print listed both slot names, so it
looked right. Append the slots ONCE (before or after bm.to_mesh), never call
clear() on a mesh whose faces carry indices, and verify by COUNTING FACES PER
SLOT in the saved file - a list of slot names proves the slots exist, not that
faces use them. When a cause goes into a code comment, probe it first: the
plausible one here ("to_mesh clamps indices on a mesh with no slots") was wrong.
import bpy
nodes = mat.node_tree.nodes
links = mat.node_tree.links
# Verify output node exists
output = next((n for n in nodes if n.type == 'OUTPUT_MATERIAL'), None)
if not output:
output = nodes.new('ShaderNodeOutputMaterial')
# Ensure BSDF is connected to surface
if not output.inputs['Surface'].is_linked:
bsdf = next((n for n in nodes if n.type == 'BSDF_PRINCIPLED'), None)
if bsdf:
links.new(bsdf.outputs['BSDF'], output.inputs['Surface'])
print("Fixed: reconnected BSDF to output")
BLENDER_EEVEE or CYCLES)MATERIAL (not MATERIAL_PREVIEW)materials.clear() after indices are set)v2.1.3 (2026-10-30) - Obs 244: materials.clear() resets material_index; troubleshooting entry and checklist line.
v2.1.1 (2026-10-09) - Observation 98: applying, joining, realising or baking transforms silently changes materials that read Object-space coordinates (also Generated and Geometry Position); caveat added to the procedural-texturing section with the attribute rewire and a same-rig render diff as the read-back, plus one validation checklist line.
v2.1.0 (2026-09-10) - Loop-gauntlet lessons: procedural textures need Object coordinates (not Generated) on parametric geometry, Brick texture is planar-XY (use a Z-based course mask for walls), and image plates sharing a shader with an accepted plate must be histogram-matched, with photo-derived plates reserved for bands far from the nearest camera.
v2.0.0 (2026-06-10) - MCP migration
import requests / requests.post() wrappersimport bpy to all code blocksv1.0.0 (2025-10-24) - Initial release
Status: Production Ready Maintainer: VFX Pipeline Team Dependencies: Blender 5.1+, Python 3.11+
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sideshowroberto/vfx-agent-toolkit --plugin blender-vfx11 skills in this plugin
/blender-addon-developmentVerified Blender 4.2+/5.1 add-on and extension traps - bl_info-only zips fail extension validate without blender_manifest.toml, assignment-style bpy.props register silently and do not exist, BLENDER_EEVEE_NEXT raises TypeError. Use when writing or packaging a Blender add-on, extension, operator or panel./blender-animationKeyframe animation, rigging, constraints, and armatures in Blender. Use for animation, rigging, camera movement, or when user mentions "animate," "keyframe," "rig," or "armature."/blender-api-compatibilityDiagnoses and migrates Blender Python API breakage across versions 4.2 to 5.1+ (EEVEE_NEXT, renamed modifier types and BSDF inputs, VSE strips). Use when a bpy script errors on a newer Blender, or for breaking changes and migration./blender-compositingCompositor nodes, post-processing, and color grading in Blender. Use for compositing workflows, render pass integration, post-processing, color correction, or when user mentions "compositor," "post-process," "color grade," or "render passes."/blender-controlnet-passesRenders ControlNet conditioning passes from a Blender scene for AI image and video generation - grey clay, normalized depth, cryptomatte EXR, optional wireframe. Use when preparing depth, edge or clay inputs for video models, or crypto mattes for comp./blender-geometry-nodesProcedural modeling using Geometry Nodes in Blender. Use for scattering systems, node trees, parametric design, or when user mentions "procedural," "geometry nodes," "scattering," or "instances."Other plugins' skills for the same job