AgentSkillsCN

validate-blender

验证 Blender AKM(Asciicker 网格)导出文件,检查网格格式,并确认其与 Asciicker 引擎的兼容性。当从 Blender 导出、检查网格文件,或排查网格加载问题时,可使用此功能。

SKILL.md
--- frontmatter
name: validate-blender
description: Validate Blender AKM (Asciicker Mesh) export files, check mesh format, and verify compatibility with the Asciicker engine. Use when exporting from Blender, checking mesh files, or troubleshooting mesh loading.
allowed-tools: Bash, Read, Grep

Validate Blender Skill

Validates Blender AKM (Asciicker Mesh) export files for compatibility with the Asciicker engine.

Quick Start

Validate an AKM file:

Use the MCP server tool:

code
Validate the Blender export: meshes/player.akm

This calls the validate_blender_export tool from the asciicker-dev MCP server.

AKM File Format

AKM (Asciicker Mesh) files are custom binary mesh formats containing:

  • Vertex positions
  • Normals
  • UV coordinates
  • Bone weights (for skeletal animation)
  • Material indices

Common Validation Checks

The validator checks:

  1. File exists - AKM file is readable
  2. Header format - Correct magic number and version
  3. Vertex count - Non-zero vertices
  4. Normal vectors - Valid and normalized
  5. UV coordinates - In range [0, 1]
  6. Bone weights - Sum to 1.0 for skinned meshes
  7. Face indices - Valid triangle indices

Blender Export Workflow

  1. Create/edit mesh in Blender
  2. Export to AKM format:
    • Use Blender export script (if available)
    • Or use custom Python exporter
  3. Validate export:
    code
    Validate meshes/my_mesh.akm
    
  4. Place in meshes/ directory
  5. Test in editor:
    • Launch editor
    • Place mesh in scene
    • Verify appearance and animation

File Locations

Mesh directory:

code
meshes/
├── player.akm
├── enemy.akm
├── items/
│   ├── sword.akm
│   └── shield.akm
└── terrain/
    └── rock.akm

Blender Export Script

If you need to create an export script, see the MCP server for template generation:

code
Generate a feature template for Blender AKM export

Common Issues

File not found:

  • Verify file path relative to project root
  • Check file permissions

Invalid header:

  • Re-export from Blender
  • Verify export script version matches engine version

Vertex count zero:

  • Mesh may be empty
  • Check Blender export settings

Invalid normals:

  • Recalculate normals in Blender: Mesh > Normals > Recalculate Outside
  • Ensure mesh is not non-manifold

Bone weight issues:

  • Check armature modifiers in Blender
  • Verify vertex groups are assigned
  • Ensure automatic weights or manual painting is correct

Testing in Editor

After validation:

  1. Launch editor: ./.run/asciiid
  2. Load mesh:
    • Editor should auto-discover meshes in meshes/ directory
    • Select mesh from UI
  3. Place in scene:
    • Click to place mesh instance
    • Verify rendering
  4. Test animation (if skeletal):
    • Play animation
    • Verify bone deformation

MCP Server Integration

The validate-blender skill uses the asciicker-dev MCP server, which provides:

  • validate_blender_export(akm_file) - Validate AKM file format
  • analyze_asciiid_structure() - Show mesh loading code
  • generate_feature_template("blender_export") - Export script template

Related Files

  • asciicker_mcp_server.py - MCP server with validation tool
  • .vscode/mcp.json - MCP server configuration
  • meshes/ - Mesh directory
  • asciiid.cpp - Mesh loading code

Instructions

When the user asks to validate a Blender export:

  1. Identify the AKM file path
  2. Use the MCP server validate_blender_export tool
  3. Report validation results
  4. If errors found, suggest fixes based on error type
  5. Optionally guide through re-export process
  6. Test in editor if validation passes

Blender Resources

Mesh requirements:

  • Triangulated faces (or auto-triangulate on export)
  • Clean geometry (no non-manifold edges)
  • Recalculated normals
  • UV unwrapped (if textured)
  • Proper armature setup (if animated)

Export checklist:

  • Apply modifiers (or export with modifiers applied)
  • Export selected vs all objects
  • Coordinate system: Z-up (or transform on import)
  • Scale: Match engine units