<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNParticleSystem",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNParticleSystem"
  },
  "title" : "SCNParticleSystem"
}
-->

# SCNParticleSystem

An object that animates and renders a system of small image sprites using a high-level simulation whose general behavior you specify.

```
class SCNParticleSystem
```

## Overview

Use particle systems to create effects such as smoke, rain, confetti, and fireworks.

### How Particle Systems Work

Unlike SceneKit nodes and geometries, individual particles are not objects in a scene graph. Because a particle system can involve dozens or hundreds of particles, SceneKit uses a more efficient internal representation that stores and processes the data for all of a system’s particles in bulk.

Instead of accessing each particle to control its behavior or to make it interact with other scene content, you typically use properties of a particle system to control the aggregate behavior of particles. These properties cover several key aspects of the system’s behavior, as summarized below.

- Appearance. SceneKit renders a texture image for each particle. Define the appearance of the particle system by specifying an image, its tint color, and rendering parameters such as blending mode. You can even specify an animated image sequence, creating effects like swarms of insects or multi-stage explosions.
- Life span. SceneKit creates each particle at a location in the scene (also called an *emitter*), varies its position and appearance over a specified life span, then removes it from the scene. (Particle creation is also called *birth* or *spawning*, and particle removal is also called *death*.) The total count of particles on screen at any time is the product of the system’s [`birthRate`](/documentation/SceneKit/SCNParticleSystem/birthRate) and [`particleLifeSpan`](/documentation/SceneKit/SCNParticleSystem/particleLifeSpan) properties. Larger numbers of particles have a greater cost to rendering performance and power usage.
- Emitter behavior. Use the [`emitterShape`](/documentation/SceneKit/SCNParticleSystem/emitterShape) property to specify whether particles spawn from a single point in space or in the region defined by an [`SCNGeometry`](/documentation/SceneKit/SCNGeometry) object. Use the [`emissionDuration`](/documentation/SceneKit/SCNParticleSystem/emissionDuration) property and related properties to vary particle birth over time, so that the system alternates between periods of spawning particles and periods of idle time.
- Variation. Particle systems simulate realistic effects by randomly varying particle properties both at birth and over the lifetime of a particle. You can also add random variation to the life span of particles. Several particle system properties have an associated variation property that controls this randomization. For example, the [`particleSizeVariation`](/documentation/SceneKit/SCNParticleSystem/particleSizeVariation) property defines the width of an interval for randomizing the [`particleSize`](/documentation/SceneKit/SCNParticleSystem/particleSize) property.
- Movement. Particles move according to a simple physics simulation—each has an initial direction, speed, angular velocity and acceleration, which SceneKit uses to animate the particle until it dies. You can create many realistic effects using these attributes alone. You can also add more complex behaviors by allowing particles to interact with scene geometry ([`colliderNodes`](/documentation/SceneKit/SCNParticleSystem/colliderNodes)), the scene’s [`physicsWorld`](/documentation/SceneKit/SCNScene/physicsWorld) simulation, or [`SCNPhysicsField`](/documentation/SceneKit/SCNPhysicsField) objects.

In addition, you can also use the following features to add dynamic behaviors to a particle system, changing its appearance over time or making it interact with its environment.

- Animations and property controllers. Like many SceneKit objects, the [`SCNParticleSystem`](/documentation/SceneKit/SCNParticleSystem) class conforms to the [`SCNAnimatable`](/documentation/SceneKit/SCNAnimatable) protocol, so you can implicitly or explicitly animate changes to its properties. (For general background on animation, see [Animating SceneKit Content](/documentation/SceneKit/animating-scenekit-content).) When you animate changes to a particle system’s properties, these changes affect all particles in the system simultaneously.

To apply animations independently for individual particles, use an [`SCNParticlePropertyController`](/documentation/SceneKit/SCNParticlePropertyController) object, which associates a <doc://com.apple.documentation/documentation/QuartzCore/CAAnimation> object with a particle system property. With a property controller, you can use features of the Core Animation framework to create time-varying effects that apply to each particle in the system. Typically a Core Animation object varies a property with respect to time, but with a property controller you can also create animations that vary a property based on other input values, such as a particle’s distance from its initial location.

For example, consider a <doc://com.apple.documentation/documentation/QuartzCore/CAKeyframeAnimation> object that animates a series of colors from white to yellow to red, and a particle system that simulates a flame. If you attach this animation to a particle system’s [`particleColor`](/documentation/SceneKit/SCNParticleSystem/particleColor) property, the resulting flame effect has a single color at any given moment, but that color changes over time. If you instead attach a property controller for the [`color`](/documentation/SceneKit/SCNParticleSystem/ParticleProperty/color) property, the flame varies in color from its base to its tip—each particle starts out white, then fades to yellow and red as it rises.

