# Particles and Simulations

A particle, individually, is just a single vertex, a position in 3D space. But unlike a vertex, you don't create or move particles directly. For simulation's sake, a particle is indirectly given motion by the application of virtual forces acting upon it, and this is where the simulation part comes in. Forces are evaluated, per frame, producing a motion that is a simulation of how an element might react in the real world when placed under similar influence.

The most common force acting on a given particle is gravity, which compels it downward. Another is wind, compelling it forward. Combinations of multiple forces can be applied, and simulated to produce a more dynamic result.

Animating a single element in this way doesn't offer much of a compelling benefit; the true strength of a particle system lies in collections of many, many particles reacting in concert, all moving in relation to one another and reacting to other elements within a given scene. This collection of particles can be used to easily simulate simple phenomena like water dripping from a faucet, to something much more complex, like fireworks or dust kicking up from a spinning wheel.

The Modo particle simulation system uses the same global evaluation engine as it does for dynamics, therefore, a lot of the same workflows can be applied to both setups. Due to their deep integration inside Modo, they can also work together, with particle elements affecting dynamic items and dynamic items affecting particle elements. This overview page focuses on particles specifically. For more information on working with dynamics, see Dynamics.

Tip:  In the Preset shelf (press F6) under Assets > Assemblies > Particles you can find a number of useful assemblies for particle rigging.

# Simulation Basics

While you don't directly control individual particles, you can directly specify where and how the particles are generated using what is called an emitter. Emitters are the first element in the simulation chain, they generate the particles. Once a particle is born, it is instantly acted upon by forces, the next element in the chain. Forces largely control the motion of the particles. The third element in the chain is optional, but can be a very powerful addition: modifiers provide additional specific functionality, such as evaluating inter-particle interactions. Adding collisions allows particles to interact and collide with dynamic elements. The combination of all these various elements is collectively called a particle system, also often referred to simply as a particle simulation.

Modo provides a robust and flexible node-based particle system, where each element (called a node) is connected in an evaluation chain that is used to calculate the final result. These node setups (called graphs) are created and modified in the Schematic Viewport. For most simple setups though, the connections of particle nodes and modifiers are all done automatically in the background when creating items with the commands found in the Particles toolbox, a sub-tab of the Setup interface. At any time, you can drag and drop the simulation elements from the Items list into the Schematic viewport to see how they are connected, and continue building the graph network from there, to create additional complexity.

You can view the particles directly in the 3D viewport using the simulation transport buttons (covered further below). Pressing either of these puts the particles in motion using the current settings. You can modify those settings and get real-time feedback of the changes, allowing you to easily see how different settings affect the outcome. Once a desired look is achieved, the particles can be cached for final rendering, as particles cannot be rendered until this step. Caching them essentially sets the particles into their current state that remains a part of the saved scene (similarly to baking animation frames). The actual rendering of the simulated particles is done by assigning an effect that renders in place of the particle positions. This can be a blob, volume or sprite, each having its own unique look and controls. Additionally, you can assign any geometry element to particles using Replicators.

# Workflow

Starting a new simulation only requires the creation of Particle Emitters. This can be done using the particle creation tools found in the Setup interface layout, in the Particles sub-tab. The most common emitter type is the radial emitter, a very flexible emitter that can be used in a variety of situations. Clicking the toolbox button of the same name creates an emitter in the scene and also additionally adds a simulation item to the items list. These two elements work together to produce a basic particle simulation. The emitter item generates the actual particles based on its attributes, such as the number of particles and their initial speed at birth. The simulation item adds the universal gravity force that governs the particles motion after birth. It also has settings that define the resolution of the simulation and hold the final cached particle data for rendering.

Realtime preview in the 3D viewport is handled by the simulation transport controls found below the main 3D viewport. The two left buttons (seen above) provide continuous, real-time simulation directly in the 3D viewports. This allows you to adjust settings and move objects and see the changes happen live, directly in the 3D viewport. The Preview at Current Time button (hollow arrow) specifically plays the simulation at the current Timeline position, ignoring keyframed animation. The Preview Animation button (solid arrow) cycles through playing the Timeline with all keyframed animations. When either button is pressed, the buttons themselves change to Stop buttons which can then be pressed to stop the simulation playback. Unless the particles are meant to interact with dynamic items or their is animated channels on the particle items, the first (left) button is most often used.

Click the Simulation Run button to see the particles moving in the 3D viewport. By selecting the Emitter item in the Items list, you can adjust its attributes in the Properties viewport panel and see how the new settings affect the generation of the particles in real-time. Adjusting the number of particles or their initial velocity shows up instantly in the viewport. You can also adjust the emitter shape by controlling the Cone Angle and Angle Spread values. You can make further changes to the emitter by transforming it, changing its angle and position using the standard transform tools while in Items mode.

Once you have the settings you need, cache the simulation to the simulation item. To do this click Compute Simulation (the arrow pointing to the box). Clicking it opens a dialog.

By default, it reflects the scene length values for the Start and End Times. Adjust these if you want to have a simulation run longer or shorter than the scene itself. The Start Time indicates where the simulation begins to be evaluated. Particles don't start to emit until this frame. The End Time designates the end of the simulation evaluation. The Preroll value allows the particle to be emitted and active prior to the Start Time but the values are not cached until that defined frame. This is useful in cases where particles should already exist at the beginning of a sequence. Take, for instance fog in a scene: the Preroll option allows the fog to be visible and moving in the scene at the start frame, otherwise the fog would have to roll-in and build up in the scene first, which might not be the desired result.

While particles are visible as points in the 3D viewports, by themselves, they don't directly render. In order to actually see particles in a render, you need to assign them as point sources to an appropriate effect, such as Replicators, Blobs, Volumes, or Sprites. The effect chosen depends greatly on the desired result. Replicators can be used to assign geometry to the particles for effects like bullets firing and shell casings flying. Blobs can be applied to particles with dynamic fluids for liquid type effects. Fire and smoke are perfect candidates for volumes, especially when combined with Shader Tree textures controlling their color and density. Sprites are useful for image-based particles effects, such as falling ashes after an explosion. Each different effect has a Particle Source option where the Particle Simulation item can be designated. Remember that the simulation must be cached using the appropriate simulation control for the render to actually see the particle.