## Summary - Added LOD (Level of Detail) system for automatic geometry complexity reduction - Created texture audit and compression recommendation system - Integrated stats.js performance monitoring overlay - Added hardware tier detection and optimization - Created documentation for minimum hardware requirements ## Components 1. nexus/lod-manager.js - LOD system with distance-based detail switching 2. nexus/texture-auditor.js - Texture analysis and compression planning 3. nexus/performance-monitor.js - stats.js integration with custom panels 4. nexus/performance-integration.js - Unified performance system 5. tools/texture-audit-cli.js - Standalone texture audit CLI 6. docs/performance-hardware-requirements.md - Hardware requirements documentation ## Features - LOD levels for agent orbs and halos (3 detail levels) - Automatic LOD switching based on camera distance - Texture audit with VRAM usage analysis - Performance monitoring with FPS, draw calls, triangles - Hardware tier detection (High/Medium/Low) - Compression recommendations for textures ## Testing - LOD system creates proper geometry complexity levels - Texture audit identifies performance issues - Performance monitor displays real-time stats - Hardware tier detection works on Apple Silicon ## Acceptance Criteria ✓ LOD for complex agent models ✓ Texture audit and compression recommendations ✓ Performance monitoring with stats.js ✓ Hardware requirements documentation Issue: #873
5.1 KiB
5.1 KiB
NEXUS Performance & Hardware Requirements
Overview
This document outlines the minimum and recommended hardware requirements for running The Nexus 3D world, based on the LOD (Level of Detail) system, texture auditing, and performance monitoring.
Performance System
The Nexus now includes:
- LOD System - Automatically reduces geometry complexity based on distance from camera
- Texture Auditor - Analyzes textures for performance issues and provides compression recommendations
- Performance Monitor - Real-time stats.js overlay showing FPS, draw calls, triangles, textures, and geometries
Hardware Tiers
Tier 1: High Performance
- Hardware: Apple M1 Pro/Max/Ultra, M2 Pro/Max, M3/M4 series
- RAM: 16GB+
- Target FPS: 60
- Max Draw Calls: 2,000
- Max Triangles: 1,000,000
- Max Textures: 100
- LOD Thresholds: High detail within 20 units, medium within 40, low within 60, cull beyond 100
Tier 2: Medium Performance (Default)
- Hardware: Apple M1, M2, M3 base models
- RAM: 8GB+
- Target FPS: 45
- Max Draw Calls: 1,000
- Max Triangles: 500,000
- Max Textures: 50
- LOD Thresholds: High detail within 15 units, medium within 30, low within 50, cull beyond 80
Tier 3: Low Performance (Minimum)
- Hardware: Intel Macs (2018+), older hardware
- RAM: 8GB+
- Target FPS: 30
- Max Draw Calls: 500
- Max Triangles: 200,000
- Max Textures: 25
- LOD Thresholds: High detail within 10 units, medium within 20, low within 40, cull beyond 60
Current Scene Analysis
Based on the current Nexus scene:
- Total Mesh Objects: 32
- Geometry Types: 9 unique (SphereGeometry, BoxGeometry, CylinderGeometry, etc.)
- Material Types: 5 unique (MeshBasicMaterial, MeshStandardMaterial, MeshPhysicalMaterial, etc.)
- Texture Files: 2 (icons only, all other textures are procedural)
- LOD-Managed Objects: 8 (4 agent orbs + 4 agent halos)
Performance Optimization
LOD System
The LOD system automatically manages detail levels for:
- Agent orbs (spheres): 32x32 → 16x16 → 8x8 segments
- Agent halos (torus): 16x64 → 12x32 → 8x16 segments
- Future: Pillars, portals, and other complex geometry
Texture Optimization
Current texture audit shows:
- Total VRAM: ~0.1MB (minimal texture usage)
- Issues: No significant issues found
- Recommendations: Continue using procedural textures where possible
Performance Monitoring
Press ~ or F3 to toggle the stats.js overlay showing:
- FPS (frames per second)
- Frame time (ms)
- Draw calls per frame
- Triangle count
- Texture count
- Geometry count
Running the Texture Audit
# Audit all textures in the project
node tools/texture-audit-cli.js .
# Save results to JSON
node tools/texture-audit-cli.js . audit-results.json
Performance Recommendations
For All Hardware:
- Enable LOD system - Automatically reduces detail for distant objects
- Monitor with stats.js - Use the overlay to identify bottlenecks
- Use procedural textures - Canvas-generated textures are more efficient than loaded files
For Lower-End Hardware:
- Reduce post-processing - Bloom and SMAAPass are disabled on "low" tier
- Limit particle systems - Ash storm disabled on "low" tier
- Reduce ambient structures - Disabled on "low" tier
For Developers:
- Register new geometry for LOD - Use
performanceSystem.registerForLOD() - Audit new textures - Run the texture audit before adding new assets
- Monitor performance - Check stats.js during development
Minimum Sovereign Hardware
Based on current analysis, the minimum hardware for a sovereign Nexus instance:
Absolute Minimum:
- CPU: Any modern processor (Intel i5/AMD Ryzen 5 or Apple M1)
- RAM: 8GB
- GPU: Integrated graphics (Intel Iris, AMD Radeon, Apple GPU)
- Storage: 1GB free space
- Browser: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
Recommended for 60 FPS:
- CPU: Apple M1 or better
- RAM: 16GB
- GPU: Apple M1 GPU or dedicated graphics
- Storage: 2GB free space
- Browser: Latest Chrome or Safari
Future Optimizations
- Texture Atlasing - Combine multiple textures into single atlases
- Instanced Rendering - For repeated geometry (pillars, portals)
- Occlusion Culling - Don't render objects behind other objects
- WebGL 2.0 Features - Use compute shaders and transform feedback
- WebGPU Migration - Future-proof for next-generation graphics
Troubleshooting
Low FPS
- Check stats.js overlay for bottlenecks
- Verify LOD system is active
- Reduce browser zoom level
- Close other browser tabs
- Update graphics drivers
High Memory Usage
- Run texture audit to identify large textures
- Reduce texture sizes or use compression
- Limit particle counts
- Check for memory leaks in browser console
Visual Artifacts
- Ensure textures are power-of-two dimensions
- Check material settings for transparency issues
- Verify LOD transitions are smooth
- Test on different browsers
Generated by NEXUS Performance System v1.0 Last updated: $(date)