- Spawned particle systems. When you assign another [`SCNParticleSystem`](/documentation/SceneKit/SCNParticleSystem) instance to one of the properties listed in Spawning Additional Particle Systems, SceneKit adds more particle systems to the scene based on the behavior of the original particle system. For example, if you have a particle system that simulates falling rain, you can use the [`systemSpawnedOnCollision`](/documentation/SceneKit/SCNParticleSystem/systemSpawnedOnCollision) property to add splashes where each raindrop strikes a surface.
- Event handlers and particle modifiers. Because they specify behavior declaratively, animations, property controllers, and spawned systems provide easy configuration and high performance for most dynamic behaviors. To create behaviors not possible with these features, you can register event handler or particle modifier blocks that work directly with the bulk particle data SceneKit uses to animate a particle system.

Use the [`handle(_:forProperties:handler:)`](/documentation/SceneKit/SCNParticleSystem/handle(_:forProperties:handler:)) method to modify particle data in response to an event—particle birth, death, or collision. For example, you can use this option to make particles that change color after colliding with another object in the scene.

Use the methods listed in Modifying Particles Over Time to manage blocks that SceneKit calls for every rendered frame. Your block can modify particle properties in bulk, allowing you to change particle behavior precisely, but at a high risk to rendering performance.

### Use the Xcode Particle System Editor to Experiment with Particle Systems

In most cases, you don’t need to configure a particle system directly in your app or game. Instead, you use Xcode to configure a particle system’s properties. As you change the behavior of the particle system, Xcode immediately provides an updated visual effect. When complete, Xcode archives the configured system into a file, which you can then include with your project’s bundle resources. Then, at runtime, your game uses this archive to instantiate a new particle system.

Using Xcode to create your particle systems has a few important advantages:

- You can easily learn the capabilities of the particle system class.
- You can experiment quickly with new particle effects and see the results immediately.
- You separate the task of designing a particle effect from the programming task of using it. Your artists can work on new particle effects independent of your game code.
- You can attach a particle system to a node in the Xcode scene editor to preview the particle system in your scene.

To load a particle system from a file you created with Xcode, use the [`init(named:inDirectory:)`](/documentation/SceneKit/SCNParticleSystem/init(named:inDirectory:)) method.

## Topics

### Creating a Particle System

[`+  particleSystem`](/documentation/SceneKit/SCNParticleSystem/particleSystem)

Creates a new particle system.

[`+  particleSystemNamed:inDirectory:`](/documentation/SceneKit/SCNParticleSystem/init(named:inDirectory:))

Loads a particle system from a file in the app’s bundle resources.

### Managing Particle Emission Timing

[`emissionDuration`](/documentation/SceneKit/SCNParticleSystem/emissionDuration)

The duration, in seconds, over which the system spawns new particles. Animatable.

[`emissionDurationVariation`](/documentation/SceneKit/SCNParticleSystem/emissionDurationVariation)

The range, in seconds, of randomized emission duration values. Animatable.

[`idleDuration`](/documentation/SceneKit/SCNParticleSystem/idleDuration)

The duration, in seconds, of periods when the system emits no particles. Animatable.

[`idleDurationVariation`](/documentation/SceneKit/SCNParticleSystem/idleDurationVariation)

The range, in seconds, of randomized idle duration values. Animatable.

[`loops`](/documentation/SceneKit/SCNParticleSystem/loops)

A Boolean value that determines whether the system repeats its emission and idle periods.

[`warmupDuration`](/documentation/SceneKit/SCNParticleSystem/warmupDuration)

The duration, in seconds, for which particles are spawned before the system is first rendered. Animatable.

[`birthRate`](/documentation/SceneKit/SCNParticleSystem/birthRate)

The number of particles spawned during each emission period. Animatable.

[`birthRateVariation`](/documentation/SceneKit/SCNParticleSystem/birthRateVariation)

The range of randomized particle birth rate values. Animatable.

### Managing Particle Emission Locations

[`emitterShape`](/documentation/SceneKit/SCNParticleSystem/emitterShape)

The shape of the region of space where the system spawns new particles.

[`birthLocation`](/documentation/SceneKit/SCNParticleSystem/birthLocation)

The possible locations for newly spawned particles, relative to the emitter shape.

