PopcornFX v2.9

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
  1. Home
  2. Docs
  3. PopcornFX v2.9
  4. Plugins
  5. Unity Plugin
  6. Getting started

Getting started

Project setup

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.Unity_pkfxsetting

Those options are separated in 3 main categories:

  • General:
    • 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: Enable/Disable console Unity logs from Native plugin
    • 5: Enable/Disable file logs from Native plugin
  • Rendering:
    • 6:   Debug Only. Show effect bounding boxes
    • 7:   Debug Only. Show effect raycasts
    • 8:   Use this field to override the basic material factory. Mandatory for using URP/HDRP rendering
    • 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: 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
    • 14: Enable/Disable Localized Pages.
  • Multithreading:
    • 15: Check if in Unity editor visual studio is freezing when debugging.
    • 16: Check when building for certains platforms with high multithreading contention.

Effect ImportingUnity_import_effect

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

Unity_pack

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 PKFxRenderingPlugin 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.
    • The plugin will only render particles in cameras tagged ‘MainCamera’
  • Instantiate your effects via the PKFxEmitter component.
    • Set your effect source asset.
Was this article helpful to you? Yes No

How can we help?