Community코딩 & 개발github.com

blender-model-enhancer

Improve a 3D model's quality and detail in Blender: audit, fix mesh errors, smooth shading, add bevels, subdivision and surface micro-detail, upgrade materials, and show before/after renders.

blender-model-enhancer란 무엇인가요?

blender-model-enhancer is a Claude Code agent skill that improve a 3D model's quality and detail in Blender: audit, fix mesh errors, smooth shading, add bevels, subdivision and surface micro-detail, upgrade materials, and show before/after renders.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/varad2343/claude-skills/tree/HEAD/plugins/blender-model-enhancer/skills/blender-model-enhancer

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Blender Model Enhancer

Use when the user wants a model to look better: "enhance", "improve quality", "add detail", "make it realistic", "fix this AI/Meshy mesh", "it looks low-poly/blobby/faceted". All work goes through the Blender connector's execute-code tool (e.g. execute_blender_code). Run one step per call and check each step with a viewport screenshot.

Ground rules

  • Non-destructive first. Before changing anything, duplicate the target into a hidden collection _Original_Backup so the user can always go back. Prefer modifiers over applied edits, and apply them only when the user wants a final mesh or an export.
  • Duplicate shared materials (mat.copy()) before editing them.
  • Watch the poly budget. Ask what the model is for if it isn't clear: render/still (high detail is fine), animation/game (stay under ~50k tris), web/AR (under ~100k tris total, textures 2k max), 3D print (watertight, applied, no shader-only detail).
  • If a step fails, fix and retry at most twice, then report and move on.

Step 1 — Audit (always)

import bpy, bmesh
from mathutils import Vector
for o in [o for o in bpy.context.scene.objects if o.type == 'MESH']:
    bm = bmesh.new(); bm.from_mesh(o.data)
    tris = sum(len(f.verts) - 2 for f in bm.faces)
    non_manifold = sum(1 for e in bm.edges if not e.is_manifold)
    loose = sum(1 for v in bm.verts if not v.link_edges)
    ngons = sum(1 for f in bm.faces if len(f.verts) > 4)
    smooth = sum(f.smooth for f in bm.faces) / max(len(bm.faces), 1)
    print(o.name, dict(tris=tris, verts=len(bm.verts), non_manifold=non_manifold, loose=loose,
          ngons=ngons, smooth_ratio=round(smooth, 2), uv=len(o.data.uv_layers),
          mats=[m.name for m in o.data.materials if m], scale=tuple(round(s, 3) for s in o.scale),
          dims=tuple(round(d, 3) for d in o.dimensions), mods=[m.type for m in o.modifiers]))
    bm.free()
for img in bpy.data.images:
    print('img', img.name, img.size[:], img.colorspace_settings.name)

Also grab a front 3/4 viewport screenshot. Classify the model:

  • Hard-surface (products, props, buildings): sharp edges, flat faces
  • Organic (characters, statues, food, plants)
  • AI-generated / scanned (Meshy, photogrammetry): dense triangle soup, noisy normals, baked lighting in textures
  • Low-poly primitive build (made from cubes/cylinders, e.g. by code)

Show the user a 3–5 line diagnosis with the planned fixes, then go ahead. Only wait for an answer when the plan involves remeshing or applying modifiers, since those change the mesh for good.

Step 2 — Clean up the geometry

Run only the fixes the audit calls for:

import bpy, bmesh
o = bpy.data.objects[NAME]
bpy.context.view_layer.objects.active = o
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.transform_apply(location=False, rotation=True, scale=True)   # fixes bevel/modifier scaling
bm = bmesh.new(); bm.from_mesh(o.data)
bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=0.0001 * max(o.dimensions))
bmesh.ops.delete(bm, geom=[v for v in bm.verts if not v.link_edges], context='VERTS')
bmesh.ops.dissolve_degenerate(bm, edges=bm.edges, dist=1e-6)
bmesh.ops.recalc_face_normals(bm, faces=bm.faces)
bm.to_mesh(o.data); bm.free(); o.data.update()
  • If there are holes and the model is for print or remesh, run Edit Mode → select non-manifold → bpy.ops.mesh.fill_holes(sides=0).
  • Origin: bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='BOUNDS'). Put the base on z = 0 if it's a standing object.

Step 3 — Shading (biggest visible win, cheapest)

Faceted look → smooth shading with angle-based sharp edges:

bpy.ops.object.select_all(action='DESELECT'); o.select_set(True)
try:
    bpy.ops.object.shade_auto_smooth(angle=0.524)    # Blender 4.1+ (adds Smooth by Angle), 30°
except Exception:
    bpy.ops.object.shade_smooth(); o.data.use_auto_smooth = True; o.data.auto_smooth_angle = 0.524  # ≤4.0

For hard-surface, add a Weighted Normal modifier (keep_sharp=True, last in the stack) so flat faces shade cleanly.

Step 4 — Add geometric detail (by model type)

Hard-surface / primitive builds — real edges catch light:

b = o.modifiers.new('Bevel', 'BEVEL')
b.width = 0.004 * max(o.dimensions)   # ~0.4% of size; never so big it eats thin parts
b.segments = 3; b.limit_method = 'ANGLE'; b.angle_limit = 0.524
b.harden_normals = True; b.miter_outer = 'MITER_ARC'

Then, if surfaces should be curved, add Subdivision Surface (levels 1 viewport / 2 render) after the bevel so corners stay tight. Order: Bevel → Subdivision → Weighted Normal.

