Convert Figma logo to code with AI

Unity-Technologies logoVisualEffectGraph-Samples

Visual Effect Graph - Samples Project

1,853
387
1,853
13

Top Related Projects

3,292

Special Effects with Skinned Mesh in Unity

1,807

JTRP : Unity HDRP ToonShading Render Pipeline (Preview)

Additional tools for Visual Effect Artists

A first person multiplayer shooter example project in Unity

Quick Overview

The Unity-Technologies/VisualEffectGraph-Samples repository provides a collection of sample projects and assets that demonstrate the capabilities of the Visual Effect Graph (VFX Graph) feature in the Unity game engine. The VFX Graph is a powerful visual scripting system for creating complex particle effects and other visual phenomena.

Pros

  • Comprehensive Samples: The repository offers a wide range of sample projects, covering various use cases and showcasing the versatility of the VFX Graph.
  • Detailed Documentation: Each sample project includes detailed documentation, providing insights into the implementation and usage of the VFX Graph.
  • Active Development: The repository is actively maintained by the Unity Technologies team, ensuring that the samples stay up-to-date with the latest VFX Graph features and improvements.
  • Learning Resource: The samples serve as an excellent learning resource for developers who want to explore and master the VFX Graph in Unity.

Cons

  • Specific to Unity: The samples are tailored for the Unity game engine and may not be directly applicable to other game development platforms.
  • Complexity: Some of the sample projects can be quite complex, which may be overwhelming for beginners or those new to the VFX Graph.
  • Performance Considerations: Depending on the complexity of the effects, the performance impact on the game or application may need to be carefully considered.
  • Limited Customization: The samples are designed to showcase specific features and may not provide extensive customization options out of the box.

Getting Started

To get started with the Unity-Technologies/VisualEffectGraph-Samples repository, follow these steps:

  1. Clone the repository to your local machine:

    git clone https://github.com/Unity-Technologies/VisualEffectGraph-Samples.git
    
  2. Open the project in the Unity game engine. Make sure you have the latest version of Unity installed, as the samples may require specific Unity versions.

  3. Explore the different sample projects located in the Samples directory. Each sample project has its own README file that provides detailed instructions on how to use and customize the VFX Graph assets.

  4. Open the sample projects and familiarize yourself with the VFX Graph editor. Experiment with the various nodes, parameters, and settings to understand how the effects are created and how you can modify them to suit your needs.

  5. Refer to the Unity documentation on the VFX Graph for additional information and guidance on using this feature in your own projects.

Competitor Comparisons

3,292

Special Effects with Skinned Mesh in Unity

Pros of Skinner

  • Focuses on skeletal animation and mesh deformation, offering specialized tools for character animation
  • Lightweight and efficient, suitable for real-time applications
  • Provides unique visual effects like mesh skinning and vertex animation

Cons of Skinner

  • Limited scope compared to the broader Visual Effect Graph ecosystem
  • May require more manual setup and coding for complex effects
  • Less integrated with Unity's built-in particle systems

Code Comparison

Skinner:

[SerializeField] SkinnedMeshRenderer _source = null;
[SerializeField] Mesh _template = null;
[SerializeField] float _speedLimit = 10;
[SerializeField] float _drag = 5;

VisualEffectGraph-Samples:

public VisualEffect vfx;
public float spawnRate = 10f;
public float lifetime = 5f;
public Vector3 velocity = Vector3.up;
public float velocityRandomness = 1f;

Both repositories offer unique approaches to visual effects in Unity. Skinner excels in skeletal animation and mesh deformation, making it ideal for character-based effects. VisualEffectGraph-Samples, on the other hand, provides a more comprehensive toolkit for general particle and visual effects, leveraging Unity's Visual Effect Graph system. While Skinner may require more manual setup, it offers specialized tools for specific animation needs. VisualEffectGraph-Samples provides a broader range of effects and better integration with Unity's particle systems, but may be more complex for simple character animations.

1,807

JTRP : Unity HDRP ToonShading Render Pipeline (Preview)

Pros of JTRP

  • Offers a more comprehensive rendering pipeline with advanced features like ray tracing
  • Provides a wider range of visual effects and post-processing options
  • Includes custom shaders and materials for enhanced visual quality

Cons of JTRP

  • May have a steeper learning curve due to its complexity
  • Potentially higher performance requirements compared to VisualEffectGraph-Samples
  • Less official documentation and support from Unity Technologies

Code Comparison

JTRP (Custom Shader Example):

Shader "JTRP/Standard"
{
    Properties
    {
        _Color ("Color", Color) = (1,1,1,1)
        _MainTex ("Albedo (RGB)", 2D) = "white" {}
        _Glossiness ("Smoothness", Range(0,1)) = 0.5
    }
    // ... (shader code continues)
}

