pluginagentmarketplace

asset-optimization

6
0
# Install this skill:
npx skills add pluginagentmarketplace/custom-plugin-game-developer --skill "asset-optimization"

Install specific skill from multi-skill repository

# Description

|

# SKILL.md


name: asset-optimization
version: "2.0.0"
description: |
Asset pipeline optimization, compression, streaming, and resource management
for efficient game development and delivery.
sasmp_version: "1.3.0"
bonded_agent: 06-tools-pipeline
bond_type: PRIMARY_BOND

parameters:
- name: asset_type
type: string
required: false
validation:
enum: [textures, meshes, audio, animations, all]
- name: platform
type: string
required: false
validation:
enum: [pc, console, mobile, web]

retry_policy:
enabled: true
max_attempts: 3
backoff: exponential

observability:
log_events: [start, complete, error, import]
metrics: [asset_size_mb, compression_ratio, import_time]


Asset Optimization

Asset Pipeline Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    ASSET PIPELINE FLOW                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  SOURCE ASSETS (Large, Editable):                            β”‚
β”‚  .psd, .fbx, .blend, .wav, .tga                             β”‚
β”‚                              ↓                               β”‚
β”‚  IMPORT SETTINGS:                                            β”‚
β”‚  Compression, Format, Quality, Platform overrides           β”‚
β”‚                              ↓                               β”‚
β”‚  PROCESSING:                                                 β”‚
β”‚  Compression, Mipmaps, LOD generation, Format conversion    β”‚
β”‚                              ↓                               β”‚
β”‚  RUNTIME ASSETS (Optimized):                                 β”‚
β”‚  .dds, .ktx, .ogg, engine-specific formats                  β”‚
β”‚                              ↓                               β”‚
β”‚  PACKAGING:                                                  β”‚
β”‚  Asset bundles, streaming chunks, platform builds           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Texture Optimization

TEXTURE COMPRESSION FORMATS:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  PLATFORM   β”‚ FORMAT      β”‚ QUALITY  β”‚ SIZE/PIXEL         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  PC/Console β”‚ BC7         β”‚ Best     β”‚ 1 byte             β”‚
β”‚  PC/Console β”‚ BC1 (DXT1)  β”‚ Good     β”‚ 0.5 byte           β”‚
β”‚  iOS        β”‚ ASTC 6x6    β”‚ Great    β”‚ 0.89 byte          β”‚
β”‚  Android    β”‚ ETC2        β”‚ Good     β”‚ 0.5-1 byte         β”‚
β”‚  Mobile     β”‚ ASTC 8x8    β”‚ Good     β”‚ 0.5 byte           β”‚
β”‚  Uncompressedβ”‚ RGBA32     β”‚ Perfect  β”‚ 4 bytes            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

TEXTURE SIZE GUIDELINES:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Character (main):    2048x2048                             β”‚
β”‚  Character (NPC):     1024x1024                             β”‚
β”‚  Props (large):       1024x1024                             β”‚
β”‚  Props (small):       512x512 or 256x256                    β”‚
β”‚  UI elements:         Power of 2, vary by size             β”‚
β”‚  Environment:         2048x2048 (tiling)                   β”‚
β”‚  Mobile maximum:      1024x1024 (prefer 512)               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Mesh Optimization

POLYGON BUDGET GUIDELINES:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  PLATFORM   β”‚ HERO CHAR β”‚ NPC      β”‚ PROP     β”‚ SCENE     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  PC High    β”‚ 100K      β”‚ 30K      β”‚ 10K      β”‚ 10M       β”‚
β”‚  PC Med     β”‚ 50K       β”‚ 15K      β”‚ 5K       β”‚ 5M        β”‚
β”‚  Console    β”‚ 80K       β”‚ 25K      β”‚ 8K       β”‚ 8M        β”‚
β”‚  Mobile     β”‚ 10K       β”‚ 3K       β”‚ 500      β”‚ 500K      β”‚
β”‚  VR         β”‚ 30K       β”‚ 10K      β”‚ 2K       β”‚ 2M        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

