asset-optimization
Asset pipeline optimization, compression, streaming, and resource management for efficient game development and delivery.
What this skill does
# 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
```python
# ✅ 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.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.