mcpField
P
polyhaven-material-swap

polyhaven-material-swap

github.com/kevinbadiCreative & media210141 installsUpdated 30w ago
Repository

About polyhaven-material-swap

polyhaven-material-swap is a command-line skill that applies PolyHaven PBR textures to a Blender object and renders each material variant. It supports named texture sets, selected texture IDs, and configurable render settings.

Key features

  1. 01Apply multiple PolyHaven textures
  2. 02Render material variants
  3. 03Texture presets for four categories
  4. 04Choose texture resolution
  5. 05Configure render dimensions and samples

Use cases

  1. 01Comparing finishes on a product model
  2. 02Rendering metal, wood, stone, or fabric options

MCP support

It uses Blender MCP, with a configurable port, to interact with Blender while applying textures and rendering images.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/kevinbadi/blender-skills --skill polyhaven-material-swap

After installing, type/polyhaven-material-swapin Claude Code to confirm it loaded.

Bundled filesscripts/polyhaven-material-swap.js

Details

From the project README

PolyHaven Material Swap

Applies multiple PolyHaven PBR textures to the same object one by one and renders each — perfect for showing product finish variants (matte black, glossy white, brushed metal, marble, etc.).

How to Run

node polyhaven-material-swap/scripts/polyhaven-material-swap.js --object Mesh_0 --textures "marble_01,brushed_metal,carbon_fiber" --output ~/Desktop/variants
node polyhaven-material-swap/scripts/polyhaven-material-swap.js --object Mesh_0 --preset metals --output ~/Desktop/metals
Options
OptionDescriptionDefault
--objectBlender object namerequired
--texturesComma-separated PolyHaven texture IDsrequired (or use --preset)
--outputOutput directory for rendered imagesrequired
--presetTexture set: metals, woods, stones, fabricsnone
--resolutionTexture resolution: 1k, 2k2k
--render-widthRender image width1920
--render-heightRender image height1080
--samplesRender samples64
--portBlender MCP port9876

Presets

  • metals — brushed_metal, rusty_metal, painted_metal_02, corrugated_iron
  • woods — wood_cabinet_worn_long, plywood, bark_brown_02, wood_floor
  • stones — marble_01, concrete_wall_003, rock_face, gravel_floor_02
  • fabrics — fabric_pattern_07, leather_red_02, denim_fabric, burlap_01

Comments

Markdown supported