Organic / blobby low-poly — Subdivision Surface (viewport 1, render 2, Catmull-Clark). Mark creases on edges that must stay sharp (eyelids, lips, clothing hems): edge.crease via bmesh crease layer, or bpy.ops.transform.edge_crease(value=1) on selected edges.

AI-generated / scanned triangle soup — subdividing triangle soup makes it lumpy. Instead:

  1. Keep the original for its texture. Duplicate it to <name>_Remesh.
  2. Add a Remesh modifier (mode VOXEL, voxel size ≈ max(dims)/300 for a hero asset or /150 for a lighter one, smooth shading on), apply it, then add Decimate (COLLAPSE, ratio to hit the poly budget).
  3. Smooth noise: a Corrective Smooth or Smooth modifier, factor 0.5, 5–10 repeats. Check that fine features survive.
  4. Move the texture back across with a Data Transfer modifier (face-corner UVs from the original) or bake the original's diffuse onto a fresh smart_project UV with Cycles → Bake → Diffuse (colour only), selected-to-active, small cage extrusion.
  5. Ask before deleting anything. The backup stays hidden.

Need sculpt-level detail without heavy geometry — Multires modifier (subdivide 2–3 levels). Then add detail procedurally with a Displace modifier fed by a Noise/Voronoi texture at low strength (≈0.002–0.01 × size) on the higher levels, and bake to a normal map if it's going to a game or the web.

Step 5 — Surface micro-detail (shader, no polygons)

Add these to each Principled BSDF that needs them, scaled to the object (Texture Coordinate → Object, Mapping scale ≈ 10 / max(dims)):

  • Bump micro-noise: Noise Texture (scale 50–200, detail 8) → Bump (strength 0.05–0.15, distance tiny) → BSDF Normal. Chain it after any existing normal map (Normal Map output → Bump Normal input) so the original detail is kept.
  • Roughness variation: Noise → Color Ramp (narrow range, e.g. 0.35–0.55) → Roughness. Removes the CG "plastic" look.
  • Edge wear / highlights: Cycles: Geometry Pointiness or Bevel node → Color Ramp → mix a lighter/worn colour into Base Color at edges. EEVEE: use an Ambient Occlusion node (inverted) for the same effect.
  • Cavity dirt: an AO node → Color Ramp → Multiply into Base Color at 10–25%, for crevices.
  • Bevel shader (Cycles only): Bevel node (radius ≈ 0.002 × size) → BSDF Normal gives rounded-edge highlights at zero polygon cost when the modifier would be too heavy.

Material-type presets:

  • Metal: Metallic 1, Roughness 0.2–0.4 with variation, anisotropy 0.3 for brushed metal
  • Plastic: Metallic 0, Roughness 0.3–0.5, Coat 0.2
  • Stone/statue: Roughness 0.7–0.9, strong micro-bump, cavity dirt
  • Fabric: Sheen weight 0.5–1, Roughness 0.8+
  • Skin: Subsurface Weight 0.1–0.3, radius (1, 0.2, 0.1), Roughness 0.4–0.5
  • Gold: Base (1.0, 0.77, 0.34), Metallic 1, Roughness 0.15–0.25

Step 6 — Fix textures

  • Colour maps must be in sRGB. Roughness, metal, normal and height maps must be Non-Color. Wrong colour spaces are the most common "looks wrong" cause.
  • AI exports with lighting baked into the diffuse: lower contrast slightly with Hue/Saturation/Value or Bright/Contrast, and drop any noisy AI normal/roughness maps in favour of Step 5.
  • No UVs and you need textures: bpy.ops.uv.smart_project(angle_limit=1.15, island_margin=0.02) in Edit Mode.
  • Upscaling: if the user wants sharper textures, upscale the image files outside Blender (e.g. Real-ESRGAN or Pillow LANCZOS as a fallback), save them as <name>_2x.png, and relink. Never overwrite the originals.

Step 7 — Before / after

Render the same camera and lighting twice, once with only the backup visible and once with only the enhanced model, to ~/Desktop/Blender Enhance/<name>_before.png and _after.png (Cycles, 64 samples, denoise, 1600x1200). If the scene has no lighting, add a quick 3-point area rig and a neutral world at strength 0.5 for both. Put the two side by side in one comparison image and show it.

Also report a stats table: triangles before → after, modifiers added, materials changed, issues fixed.

Step 8 — Finalise (only when asked)

  • Keep editable (default): leave the modifiers live and save the .blend.
  • Export / game / web: apply the modifiers on a copy, Decimate to budget, bake the shader detail (normal + roughness + AO) to 2k textures, export a GLB.
  • 3D print: apply everything and make sure it's watertight (zero non-manifold edges, from re-running the audit). Shader detail won't print, so offer to convert the micro-bump to a real Displace modifier first.

Quick recipes

  • "It looks faceted" → Steps 3 + Weighted Normal
  • "It looks like plastic / CG" → Step 5 roughness variation + micro-bump + better lighting
  • "Meshy model looks lumpy/dotty" → Step 2, drop the noisy maps (Step 6), voxel remesh path (Step 4), Step 5
  • "Code-built model looks blocky" → Bevel + Subdivision (Step 4) + auto smooth + material presets
  • "Make the statue look real" → stone preset, cavity dirt, micro-bump, low warm key light

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

관련 스킬