[`SCNParticleBirthLocation`](/documentation/SceneKit/SCNParticleBirthLocation)

Options for the initial location of each emitted particle, used by the [`birthLocation`](/documentation/SceneKit/SCNParticleSystem/birthLocation) property.

[`birthDirection`](/documentation/SceneKit/SCNParticleSystem/birthDirection)

The possible initial directions for newly spawned particles, relative to the emitter shape.

[`SCNParticleBirthDirection`](/documentation/SceneKit/SCNParticleBirthDirection)

Options for the initial direction of each emitted particle, used by the [`birthDirection`](/documentation/SceneKit/SCNParticleSystem/birthDirection) property.

[`emittingDirection`](/documentation/SceneKit/SCNParticleSystem/emittingDirection)

The initial direction for newly spawned particles. Animatable.

[`spreadingAngle`](/documentation/SceneKit/SCNParticleSystem/spreadingAngle)

The range, in degrees, of randomized initial particle directions. Animatable.

### Managing Particle Motion

[`particleAngle`](/documentation/SceneKit/SCNParticleSystem/particleAngle)

The rotation angle, in degrees, of newly spawned particles. Animatable.

[`particleAngleVariation`](/documentation/SceneKit/SCNParticleSystem/particleAngleVariation)

The range, in degrees of randomized initial particle angles. Animatable.

[`particleVelocity`](/documentation/SceneKit/SCNParticleSystem/particleVelocity)

The initial speed, in units per second, for newly spawned particles. Animatable.

[`particleVelocityVariation`](/documentation/SceneKit/SCNParticleSystem/particleVelocityVariation)

The range, in units per second, of randomized initial particle speeds. Animatable.

[`particleAngularVelocity`](/documentation/SceneKit/SCNParticleSystem/particleAngularVelocity)

The initial spin rate, in degrees per second, of newly spawned particles. Animatable.

[`particleAngularVelocityVariation`](/documentation/SceneKit/SCNParticleSystem/particleAngularVelocityVariation)

The range, in degrees per second, of randomized initial angular velocities for particles. Animatable.

[`particleLifeSpan`](/documentation/SceneKit/SCNParticleSystem/particleLifeSpan)

The duration, in seconds, for which each particle is rendered before being removed from the scene. Animatable.

[`particleLifeSpanVariation`](/documentation/SceneKit/SCNParticleSystem/particleLifeSpanVariation)

The range, in seconds, of randomized particle life spans. Animatable.

### Specifying Particle Appearance

[`particleSize`](/documentation/SceneKit/SCNParticleSystem/particleSize)

The rendered size, in units of the scene’s world coordinate space, of the particle image. Animatable.

[`particleSizeVariation`](/documentation/SceneKit/SCNParticleSystem/particleSizeVariation)

The range of randomized particle sizes. Animatable.

[`particleColor`](/documentation/SceneKit/SCNParticleSystem/particleColor)

The color of newly spawned particles. Animatable.

[`particleColorVariation`](/documentation/SceneKit/SCNParticleSystem/particleColorVariation)

The ranges of randomized particle color components. Animatable.

[`particleImage`](/documentation/SceneKit/SCNParticleSystem/particleImage)

The texture image SceneKit uses to render each particle.

[`fresnelExponent`](/documentation/SceneKit/SCNParticleSystem/fresnelExponent)

The reflectivity exponent SceneKit uses when rendering the particle’s image as a cube map. Animatable.

[`stretchFactor`](/documentation/SceneKit/SCNParticleSystem/stretchFactor)

A multiplier for stretching particle images along their direction of motion. Animatable.

### Animating Particle Images

[`imageSequenceRowCount`](/documentation/SceneKit/SCNParticleSystem/imageSequenceRowCount)

The number of rows for treating the particle image as a grid of animation frames.

[`imageSequenceColumnCount`](/documentation/SceneKit/SCNParticleSystem/imageSequenceColumnCount)

The number of columns for treating the particle image as a grid of animation frames.

[`imageSequenceInitialFrame`](/documentation/SceneKit/SCNParticleSystem/imageSequenceInitialFrame)

The index of the first frame in a particle image animation. Animatable.

[`imageSequenceInitialFrameVariation`](/documentation/SceneKit/SCNParticleSystem/imageSequenceInitialFrameVariation)

The range of randomized initial frames for particle image animation. Animatable.

[`imageSequenceFrameRate`](/documentation/SceneKit/SCNParticleSystem/imageSequenceFrameRate)

The rate, in frames per second, of particle image animation. Animatable.

