image/svg+xml
docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License
Visual Effect Graph 12.0.0
    Show / Hide Table of Contents
    • Visual Effect Graph
    • Requirements
    • What's new
      • 10 / Unity 2020.​2
      • 11 / Unity 2021.​1
    • Getting Started
      • Visual Effect Graph Assets
      • Visual Effect Graph Window
      • Sample Content
    • Graph Logic & Philosophy
      • Systems
      • Contexts
      • Blocks
      • Operators
      • Properties
      • Events
      • Attributes
      • Subgraph
      • Blackboard
      • Sticky Notes
      • Project Settings
      • Preferences
      • Visual Effect Bounds
    • The Visual Effect Component
      • C# Component API
      • Using Visual Effects with Timeline
      • Property Binders
      • Event Binders
      • Output Event Handlers
    • Shader Graph Integration
      • Shader Graphs in Visual Effects
      • Visual Effect Target
    • Pipeline Tools
      • Representing Complex Shapes
        • Signed Distance Fields
          • SDF Bake Tool
            • SDF Bake Tool window
            • SDF Bake Tool API
        • Point Caches
          • Point Cache asset
          • Point Cache Bake Tool
      • Exposed​Property Helper
      • Vector Fields
      • Spawner Callbacks
    • Node Library
      • Context
        • Event
        • GPU Event
        • Initialize Particle
        • Output Mesh
        • Output Distortion
        • Output Decal
        • Output Line
        • Output Particle Mesh
        • Output Point
        • Output Primitive
        • Shared Output Settings
          • Global Settings
          • Lit Output Settings
        • Spawn
        • Update Particle
      • Block
        • Attribute
          • Curve
          • Derived
            • Calculate Mass from Volume
          • Map
          • Set
        • Collision
          • Collide with AABox
          • Collide with Cylinder
          • Collide with Depth Buffer
          • Collide with Plane
          • Collide with Signed Distance Field
          • Collide with Sphere
        • Flipbook
          • Flipbook Player
        • Force
          • Conform to Signed Distance Field
          • Conform to Sphere
          • Force
          • Gravity
          • Linear Drag
          • Turbulence
          • Vector Force Field
        • GPU Event
          • Trigger Event Always
          • Trigger Event On Die
          • Trigger Event Rate
        • Implicit
          • Integration : Update Position
          • Integration : Update Rotation
        • Kill
          • Kill (AABox.​md)
          • Kill (Sphere.​md)
        • Orientation
          • Connect Target
          • Orient
        • Output
          • Camera Fade
          • Subpixel Anti-Aliasing
        • Position
          • Set Position (Depth.​md)
          • Position (Mesh.​md)
          • Position (Signed Distance Field.​md)
          • Position (Skinned Mesh.​md)
          • Set Position (Sequential : Circle.​md)
          • Set Position (Sequential : Line.​md)
          • Set Position (Sequential : Three​Dimensional.​md)
          • Set Position (Shape : AABox.​md)
          • Set Position (Shape : Circle.​md)
          • Set Position (Shape : Cone.​md)
          • Set Position (Shape : Line.​md)
          • Set Position (Shape : Sphere.​md)
          • Set Position (Sequential.​md)
          • Tile/Warp Positions
        • Size
          • Screen Space Size
        • Spawn
          • Constant Spawn Rate
          • Periodic Burst
          • Single Burst
          • Variable Spawn Rate
          • Attribute
            • Set Spawn Event \<attribute>
          • Custom
            • Increment Strip Index On Start
            • Set Spawn Time
            • Spawn Over Distance
        • Velocity
          • Velocity from Direction & Speed (Change Speed.​md)
          • Velocity from Direction & Speed (New Direction.​md)
          • Velocity from Direction & Speed (Random Direction.​md)
          • Velocity from Direction & Speed (Spherical.​md)
          • Velocity from Direction & Speed (Tangent.​md)
      • Context
        • Event
        • GPU Event
        • Initialize Particle
        • Output Mesh
        • Output Distortion
        • Output Decal
        • Output Line
        • Output Particle Mesh
        • Output Point
        • Output Primitive
        • Shared Output Settings
          • Global Settings
          • Lit Output Settings
        • Spawn
        • Update Particle
      • Operator
        • Attribute
          • Age Over Lifetime
          • Get Attribute: age
          • Get Attribute: alive
          • Get Attribute: alpha
          • Get Attribute: angle
          • Get Attribute: angular​Velocity
          • Get Attribute: axis​X
          • Get Attribute: axis​Y
          • Get Attribute: axis​Z
          • Get Attribute: color
          • Get Attribute: direction
          • Get Attribute: lifetime
          • Get Attribute: mass
          • Get Attribute: old​Position
          • Get Attribute: particle​Count​In​Strip
          • Get Attribute: particle​Id
          • Get Attribute: particle​Index​In​Strip
          • Get Attribute: pivot
          • Get Attribute: position
          • Get Attribute: scale
          • Get Attribute: seed
          • Get Attribute: size
          • Get Attribute: spawn​Index
          • Get Attribute: spawn​Time
          • Get Attribute: strip​Index
          • Get Attribute: target​Position
          • Get Attribute: tex​Index
          • Get Attribute: velocity
          • Get Custom Attribute
        • Bitwise
          • And
          • Complement
          • Left Shift
          • Or
          • Right Shift
          • Xor
        • Builtin
          • Delta Time
          • Frame Index
          • Local to World
          • Main Camera
          • System Seed
          • Total Time
          • World to Local
        • Camera
          • Viewport to World Point
          • World to Viewport Point
        • Color
          • Color Luma
          • HSV to RGB
          • RBG to HSV
        • Inline
          • AABox
          • Animation​Curve
          • Arc​Circle
          • Arc​Cone
          • Arc​Sphere
          • Arc​Torus
          • bool
          • Camera
          • Circle
          • Color
          • Cone
          • Cubemap
          • Cubemap​Array
          • Cylinder
          • Direction
          • Flip​Book
          • float
          • Gradient
          • int
          • Line
          • Matrix4x4
          • Mesh
          • Oriented​Box
          • Plane
          • Position
          • Sphere
          • Terrain​Type
          • Texture2D
          • Texture2DArray
          • Texture3D
          • Torus
          • Transform
          • uint
          • Vector
          • Vector2
          • Vector3
          • Vector4
        • Logic
          • And
          • Branch
          • Compare
          • Nand
          • Nor
          • Not
          • Or
          • Probability Sampling
          • Switch
        • Math
          • Arithmetic
            • Absolute
            • Add
            • Divide
            • Fractional
            • Inverse Lerp
            • Lerp
            • Modulo
            • Multiply
            • Negate
            • One Minus
            • Power
            • Reciprocal
            • Sign
            • Smoothstep
            • Square Root
            • Step
            • Subtract
          • Clamp
            • Ceiling
            • Clamp
            • Discretize
            • Floor
            • Maximum
            • Minimum
            • Round
            • Saturate
          • Constants
            • Epsilon
            • Pi
          • Coordinates
            • Polar to Rectangular
            • Rectangular to Polar
            • Rectangular to Spherical
            • Spherical to Rectangular
          • Exp
            • Exp
          • Geometry
            • Area (Circle.​md)
            • Change Space
            • Distance (Line.​md)
            • Distance (Plane.​md)
            • Distance (Sphere.​md)
            • Invert​TRS (Matrix.​md)
            • Transform (Direction.​md)
            • Transform (Matrix.​md)
            • Transform (Position.​md)
            • Transform (Vector.​md)
            • Transform (Vector4.​md)
            • Transpose (Matrix.​md)
            • Volume (Axis Aligned Box.​md)
            • Volume (Cone.​md)
            • Volume (Cylinder.​md)
            • Volume (Oriented Box.​md)
            • Volume (Sphere.​md)
            • Volume (Torus.​md)
          • Log
            • Log
          • Remap
            • Remap
            • Remap [0..​1] => [-1..​1]
            • Remap [-1..​1] => [0..​1]
          • Trigonometry
            • Acos
            • Asin
            • Atan
            • Atan2
            • Cosine
            • Sine
            • Tangent
          • Vector
            • Append Vector
            • Construct Matrix
            • Cross Product
            • Distance
            • Dot Product
            • Length
            • Look At
            • Normalize
            • Rotate 2D
            • Rotate 3D
            • Sample Bezier
            • Squared Distance
            • Squared Length
            • Swizzle
          • Wave
            • Sawtooth Wave
            • Sine Wave
            • Square Wave
            • Triangle Wave
        • Noise
          • Cellular Curl Noise
          • Cellular Noise
          • Perlin Curl Noise
          • Perlin Noise
          • Value Curl Noise
          • Value Noise
        • Random
          • Random Number
        • Sampling
          • Buffer Count
          • Get Texture Dimensions
          • Load Camera​Buffer
          • Mesh Index Count
          • Mesh Vertex Count
          • Load Texture2D
          • Load Texture2DArray
          • Load Texture3D
          • Position (Depth.​md)
          • Sample Buffer
          • Sample Camera​Buffer
          • Sample Curve
          • Sample Gradient
          • Sample Mesh
          • Sample Mesh Index
          • Sample Skinned Mesh
          • Sample Skinned Mesh Renderer Index
          • Sample Signed Distance Field
          • Sample Texture2D
          • Sample Texture2DArray
          • Sample Texture3D
          • Sample Texture​Cube
          • Sample Texture​Cube​Array
          • Skinned Mesh Index Count
          • Skinned Mesh Vertex Count
        • Spawn
          • Spawn State
        • Utility
          • Point Cache
    • Reference
      • Standard Attributes
      • Types
        • AABox
        • Arc​Circle
        • Arc​Cone
        • Arc​Sphere
        • Arc​Torus
        • Camera
        • Camera​Buffer
        • Circle
        • Cone
        • Cylinder
        • Direction
        • Line
        • Oriented​Box
        • Plane
        • Position
        • Sphere
        • Terrain​Type
        • Torus
        • Transform
        • Vector
    • Manual
    • Node Library
    • Context
    • Output Particle Mesh
    • Context
    • Output Particle Mesh

    Output Particle Mesh

    Menu Path : Context > Output Particle Mesh

    (Output Particle (Lit) Mesh)

    The Output Particle Mesh Context allows you to render particles using meshes. They come in a regular (unlit) and a Lit variety (HDRP-only).

    Below is a list of settings and properties specific to the Output Particle Mesh Context. For information about the generic output settings this Context shares with all other Contexts, see Global Output Settings and Properties.

    Context settings

    Setting Type Description
    Mesh Count uint (slider) (Inspector) The number of different meshes to use with this output (from 1 to 4). You can select a mesh for a particle by index. This uses the particle's meshIndex attribute.
    Lod bool (Inspector) Indicates whether the particle mesh uses levels of details (LOD).If you enable this setting, the Context bases mesh selection on the particle's apparent size on screen. To specify values for the LOD mesh selection, use the Lod Values property.

    Context properties

    Input Type Description
    Mesh [N] Mesh The mesh(es) to use to render particles. The number of mesh input fields depends on the Mesh Count setting.
    Sub Mesh Mask [N] uint (mask) The sub mesh mask(s) to use for each mesh. The number of sub mesh mask fields depends on the Mesh Count setting.
    Lod Values Vector4 The threshold values the Context uses to choose between LOD levels. The values represent a percentage of the viewport along one dimension (For instance, a Value of 10.0 means 10% of the screen). The Context tests values from left to right (0 to n) and selects the LOD level only if the percentage of the particle on screen is above the threshold. This means you have to specify LOD values in decreasing order. Note that you can also use LOD with a mesh count of 1 to cull small particles on screen. This property only appears if you enable the LOD setting.
    Radius Scale float The scale to apply when selecting the LOD level per particle. By default, the LOD system assumes meshes bounding boxes are unit boxes. If your mesh bounding boxes is smaller/bigger than the unit box, you can use this property to apply a scale so that lod thresholds are consistent with apparent size. This property only appears if you enable the LOD setting.

    Limitations

    Note that you cannot specify mesh and sub mesh masks because they are CPU expressions and not GPU expressions. If you want to use a variety of meshes to render your particles, you have to use the multi mesh system instead by specifying a mesh count more than 1 (up to 4) and use the meshIndex attribute

    Per-particle sorting and multi-mesh are not global to the output. Sorting only happens between particles using the same mesh index. This means that particle using mesh 0 always render above particle using mesh 1 for instance no matter what their distance from the camera is.

    Performance considerations

    Using multi meshes actually issues different draw calls. This means that there can be some CPU overhead when using this feature. It’s equivalent to using several outputs, but is a bit more optimized. It also means that using LOD as an optimization is only suitable for large systems with many particles.

    If you use a mesh with many vertices and your system has a low occupancy (alive particle count / capacity), it might be better to switch rendering mode (a setting in the output inspector) to indirect to remove workload at the vertex stage and gain performance.

    In This Article
    • Context settings
    • Context properties
    • Limitations
    • Performance considerations
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023