VisualEffectGraph-Samples (VFX Graph Node):

using UnityEngine.VFX;

public class CustomVFXNode : VFXNode
{
    [VFXSetting]
    public Vector3 customParameter = Vector3.zero;
    // ... (node implementation)
}

Both repositories offer valuable resources for Unity developers, but they cater to different needs. VisualEffectGraph-Samples focuses on particle-based effects using Unity's Visual Effect Graph, while JTRP provides a more comprehensive rendering solution with advanced features. The choice between them depends on the specific requirements of your project and the level of visual fidelity you aim to achieve.

Additional tools for Visual Effect Artists

Pros of VFXToolbox

  • Provides a wider range of tools and utilities for VFX creation
  • Includes features for texture generation and processing
  • Offers standalone tools that can be used outside of Unity

Cons of VFXToolbox

  • Less focused on Visual Effect Graph-specific samples
  • May require more setup and integration effort
  • Potentially steeper learning curve for beginners

Code Comparison

VFXToolbox (Texture generation example):

public override Texture2D Get2DPreview()
{
    int resolution = 256;
    Texture2D preview = new Texture2D(resolution, resolution, TextureFormat.RGBA32, false);
    Color[] pixels = new Color[resolution * resolution];
    for (int i = 0; i < pixels.Length; i++)
    {
        // Generate texture data
    }
    preview.SetPixels(pixels);
    preview.Apply();
    return preview;
}

VisualEffectGraph-Samples (VFX Graph usage example):

public class VFXSpawner : MonoBehaviour
{
    public VisualEffect vfx;
    public void Spawn()
    {
        vfx.SendEvent("OnSpawn");
    }
}

The VFXToolbox provides more extensive tools for texture generation and processing, while VisualEffectGraph-Samples focuses on demonstrating the usage of the Visual Effect Graph system within Unity. VFXToolbox offers broader functionality, but VisualEffectGraph-Samples may be more accessible for those specifically working with the Visual Effect Graph.

A first person multiplayer shooter example project in Unity

Pros of FPSSample

  • Provides a complete, playable FPS game example
  • Demonstrates networking and multiplayer functionality
  • Includes advanced gameplay systems like weapon handling and character movement

Cons of FPSSample

  • Larger project size, potentially more complex to understand
  • Focused on a specific game genre, may not be as versatile for other project types
  • Requires more setup and configuration to run

Code Comparison

FPSSample (PlayerCharacterController.cs):

public void Move(Vector3 move, bool sprint)
{
    m_MoveWithForce = false;
    m_Controller.Move(move);
    m_Sprint = sprint;
}

VisualEffectGraph-Samples (SimpleSpawner.cs):

public void Spawn()
{
    var instance = Instantiate(prefab, transform.position, transform.rotation);
    instance.GetComponent<Rigidbody>().AddForce(transform.forward * force);
}

The FPSSample code snippet shows character movement control, while the VisualEffectGraph-Samples code demonstrates object spawning and force application, reflecting their different focus areas.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Visual Effect Graph - Samples

In this project you will be able to access sample scenes and effects made with the Visual Effect Graph. You can download snapshots of these samples by using the release tab, or by cloning this repository.

There are also pre-built binaries for Windows and/or macOS available.

Changelog

  • 2022.3 Release 1 : (14.0.8 rev1 2023-11-10)

    • Updated HD Render Pipeline / Visual Effect Graph to 14.0.8

    • Notable Changes:

      • Added SmokePortal Sample

      • File size improvement pass

      • updated visual studio editor and added profiler analyzer packages

gif

  • 2021.2 Release 2 : (12.1.1 rev1 2021-12-10)

    • Updated HD Render Pipeline / Visual Effect Graph to 12.1.1

    • Notable Changes:

      • Added GooBall Sample

      • Jacob's ladder effect excluded from TAA for better rendering (MagicBook Sample)

    • Known Issues

      • Prewarm delta time consideration (fixed in 2021.2.10f1)
      • Mac M1 build: scene flickering issue
      • Linux build: "Vulkan - out of memory" issue

gif

  • 2021.2 Release 1 : (12.1.1 rev1 2021-11-29)

    • Updated HD Render Pipeline / Visual Effect Graph to 12.1.1
    • Notable Changes:
      • Added Ellen Skinned Mesh Sample

gif gif

  • 2020.3 Release 1 : (10.5.0 rev1 2021-08-09)

    • Updated HD Render Pipeline / Visual Effect Graph to 10.5.0
    • Notable Changes
      • Added Meteorite Sample
      • Rebuilt all Visual Effects

