Setting up Kanzi Particles

Setting up your Kanzi Studio project

Before you can use Kanzi Particles in your Kanzi application, you must set up your Kanzi Studio project.

To set up your Kanzi Studio project:

  1. In Kanzi Studio, open the project where you want to create particles with Kanzi Particles.

  2. In the Library, right-click Kanzi Engine Plugins and select Import Kanzi Engine Plugin.

    _images/import-kanzi-engine-plugin.png
  3. In the Kanzi Studio main menu, select Project > Properties. In the Properties, set the Target Graphics API property to OpenGL ES 3.1.

    You must use OpenGL ES 3.1 or higher to enable compute shaders in a Kanzi Studio project.

    _images/project-properties.png _images/target-graphics-api-opengl-es-31.png
  4. In the <KanziWorkspace>/Engine/plugins/particles/lib directory, open the directory of the configuration that you want to use. Select the plugin dll file and click Open.

    Kanzi Studio imports the Kanzi Particles plugin to your Kanzi Studio project. The plugin contains the elements that you need to create particle systems in your Kanzi application.

    _images/library-particlesystem-dll.png _images/properties-particlesystem-dll.png
  5. In the Assets Packages, press the Add Assets Source button and select the folder <KanziWorkspace>/Engine/plugins/particles/assets/ParticleSystemSetup to add the assets source project to your Kanzi Studio project. You should now see ParticleSystemSetup in the Assets Packages with its assets.

    _images/add-assets-source-project.png _images/assets-source-project-directory.png _images/assets-packages-particle-system-setup.png
  6. Now that your project is ready, you can start creating particles effects:

Building Kanzi Studio application with Kanzi Particles for Android

To run your Kanzi Studio application with Kanzi Particles on a target device, add Kanzi Particles as a dependency to the build.gradle configuration of your application.

  1. Navigate to the directory at <ProjectName>/Application/configs/platforms/android_gradle/kanzinative.

  2. Open the build.gradle file in a text editor.

  3. Locate the line that defines the argument for using the Particles plugin within the externalNativeBuild section, and set the DKANZI_LINK_KZPARTICLES flag to ON. See the example code below:

    // Enable to add Particles plugin to the AAR. It has to be available in Engine/plugins/particles/.
    arguments "-DKANZI_LINK_KZPARTICLES=ON"
    
  4. Save the updated build.gradle file and run the build process.

See also

Starting with templates

Creating a new Particles effect