The Particles core can display different styles of particles and keeps all the data needed to do all of them. Not every style uses all the data, and using simpler setups can result in vastly improved performance Ext: (if it doesn't, add a fast path to Particles::findDrawer ;) The supported styles are:
The available attributes are:
The first 4 are realized similarly to the Geometry Properties, to allow unified manipulation of data and sharing with geometry nodes. They can handle the same data formats the geometry can handle.
The only attribute every particle needs is the position. Some styles need other attributes, too, but most are optional. Colors, Normals, Sizes and textureZs can either be left empty, have a single element or have as many elements as there are positions. If only a single element is given, it is used by all particles, otherwise every particle has its own element.
The different types interpret the data as follows:
osg::Particles::ModeE::Points are rendered as simple GL_POINTS. Points use the positions, colors and textureZs attributes. A single size can (and should!) be given, but size per particle is not supported (yet). Dev: The problem is that to be efficient it is necessary to sort the points by size and minimize the state changes. That's just not done yet.
osg::Particles::ModeE::Lines are two-point lines between a position and the corresponding secPosition, i.e. there have to be as many positions as secPositions. Colors and texture coordinates are used, too. A single size can (and should!) be given, but width per line is not supported (yet). Dev: Same reason as for the points.
osg::Particles::ModeE::ViewDirQuads draw a single quad at the given position with the given size, color and texture Z. Only the X component of the size is used, and the given texture is used to fill the quad totally. The orientation of the quad is chosen to be parallel to the viewing direction, i.e. particles that are to the side of the viewer will be seen as a line.
osg::Particles::ModeE::ViewerQuads use just the same parameters as ViewDirQuads, but the particles are oriented to turn towards the viewer position, i.e. they always face the viewer, no matter where they are.
osg::Particles::ModeE::Arrows draws simple flat arrows. The coordinate system of the arrows is defined by the position, the secondary position and the normal. The tip of the arrow is at the position, the axis of the arrow points to the secondary position and the it is perpendicular to the normal. There need to be positions and secondary positions for every arrow, a single normal is possible, or a separate normal for every arrow.
There is also a single material that is used to draw the particles, and an attribute to change the draw order of the particles.
Ext: To extend the particles nodecore for rendering new things, do the following: XXX
1.4.3