gif

  • 2020.2 Release 1 : (10.2.2 rev1 2020-12-15)

    • Updated HD Render Pipeline / Visual Effect Graph to 10.2.2
    • Notable Changes:
      • Rebuilt all Visual Effects
      • Fixed Portal Sample (Re-authored distortion as shader graph)
  • 2019.4 Release 1 : (7.5.2 rev1 2020-12-15)

    • Updated HD Render Pipeline / Visual Effect Graph to 7.5.2
    • Notable Changes:
      • Rebuilt all Visual Effects
  • 2019.3 Release 2 : (7.2.1 rev1 2020-03-10)

    • Updated HD Render Pipeline / Visual Effect Graph to 7.2.1
    • Notable Changes:
      • Rebuilt all Visual Effects
      • Upgraded all HDRP materials to 7.2.1
      • Added Magic Book Sample

gif

  • 2019.3 Update: (7.2.0 rev1 2020-02-12)

    • Updated HD Render Pipeline / Visual Effect Graph to 7.2.0
    • Fixes and Improvements
    • Rebuilt all Visual Effects
      • Upgraded all HDRP materials to 7.2.0
      • Fixed Ambient Lighting in GrassWind
      • Fixed SSS Profile for Chomper Character in EllenHologram
      • Fixed UI Labels in Voxelized Terrain that disappeared in 1440p
      • Fixed Bonfire Fire Shader : was using a texture that was removed from HD Render Pipeline Package
      • Removed unused Custom Render Texture + Shaders in SpaceshipHoloTable
  • 2019.3.0 Release : (7.1.8 rev1 2020-01-30)

    • New Samples
      • Bonfire : Small Scene with Fire and smoke featuring custom VFX Shader Graph rendering (Featuring CC0 Assets from Kenney)
      • Ribbon Pack : Balls of Unraveling multi-colored trails featuring the new Particle Strips.
      • Ellen Hologram : Holographic reprojection of moving characters from 3D Game Kit
    • General Improvements
      • Other Samples were updated and polished to match new features:
        • Added Motion Vectors / Motion blur in Butterflies, Portal, SpaceshipHoloTable, UnityLogo, Volumetric, VoxelizedTerrain
        • Reduced texture size of the SpaceshipHoloTable environment
        • Rebuilt all assets
        • Removed old ProceduralSky from scenes
        • Embedded Visual Effect Graph Sample Additions from package 7.1.6
      • Samples Navigation Improvements
        • Added Navigation Menu Bar (Accessible via Escape Key)
          • Options Window
          • Load Samples Window
          • Toggle Demo Mode
          • Toggle FPS Counter
          • Take Screenshot
    • Known Issues:
      • Ellen Hologram not working properly on macOS/metal
      • Linux Vulkan rendering is mostly broken

gif gif gif

  • The 2019.1 Release! ( 5.8.2-preview rev1 - 2019-03-19 )

    • New Samples

      • Spaceship Holo Table : Holographic Pin-Screen effect isolated from the Spaceship Demo
    • General Improvements

      • Upgraded all project, volumes, postprocesses and scenes to 2019.1 package track
        • HD/VFX Package versions to 5.8.2-preview
        • Editor version to 2019.1.0b6
    • Fixes

      • General Performance adjustments

gif

  • Third Release ( 4.9.0-preview rev1 - 2019-02-07 )

    • New Samples
      • Genie: Magic flow gushing out of the Magic lantern and taking the shape of a Genie
      • AR Radar : Lines and Dots that form a Radar Grid with multiple Targets
      • Voxelized Terrain : Interactive Terrain
    • Fixes and General Improvements:
      • Simplified Sample Loader Script
      • GrassWind : Fixed the sample to reflect the fixes in ConnectTarget
      • GrassWind : Reworked the Camera Control (now works with cinemachine)
      • GrassWind : Added Ethan Body Diffuse texture

gif gif gif

  • Second Release ( 4.6.0-preview rev1 - 2019-01-07 )

    • New Samples
      • GrassWind : Grass quads on terrain reacting to player movement and wind
      • Volumetric : Lit Particles reacting to volumetric lighting and transmission
      • Portal : Magic portal reminiscing of a strange doctor....
    • Fixes:
      • Fixed Butterflies Bodies set to Opaque
      • Fixed Missing references to VectorField and Texture in UnityLogo template
      • Removed unused HDRP Resources file (now using default one)

gif gif gif

  • First Release ( 4.3.0-preview rev1 - 2018-11-27 )

    • Base Project and 3 Samples
      • Unity Logo : around 750k particles driven by vector fields
      • Butterflies : Procedurally animated and simulated butterflies
      • Morphing Face : Simulation-less face of cubes with masking and material animation

gif gif gif