Since Obi uses particles to represent all of its actors internally (cloth, ropes, fluids...), sometimes it makes sense to actually draw this particle-based representation in your scene: for debugging purposes, or as an alternative visualization mode. To render an actor's particles, just add an ObiParticleRenderer component to it. Any class that derives from ObiActor can have a particle renderer attached:
There are two particle renderer components: ObiParticleRenderer and ObiInstancedParticleRenderer (only 4.1 and above). Let's take a look at each one:
Particles are rendered as spherical impostors, which are just quads with a special shader applied. They are not actual sphere-shaped meshes (though they look like it), so thousands of them can be rendered at very little performance cost, without the need for GPU instancing support.
Here's how the inspector for ObiParticleRenderer looks:
You can disable this checkbox and the particles won´t be rendered, but the mesh used to render them will still be generated. This is useful in conjunction with components that take this mesh as an input and render it in a different way, like ObiFluidRenderer.
Overall color of your particles.
This scales the size at which particles are drawn.
Rope, cloth and fluid being rendered as particles.
Particles are rendered as GPU instances of a mesh. They will accurately reflect particle position, orientation and scale. Note that this requires GPU instancing support, and the use of a instancing-enabled material.
Here's how the inspector for ObiInstancedParticleRenderer looks:
You can disable this checkbox and the particles won´t be rendered.
Mesh used for instancing.
Material used for instancing. Note that it has to have its "Enable GPU instancing" property on.
This scales the size at which particles are drawn in the local X, Y and Z axis.