The Point Cloud Kit plugin based on the Particle System of Unreal (not yet Niagara). It is easy to get confused about all the naming. There is also an Actor called Emitter and Components called ParticleSystem. A Particle System asset will be opened with Cascade (Unreals PS editor), it can hold several Emitters, which can spawn Particles of one kind. Sometimes a Particle System asset will also be called PS Template, because it describes how a ParticleSystemComponent will be initialized.
In the “PointCloudKit Content” folder is a “Required” subfolder with all the assets needed for the Point Cloud Kit framework. In “PointCloudKit Content / Required / Emitters” you can find the default Particle System template that will be used if no other Particle System was set in the PCD Data Asset.
In order have a Particle System - Emitter working with the Point Cloud Kit several thing need to be setup correctly.
- Use only one Emitter : Technically you can add more Emitters, but the Point Cloud framework will only use the first.
- GPU sprites : Use GPU based Particles (right click on the Emitter and select TypeData / GPU sprites) to be able to render huge amounts of Points.
- BurstList : Make sure to add at least one slot in the Burst List array within the Spawn module. A Point Cloud with Burst Mode: Distributed will spread the numbers of Particles it needs to spawn over all slots (but it will not add one). The content of these slots will not matter, because they will be overridden on spawning. This of course has the drawback of changing data on a Template, which might be shared. Unfortunately there is currently no other way by a Plugin (without an Engine change) to set those values directly on the instance. Therefore only share a Particle System when the Point Clouds are identical in number and Point size. Use the “Override ParticleSystem” on a PCD Data Asset to change the Template for a Point Cloud.
- The “Initial Location [PC]” module : This module comes with the Point Cloud Kit plugin. It will index all spawned particles of an Emitter and it passes the index to the Material (set in the Required module) by writing the value into the Z value of the Location. To override the location seems awkward but the Point Cloud Kit framework will handle the locations in a Render Target outside of the whole Particle System anyway. The only drawback is that alpha sorting will not work properly because all locations will be overridden in the Material, but translucent Materials on Emitters with huge Particle counts shouldn’t be used anyway. There are always workarounds with blend modes like additive or modulate.
- Use Local Space : Always needs to be true to make the internal calculations work correctly. Within the Materials of a PCD / PCA (not to mix up with the Material of the Emitter itself, see next bullet point) all locations are always in local space.
- Material : Inside of the Material, set on the Required module of an Emitter, all the data comes together. Take a look at MAT_PointCloud_Default in “PointCloudKit Content / Required / Materials”. The index passed in as Z value of the Particle Position will be used to calculate a UV coordinate to access the Locations texture, which will be passed in by the framework. Then a World Position Offset will be calculated. In the default Material all the different color modes will be also handled. In the “PointCloudKit Content / Examples / ParticleMaterials” folder are some examples of different Materials for a Particle System. You also can use “Override Material” on the PCD Data Asset to change the Material that will be set in the Required module of the Particle System. Don’t confuse this Material with the Materials used to generate / animate the locations, this Material is a standard Unreal Material used to render the Particle geometry.
- Initial Size : This module will work as expected. You can set a constant or distributed size for the Points. Keep in mind that sizes above 10 will have an increased performance hit on huge Particle counts.
- 1000 seconds : Unfortunately there is a hard coded max life time on GPU based Particles: 1000s or 16:40 min. Probably Epic was never guessing that Particles have to live longer, but for a Point Cloud they might. Luckily there is a workaround that mostly will work unnoticed. On the Lifetime module set a constant to 999s and on the Required module set the “Emitter Duration” on 999.1. This way the Emitter will be retriggered just after the Particles get destroyed. In most cases you will not notice it, sometimes you can see a short flicker, It depends on the scene. Usually playing around a bit with the Emitter Duration a delay can be found to make it seamless. Take a look at the Emitters in “PointCloudKit Content / Examples / Emitters” which are all setup this way (including the default Particle System in “PointCloudKit Content / Required / Emitters”).