[`imageSequenceFrameRateVariation`](/documentation/SceneKit/SCNParticleSystem/imageSequenceFrameRateVariation)

The range, in frames per second, of randomized frame rates for particle image animation. Animatable.

[`imageSequenceAnimationMode`](/documentation/SceneKit/SCNParticleSystem/imageSequenceAnimationMode)

The animation mode for particle image animation.

[`SCNParticleImageSequenceAnimationMode`](/documentation/SceneKit/SCNParticleImageSequenceAnimationMode)

Options for animating each particle with a sequence of images, used by the [`imageSequenceAnimationMode`](/documentation/SceneKit/SCNParticleSystem/imageSequenceAnimationMode) property.

### Simulating Physics for Particles

[`affectedByGravity`](/documentation/SceneKit/SCNParticleSystem/isAffectedByGravity)

A Boolean value that determines whether gravity, as defined by the scene’s physics simulation, affects the motion of particles.

[`affectedByPhysicsFields`](/documentation/SceneKit/SCNParticleSystem/isAffectedByPhysicsFields)

A Boolean value that determines whether physics fields in the scene affect the motion of particles.

[`colliderNodes`](/documentation/SceneKit/SCNParticleSystem/colliderNodes)

The nodes whose geometry the system’s particles can collide with.

[`particleDiesOnCollision`](/documentation/SceneKit/SCNParticleSystem/particleDiesOnCollision)

A Boolean value that determines whether particles are removed from the scene upon colliding with another object.

[`acceleration`](/documentation/SceneKit/SCNParticleSystem/acceleration)

The constant acceleration vector, in units per second per second, applied to all particles in the system. Animatable.

[`dampingFactor`](/documentation/SceneKit/SCNParticleSystem/dampingFactor)

A factor that slows particles relative to their velocity. Animatable.

[`particleMass`](/documentation/SceneKit/SCNParticleSystem/particleMass)

The mass, in kilograms, of each particle in the system. Animatable.

[`particleMassVariation`](/documentation/SceneKit/SCNParticleSystem/particleMassVariation)

The range, in kilograms, of randomized particle masses. Animatable.

[`particleCharge`](/documentation/SceneKit/SCNParticleSystem/particleCharge)

The electric charge, in coulombs, of each particle in the system. Animatable.

[`particleChargeVariation`](/documentation/SceneKit/SCNParticleSystem/particleChargeVariation)

The range, in coulombs, of randomized particle charges. Animatable.

[`particleBounce`](/documentation/SceneKit/SCNParticleSystem/particleBounce)

The restitution coefficient of each particle in the system. Animatable.

[`particleBounceVariation`](/documentation/SceneKit/SCNParticleSystem/particleBounceVariation)

The range of randomized restitution coefficients for particles. Animatable.

[`particleFriction`](/documentation/SceneKit/SCNParticleSystem/particleFriction)

The friction coefficient of each particle in the system. Animatable.

[`particleFrictionVariation`](/documentation/SceneKit/SCNParticleSystem/particleFrictionVariation)

The range of randomized friction coefficients for particles. Animatable.

### Spawning Additional Particle Systems

[`systemSpawnedOnCollision`](/documentation/SceneKit/SCNParticleSystem/systemSpawnedOnCollision)

Another particle system to be added to the scene when a particle collides with scene geometry.

[`systemSpawnedOnDying`](/documentation/SceneKit/SCNParticleSystem/systemSpawnedOnDying)

Another particle system to be added to the scene when a particle dies.

[`systemSpawnedOnLiving`](/documentation/SceneKit/SCNParticleSystem/systemSpawnedOnLiving)

Another particle system to be added to the scene for each living particle in the system.

### Managing Particle Rendering

[`blendMode`](/documentation/SceneKit/SCNParticleSystem/blendMode)

The blending mode for compositing particle images into the rendered scene.

[`SCNParticleBlendMode`](/documentation/SceneKit/SCNParticleBlendMode)

Options for combining source and destination pixel colors when compositing particles during rendering, used by the [`blendMode`](/documentation/SceneKit/SCNParticleSystem/blendMode) property.

[`orientationMode`](/documentation/SceneKit/SCNParticleSystem/orientationMode)

The mode defining whether and how particles may rotate.

[`SCNParticleOrientationMode`](/documentation/SceneKit/SCNParticleOrientationMode)

Options for restricting the orientation of particles, used by the [`orientationMode`](/documentation/SceneKit/SCNParticleSystem/orientationMode) property.

