
PBD | Pysical Based Dynamics | Simulation Stages | UE4 Niagara Tutorial
Position Based Dynamics in UE4 Niagara
This tutorial shows how to set up Position Based Dynamics with simulation stages in Unreal Engine 4 Niagara, so particles collide with each other.
Use it for fluid-like piles, crowds and self-colliding particles, and see the related posts below for more Niagara simulation effects.
More Niagara effects: Clouds in Niagara · Foot Step Dust · Explode FX
More like this: Energy Drip VFX in Unreal Engine 5 Niagara Tutorial · MOBA Attack Effect in UE4 Niagara Tutorial



























Title: How to Set Up Position-Based Dynamics in Unreal Engine Niagara – Full Guide
Description:
Hi guys, I’m Asif Ali, and welcome back to CGHOW. In today’s video, we will dive into Position-Based Dynamics in Unreal Engine Niagara from scratch!
We will cover:
- Self-collision of particles
- How to use mesh-based particles
- Setting up the self-collision algorithm
- Customizing particle color based on velocity
- Practical example using Unreal Engine 4.26
First, if you haven’t already, make sure to subscribe to the channel and hit the bell icon to stay updated on all new tutorials. Let’s get started!
Tutorial Breakdown:
- Introduction to Position-Based Dynamics:
- Overview of position-based dynamics in Unreal Engine’s Niagara.
- Setting up a simple mesh for particles.
- Creating the Material:
- Using Particle Color for mesh color.
- Setting up basic material for mesh visualization.
- Niagara Particle Setup:
- Mesh Renderer: How to set up and use a mesh instead of a sprite.
- Using Attractive Force to draw particles to a point.
- Self-Collision Setup:
- Activating GPU Simulation for self-collision in Niagara.
- Creating the Self Collision stage in the simulation.
- Using the HLSL node to adjust particle velocity during collision.
- Handling Particle Interactions:
- Calculating particle position and size for collision detection.
- Pushing back velocity when particles intersect.
- How to manage particle scale for collision prevention.
- Tweaking Particle Behavior:
- Adding drag to particles to simulate friction.
- Changing the particle color based on their velocity (from red to black as they stop).
Additional Notes:
- Code Explanation: Detailed breakdown of the HLSL code used for self-collision detection and particle interactions.
- For Loop: Understanding why a for loop is necessary to loop through every particle and check collisions.
- Math Breakdown: Simple explanation of the math behind vector distance and scale for collisions.
Join the Community:
- Want to access the code? Head to my Patreon where you can find the full script!
- Don’t forget to like, comment, and share the video if you found it helpful! Let me know what you’d like to see next in the comments.
Subscribe to CGHOW for more Unreal Engine VFX tutorials!


Leave a Reply