When loading the PopcornFX plugin for the first time, a PKFxSetting.asset will be created under “Assets/Resources/”. This asset is used to configure all PopcornFX settings.
Those options are separated in 4 main categories:
- 1: Enable/Disable raycast collision queries. Might be necessary for certains effects. Might cause lag if used carelessly
- 2: Relative path to source PopcornFX project. Make sure that the project has the same version as your PopcornFX Unity Plugin
- 3: Path relative to “Assets/’ where baked assets will be stored
- 4: Bake with force determinism: Your effect random are now seeded.
- 5: Enable/Disable console Unity logs from Native plugin
- 6: Enable/Disable file logs from Native plugin
- 7: Debug Only. Show effect bounding boxes
- 8: Debug Only. Show effect raycasts
- 9: Enable/Disable soft particles rendering
- 10: Enable/Disable dynamic effects bounds
- 11: Enable/Disable vertex shader billboarding. When enabled, billboarding will be handled on GPU. This relies on DrawProcedural from Unity API and VertexID and drastically improves CPU/GPU performance by reducing overhead.
- 12: Enable/Disable Mesh instancing. Will improve overall performance but need per instance data for the mesh color.
- 13/14: Enable/Disable Localized Pages.
- 15: Free unused batches if they are unused during a number of frames.
- 16: Due to API limitation, Resizing buffers is excessively expensive. This option allows the recording of the final buffers sizes while in editor. This size is then used when first allocating buffers in order to avoid realloc
- 17: Check if in Unity editor visual studio is freezing when debugging.
- 18: Check when building for certains platforms with high multithreading contention
- 19: Expose all Pkfx.asset in project. Useful on project upgrade where GUID can be regenerated and need an update in scripts.
A PopcornFX Effect is the asset (.pkfx.asset) that will contain the sources of the PopcornFX Effect (.pkfx) (see Effect production pipeline). It is defined as an asset by PKFxEffectAsset.cs
To import an effect select the PKFXSetting, Set your “Source Effects Pack” with a valid PopcornFX project (.pkproj). Be sure that the version number of the project is matching the project version of your Unity plugin.
You can then import the whole project, or click on “Choose files” and choose wich effect to import with the interface provided (right image).
Scene basic setup
- It is required to have a single component present on a game object and active at all times.
- The RenderingPlugin component will also instantiate a PKFxLogger which allows the configuration of logs from the plugin.
- For every camera that should render particles, there should be one attached PKFxCamera component.
- Instantiate your effects via the PKFxEmitter component.
- Set your effect source asset.