CParticleRenderer Billboard
Last update: v1.10.0 - Main page :
Particle renderers
This is the most used particle renderer. It displays the particles as textured sprites.
It has various options to control how the particles are displayed, rotated, scaled, which texture is mapped on them, etc...
This renderer is supported in all of our public engine integrations.
Contents
Node properties
Billboarding modes
ScreenAlignedQuad
4 vertices / 2 triangles per particle
A screen-aligned billboard has its plane parallel to the screen plane. Looking around and rotating the view camera change the billboard order, and if intersections with the world geometry are obvious, you will have the strange impression that the sprites "swim" around the screen. changing the camera position without touching its orientation won't change the billboard order.
It is the cheapest billboard type to compute.
ViewposAlignedQuad
4 vertices / 2 triangles per particle
A viewpos-aligned quad has its plane normal pointing towards the camera position. Unlike screen-aligned quads, looking around does not change the billboard geometry, and the sprites appear solidly anchored in the world's volume, without strange swimming artefacts. However, changing the camera position without touching its orientation will rotate the sprites, as they face towards the viewer's position.
ScreenAlignedTriangle
3 vertices / 1 triangles per particle
This is mainly to be used if rendering is vertex-bound. Experimental.
Doesn't work well with texture atlases in the editor viewport unless there's enough empty space in the atlas. (Could be fixed using texkill in the shader when UVs are out of bounds)
VelocityAxisAligned
4 vertices / 2 triangles per particle
This billboard mode's name can be a bit misleading, as it is not limited to velocity alignment. By default, the billboarding axis is set to the particle field 'Velocity', but you can actually supply any other axis through the 'AxisField' property of the billboarder.
The billboard's vertical axis at 'u = 0.5' is constrained to the axis 'AxisField'. The billboard rotates around that axis to try facing the camera.
This is the fastest axial billboarder, but artefacts start appearing when the axis becomes near perpendicular with the screen plane: the fact that the sprite is in fact a quad becomes pretty apparent, and at near perpendicular angles, as the quad is seen from the side, it can entirely disappear. see the images below.
VelocitySpheroidalAlign
4 vertices / 2 triangles per particle
Like the other axial billboarders, this billboarder is not limited to Velocity alignment, and can use any other axis for billboarding.
Unlike the VelocityAxisAligned billboarding mode, this one doesn't suffer from the grazing-angle problem, where the particle appears to vanish when the billboarding axis becomes near-perpendicular with the screen plane.
Instead, this billboarder emulates a spheroid, and bounds the screenspace projection of the spheroid with a quad. This fixes the artifacts of the VelocityAxisAligned mode.
Note that in order to achieve this, the texture will appear to rotate unexpectedly if it is not rotation-invariant. For example: you will see this on a cloud texture, but not on a circular glow texture like the one used in the screenshots below.
Computational cost is almost the same as the VelocityAxisAligned mode, for the CPU billboarding implementations, on all the platforms.
VelocityCapsuleAlign
6 vertices / 4 triangles per particle
Like the other axial billboarders, this billboarder is not limited to Velocity alignment, and can use any other axis for billboarding.
Particles rendered using this billboarder, like the VelocitySpheroidalAlign, won't seem to disappear at grazing angles.
Stretches the texture on its diagonal.
Computational cost is a bit higher than the other billboarders.
PlanarAlignedQuad
4 vertices / 2 triangles per particle
Planar aligned billboarders use two axes for billboarding: like the axial billboarder, a main axis, lying on the plane, and the plane normal vector.
![]() ![]() |
![]() | |
|
Builtin billboarding materials
We'll use the following naming conventions for 'SRC', 'A', and 'DST'
![]() |
![]() |
![]() |
![]() |
SRC = texture color modulated by the particle color | A = texture alpha modulated by the particle alpha | DST = framebuffer color | RG = distortion vectors, B = blur coefficient |
![]() |
Additive | SRC * A + DST (Linear Dodge in Photoshop) |
![]() |
Additive_NoAlpha | SRC + DST (Linear Dodge in Photoshop) |
![]() |
Additive_Soft | SRC * A * D + DST |
![]() |
AlphaBlend | SRC * A + DST * (1 - A) (normal Opaque blending in Photoshop) |
![]() |
AlphaBlend_Soft | SRC * A * D + DST * (1 - A * D) |
![]() |
Distortion | Distortion and blur need the corresponding PostFX activated, see the Editor overview page, button no.12 |
![]() |
AlphaBlend_Additive | SRC + DST * (1 - A) (Premultiplied alpha) |
![]() |
AlphaBlend_Additive_Soft | SRC + DST * (1 - A * D) (Premultiplied alpha) |
Note that for correct sorting to take place between alpha and additive particles, you'll probably want to use the premultiplied alpha mode (AlphaBlend_Additive).
Atlas definitions
The atlas builder is used to create the atlas definition files.
It is a separate binary 'AtlasBuilder.exe', in the same directory as the main editor 'PK-Editor.exe'.
Please see the Atlas builder page for more details.
Once loaded, atlas definition will have its sub-rects displayed by the billboard renderer in the 'ParticleNode Editor'.
The sub-rects are displayed as red rectangles, with their ID displayed at their centers:
![]() |
![]() |
![]() |
Default view, displays RGB colors | Full view, after activating the alpha button | per-channel view (here, just the Green channel) |