The basic workflow for creating a particle simulation with an emitter is outlined below. You can click on the links for each of these steps to jump to the corresponding code snippet:
1. Set up the particle cloud and the emitter.
You create a particle cloud using the CreateParticleCloud command. You can use either scripting commands or the object model to create a 3d object for an emitter. You use the AddParticleEmitter command to apply the emitter to the cloud.
Creating a particle cloud generates the ParticlesOp operator automatically, which contains parameters that control the general behavior of your simulation. You can access these parameters through the ParameterCollection of the particle operator.
2. Modify the particle emission.
The emitter contains various parameters that control how particles are emitted. You can access these parameters through the ParameterCollection of the emitter object.
Particle types define what the particles look like (physical characteristics) such as mass, size, color, etc. Particle types are defined independently of any cloud you assign them to and can be accessed as any property ("ParTypes.ParType1").
You can use the SetParticleType command to assign a particle type to an existing cloud.
4. Apply shaders to the particles.
There are special particle shaders available under your factory location in the \Data\DSPresets\Shaders\Texture\Particle directory. You need to use the combination of the CopyPaste and SIConnectShaderToCnxPoint commands and attach the particle shader to the input node of the surface particle shader. Then you can access the particle shader parameter values.