Vfx graph shuriken

From nlelouche/Unity-SkillForge · View interactive version

Vfx graph shuriken is an AI agent skill from the GitHub repository nlelouche/Unity-SkillForge. Unity VFX Graph and Particle System specialist for creating stunning visual effects.

How to use this skill

Skill file

VFX Graph & Shuriken

Overview

Create stunning visual effects using Unity's VFX Graph (GPU) and Shuriken Particle System (CPU). From explosions to ambient particles.

When to Use

System Comparison

| Feature | Shuriken (CPU) | VFX Graph (GPU) |

|---------|:--------------:|:---------------:|

| Particle Count | Thousands | Millions |

| Physics Collisions | ✅ | Limited |

| Complex Behaviors | ✅ | ✅ |

| Performance | Medium | High |

| Ease of Use | Easy | Advanced |

| Min Unity Version | Any | 2019+ |

Architecture

┌─────────────────────────────────────────────────────────────┐
│                   SHURIKEN SYSTEM                           │
├─────────────────────────────────────────────────────────────┤
│  Main Module → Emission → Shape → Velocity → Color → Size  │
│       ↓                                                     │
│  [Renderer] → Material → Sorting → Trails                  │
└─────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────┐
│                    VFX GRAPH                                │
├─────────────────────────────────────────────────────────────┤
│  Spawn Context → Initialize → Update → Output               │
│       ↓              ↓           ↓          ↓               │
│  [Rate/Burst]   [Position]   [Forces]   [Render]           │
└─────────────────────────────────────────────────────────────┘

Common Effects Library

| Effect | Key Settings |

|--------|--------------|

| Fire | Cone shape, Orange→Black color, Noise velocity |

| Smoke | Sphere shape, Gray, Size over lifetime ↑, Slow |

| Explosion | Burst emission, Sphere shape, Drag, Sub-emitters |

| Magic Sparkle | Point shape, HDR colors, Trails, Noise |

| Blood Splat | Cone burst, Gravity, Collision, Decal on hit |

| Rain | Box shape, Gravity, Stretch, Collision |

Best Practices

Few-Shot Examples

Example 1: Explosion

User: "Create an explosion effect."

Agent:

Particle System settings:
- Duration: 0.5s, Looping: false
- Start Lifetime: 0.3-0.5
- Start Speed: 10-20
- Emission: Burst of 50
- Shape: Sphere, Radius 0.5
- Color over Lifetime: Orange → Red → Black
- Size over Lifetime: Large → Small
- Add Sub-emitter for debris

Example 2: Magic Trail

User: "Add sparkle trail to projectile."

Agent:

- Shape: Edge (length 0)
- Emission: Rate over Distance 10
- Trails: Enable, Lifetime 0.5
- Color: HDR cyan glow
- Size: 0.1 → 0
- Renderer: Additive material

Example 3: Ambient Dust

User: "Floating dust particles in scene."

Agent:

- Shape: Box (room size)
- Start Speed: 0.1
- Emission Rate: 20
- Noise: Enable, Strength 0.5
- Color: White, Alpha 0.3
- Size: 0.02-0.05
- Gravity: 0

Performance Tips


TDD Contract

⚠️ Legacy Skill — Refactor Pending

Este skill NO tiene tests automatizados aún. El siguiente boilerplate es un punto de partida.

// Escribe estos tests ANTES de implementar:

// Test 1: should [expected behavior] when [condition]
[Test]
public void VfxGraphShuriken_Should{ExpectedBehavior}_When{Condition}()
{{
    // Arrange
    // TODO: Setup test fixtures
    
    // Act
    // TODO: Execute system under test
    
    // Assert
    Assert.Fail("Not implemented — write test first");
}}

// Test 2: should handle [edge case]
[Test]
public void VfxGraphShuriken_ShouldHandle{EdgeCase}()
{{
    // Arrange
    // TODO: Setup edge case scenario
    
    // Act
    // TODO: Execute
    
    // Assert
    Assert.Fail("Not implemented");
}}

// Test 3: should throw when [invalid input]
[Test]
public void VfxGraphShuriken_ShouldThrow_When{InvalidInput}()
{{
    // Arrange
    var invalidInput = default;
    
    // Act & Assert
    Assert.Throws<Exception>(() => {{ /* execute */ }});
}}

Pasos para completar el TDD:

  1. Descomenta los tests above
  2. Implementa la funcionalidad mínima para que compile
  3. Ejecuta los tests — deben fallar (RED)
  4. Implementa la funcionalidad real
  5. Verifica que los tests pasen (GREEN)
  6. Refactorea manteniendo los tests verdes

Nota: Este skill fue marcado como tdd_first: false durante la auditoría v2.0.1. La sección TDD fue agregada automáticamente pero requiere customización manual para reflejar el comportamiento real del skill.

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.