LOD CONFIGURATION:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  LOD0: 100% triangles  β”‚  0-10m   β”‚ Full detail           β”‚
β”‚  LOD1: 50% triangles   β”‚  10-30m  β”‚ Reduced               β”‚
β”‚  LOD2: 25% triangles   β”‚  30-60m  β”‚ Low detail            β”‚
β”‚  LOD3: 10% triangles   β”‚  60m+    β”‚ Billboard/Impostor    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Audio Optimization

AUDIO COMPRESSION:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  TYPE        β”‚ FORMAT  β”‚ QUALITY   β”‚ STREAMING            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Music       β”‚ Vorbis  β”‚ 128-192   β”‚ Always stream        β”‚
β”‚  SFX (short) β”‚ ADPCM   β”‚ High      β”‚ Decompress on load   β”‚
β”‚  SFX (long)  β”‚ Vorbis  β”‚ 128       β”‚ Stream if > 1MB      β”‚
β”‚  Voice       β”‚ Vorbis  β”‚ 96-128    β”‚ Stream               β”‚
β”‚  Ambient     β”‚ Vorbis  β”‚ 96        β”‚ Stream               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

AUDIO MEMORY BUDGET:
β€’ Mobile: 20-50 MB
β€’ Console: 100-200 MB
β€’ PC: 200-500 MB

Batch Processing Script

# βœ… Production-Ready: Asset Batch Processor
import subprocess
from pathlib import Path
from concurrent.futures import ThreadPoolExecutor

def process_textures(input_dir: Path, output_dir: Path, platform: str):
    """Batch process textures for target platform."""

    settings = {
        'pc': {'format': 'bc7', 'max_size': 4096},
        'mobile': {'format': 'astc', 'max_size': 1024},
        'console': {'format': 'bc7', 'max_size': 2048},
    }

    config = settings.get(platform, settings['pc'])

    textures = list(input_dir.glob('**/*.png')) + list(input_dir.glob('**/*.tga'))

    def process_single(texture: Path):
        output_path = output_dir / texture.relative_to(input_dir)
        output_path = output_path.with_suffix('.dds')
        output_path.parent.mkdir(parents=True, exist_ok=True)

        subprocess.run([
            'texconv',
            '-f', config['format'],
            '-w', str(config['max_size']),
            '-h', str(config['max_size']),
            '-m', '0',  # Generate all mipmaps
            '-o', str(output_path.parent),
            str(texture)
        ])

    with ThreadPoolExecutor(max_workers=8) as executor:
        executor.map(process_single, textures)

πŸ”§ Troubleshooting

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PROBLEM: Build size too large                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SOLUTIONS:                                                   β”‚
β”‚ β†’ Audit unused assets                                       β”‚
β”‚ β†’ Increase texture compression                              β”‚
β”‚ β†’ Enable mesh compression                                   β”‚
β”‚ β†’ Split into downloadable content                           β”‚
β”‚ β†’ Use texture atlases                                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PROBLEM: Long import times                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SOLUTIONS:                                                   β”‚
β”‚ β†’ Use asset database caching                                β”‚
β”‚ β†’ Import in batches                                         β”‚
β”‚ β†’ Use faster SSD storage                                    β”‚
β”‚ β†’ Pre-process assets in CI/CD                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PROBLEM: Assets look blurry                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SOLUTIONS:                                                   β”‚
β”‚ β†’ Reduce compression for important assets                   β”‚
β”‚ β†’ Increase texture resolution                               β”‚
β”‚ β†’ Check mipmap settings                                     β”‚
β”‚ β†’ Use appropriate filtering mode                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Memory Budgets

Platform Textures Meshes Audio Total
Mobile Low 100 MB 50 MB 30 MB 200 MB
Mobile High 500 MB 200 MB 100 MB 1 GB
Console 2 GB 1 GB 200 MB 4 GB
PC 4 GB 2 GB 500 MB 8 GB

Use this skill: When optimizing assets, managing memory, or streamlining pipelines.

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.