[`sortingMode`](/documentation/SceneKit/SCNParticleSystem/sortingMode)

The mode defining the order in which SceneKit renders the system’s particles.

[`SCNParticleSortingMode`](/documentation/SceneKit/SCNParticleSortingMode)

Options for the rendering order of particles, used by the [`sortingMode`](/documentation/SceneKit/SCNParticleSystem/sortingMode) property.

[`lightingEnabled`](/documentation/SceneKit/SCNParticleSystem/isLightingEnabled)

A Boolean value that determines whether SceneKit applies lighting to particle images when rendering.

[`blackPassEnabled`](/documentation/SceneKit/SCNParticleSystem/isBlackPassEnabled)

A Boolean value that determines whether SceneKit renders particles in black before rendering the particle image.

### Controlling Particle Simulation

[`local`](/documentation/SceneKit/SCNParticleSystem/isLocal)

A Boolean value that specifies whether the particle simulation runs in the local coordinate space of the node containing it.

[`-  reset`](/documentation/SceneKit/SCNParticleSystem/reset())

Returns the particle system to its initial state.

[`speedFactor`](/documentation/SceneKit/SCNParticleSystem/speedFactor)

A multiplier for the speed at which SceneKit runs the particle simulation. Animatable.

### Modifying Particles in Response to Particle System Events

[`-  handleEvent:forProperties:withBlock:`](/documentation/SceneKit/SCNParticleSystem/handle(_:forProperties:handler:))

Adds a block that modifies particle properties, to be executed at a specified event in the lifetimes of particles in the system.

[`SCNParticleEvent`](/documentation/SceneKit/SCNParticleEvent)

Significant events in the life spans of simulate particles, used by the [`handle(_:forProperties:handler:)`](/documentation/SceneKit/SCNParticleSystem/handle(_:forProperties:handler:)) method.

[`SCNParticleEventBlock`](/documentation/SceneKit/SCNParticleEventBlock)

The signature for blocks called by SceneKit in response to significant events during particle simulation, used by the [`handle(_:forProperties:handler:)`](/documentation/SceneKit/SCNParticleSystem/handle(_:forProperties:handler:)) method.

### Modifying Particles Over Time

[`propertyControllers`](/documentation/SceneKit/SCNParticleSystem/propertyControllers)

A dictionary that optionally associates particle properties with objects that animate a property’s value for each particle.

[`-  addModifierForProperties:atStage:withBlock:`](/documentation/SceneKit/SCNParticleSystem/addModifier(forProperties:at:modifier:))

Adds a block that modifies particle properties, to be executed each time SceneKit renders a frame.

[`-  removeModifiersOfStage:`](/documentation/SceneKit/SCNParticleSystem/removeModifiers(at:))

Removes particle modifier blocks for the specified stage of the particle simulation.

[`-  removeAllModifiers`](/documentation/SceneKit/SCNParticleSystem/removeAllModifiers())

Removes all particle modifier blocks associated with the particle system.

[`ParticleProperty`](/documentation/SceneKit/SCNParticleSystem/ParticleProperty)

Keys identifying properties of individual particles, used by the [`propertyControllers`](/documentation/SceneKit/SCNParticleSystem/propertyControllers) dictionary and the [`handle(_:forProperties:handler:)`](/documentation/SceneKit/SCNParticleSystem/handle(_:forProperties:handler:)) and [`addModifier(forProperties:at:modifier:)`](/documentation/SceneKit/SCNParticleSystem/addModifier(forProperties:at:modifier:)) methods.

[`SCNParticleModifierStage`](/documentation/SceneKit/SCNParticleModifierStage)

Stages of SceneKit’s particle simulation process into which you can insert modifier blocks, used by the [`addModifier(forProperties:at:modifier:)`](/documentation/SceneKit/SCNParticleSystem/addModifier(forProperties:at:modifier:)) method.

[`SCNParticleModifierBlock`](/documentation/SceneKit/SCNParticleModifierBlock)

The signature for blocks called by SceneKit to modify particle properties on each frame of simulation, used by the [`addModifier(forProperties:at:modifier:)`](/documentation/SceneKit/SCNParticleSystem/addModifier(forProperties:at:modifier:)) method.

### Sample Code

Example projects making use of SceneKit particle systems.

  <doc://com.apple.documentation/documentation/UIKit/building-a-document-browser-app-for-custom-file-formats>

## Relationships

### Conforms To

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`SCNAnimatable`](/documentation/SceneKit/SCNAnimatable)

[`NSCoding`](/documentation/Foundation/NSCoding)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)